OLD | NEW |
(Empty) | |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_BROWSER_UI_OPEN_IN_CONTROLLER_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_OPEN_IN_CONTROLLER_H_ |
| 7 |
| 8 #import <UIKit/UIKit.h> |
| 9 |
| 10 #include <memory> |
| 11 |
| 12 #include "base/mac/scoped_nsobject.h" |
| 13 #include "base/memory/ref_counted.h" |
| 14 #import "ios/chrome/browser/ui/open_in_toolbar.h" |
| 15 #include "url/gurl.h" |
| 16 |
| 17 namespace net { |
| 18 class URLRequestContextGetter; |
| 19 } |
| 20 |
| 21 @class CRWWebController; |
| 22 |
| 23 // Class used to handle opening files in other applications. |
| 24 @interface OpenInController : NSObject<UIGestureRecognizerDelegate, |
| 25 UIDocumentInteractionControllerDelegate> |
| 26 // Designated initializer. |
| 27 - (id)initWithRequestContext:(net::URLRequestContextGetter*)requestContext |
| 28 webController:(CRWWebController*)webController; |
| 29 |
| 30 // Removes the |openInToolbar_| from the |webController_|'s view and resets the |
| 31 // variables specific to the loaded document. |
| 32 - (void)disable; |
| 33 |
| 34 // Disconnects the controller from its CRWWebController. Should be called when |
| 35 // the CRWWebController is being torn down. |
| 36 - (void)detachFromWebController; |
| 37 |
| 38 // Adds the |openInToolbar_| to the |webController_|'s view and sets the url and |
| 39 // the filename for the currently loaded document. |
| 40 - (void)enableWithDocumentURL:(const GURL&)documentURL |
| 41 suggestedFilename:(NSString*)suggestedFilename; |
| 42 @end |
| 43 |
| 44 #endif // IOS_CHROME_BROWSER_UI_OPEN_IN_CONTROLLER_H_ |
OLD | NEW |