blob: ce6ddd021ff3cbdce04810df3ba9d51062a25ced [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import <UIKit/UIKit.h>
// Holds configuration for the presented Open In... menu.
@interface OpenInMenu : NSObject
// These properties hold arguments passed to |presentOpenInMenu...| methods.
@property(nonatomic, readonly) CGRect rect;
@property(nonatomic, readonly) UIView* view;
@property(nonatomic, readonly) BOOL animated;
// Fake class to stub out UIDocumentInteractionController. This class does not
// present any UI, but simply captures the presentation requests.
@interface FakeDocumentInteractionController : NSObject
// Fake implementations of UIDocumentInteractionController properties:
@property(nonatomic, copy) NSString* UTI;
@property(nonatomic, weak) id<UIDocumentInteractionControllerDelegate> delegate;
// Whether or not this controller can present Open In... menu. Defaults to YES.
@property(nonatomic) BOOL presentsOpenInMenu;
// Menu that is currently being presented.
@property(nonatomic, readonly) OpenInMenu* presentedOpenInMenu;
// Fake implementations of UIDocumentInteractionController methods:
- (BOOL)presentOpenInMenuFromRect:(CGRect)rect