| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef IOS_CHROME_BROWSER_UI_BROWSER_VIEW_CONTROLLER_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_BROWSER_VIEW_CONTROLLER_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_BROWSER_VIEW_CONTROLLER_H_ | 6 #define IOS_CHROME_BROWSER_UI_BROWSER_VIEW_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <MessageUI/MessageUI.h> | 8 #import <MessageUI/MessageUI.h> |
| 9 #import <StoreKit/StoreKit.h> | 9 #import <StoreKit/StoreKit.h> |
| 10 #import <UIKit/UIKit.h> | 10 #import <UIKit/UIKit.h> |
| 11 | 11 |
| 12 #import "base/ios/block_types.h" | 12 #import "base/ios/block_types.h" |
| 13 #import "ios/chrome/browser/ui/browser_ios.h" | |
| 14 #import "ios/chrome/browser/ui/side_swipe/side_swipe_controller.h" | 13 #import "ios/chrome/browser/ui/side_swipe/side_swipe_controller.h" |
| 15 #import "ios/chrome/browser/ui/toolbar/toolbar_owner.h" | 14 #import "ios/chrome/browser/ui/toolbar/toolbar_owner.h" |
| 16 #import "ios/chrome/browser/ui/toolbar/web_toolbar_controller.h" | 15 #import "ios/chrome/browser/ui/toolbar/web_toolbar_controller.h" |
| 17 #import "ios/chrome/browser/ui/url_loader.h" | 16 #import "ios/chrome/browser/ui/url_loader.h" |
| 18 #import "ios/public/provider/chrome/browser/voice/voice_search_presenter.h" | 17 #import "ios/public/provider/chrome/browser/voice/voice_search_presenter.h" |
| 19 | 18 |
| 20 @class BrowserContainerView; | 19 @class BrowserContainerView; |
| 21 @class BrowserViewControllerDependencyFactory; | 20 @class BrowserViewControllerDependencyFactory; |
| 22 @class ContextualSearchController; | 21 @class ContextualSearchController; |
| 23 @class ContextualSearchPanelView; | 22 @class ContextualSearchPanelView; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 44 // Notification sent when the page info is hidden. | 43 // Notification sent when the page info is hidden. |
| 45 extern NSString* const kPageInfoWillHideNotification; | 44 extern NSString* const kPageInfoWillHideNotification; |
| 46 // Notification sent when the location bar becomes first responder. | 45 // Notification sent when the location bar becomes first responder. |
| 47 extern NSString* const kLocationBarBecomesFirstResponderNotification; | 46 extern NSString* const kLocationBarBecomesFirstResponderNotification; |
| 48 // Notification sent when the location bar resigns first responder. | 47 // Notification sent when the location bar resigns first responder. |
| 49 extern NSString* const kLocationBarResignsFirstResponderNotification; | 48 extern NSString* const kLocationBarResignsFirstResponderNotification; |
| 50 } // namespace ios_internal | 49 } // namespace ios_internal |
| 51 | 50 |
| 52 // The top-level view controller for the browser UI. Manages other controllers | 51 // The top-level view controller for the browser UI. Manages other controllers |
| 53 // which implement the interface. | 52 // which implement the interface. |
| 54 @interface BrowserViewController : UIViewController<BrowserIOS, | 53 @interface BrowserViewController : UIViewController<SideSwipeControllerDelegate, |
| 55 SideSwipeControllerDelegate, | |
| 56 ToolbarOwner, | 54 ToolbarOwner, |
| 57 UrlLoader, | 55 UrlLoader, |
| 58 VoiceSearchPresenter, | 56 VoiceSearchPresenter, |
| 59 WebToolbarDelegate> | 57 WebToolbarDelegate> |
| 60 | 58 |
| 61 // Initializes a new BVC from its nib. |model| must not be nil. The | 59 // Initializes a new BVC from its nib. |model| must not be nil. The |
| 62 // webUsageSuspended property for this BVC will be based on |model|, and future | 60 // webUsageSuspended property for this BVC will be based on |model|, and future |
| 63 // changes to |model|'s suspension state should be made through this BVC | 61 // changes to |model|'s suspension state should be made through this BVC |
| 64 // instead of directly on the model. | 62 // instead of directly on the model. |
| 65 - (instancetype)initWithTabModel:(TabModel*)model | 63 - (instancetype)initWithTabModel:(TabModel*)model |
| (...skipping 20 matching lines...) Expand all Loading... |
| 86 | 84 |
| 87 // Activates/deactivates the object. This will enable/disable the ability for | 85 // Activates/deactivates the object. This will enable/disable the ability for |
| 88 // this object to browse, and to have live UIWebViews associated with it. While | 86 // this object to browse, and to have live UIWebViews associated with it. While |
| 89 // not active, the UI will not react to changes in the tab model, so generally | 87 // not active, the UI will not react to changes in the tab model, so generally |
| 90 // an inactive BVC should not be visible. | 88 // an inactive BVC should not be visible. |
| 91 @property(nonatomic, assign, getter=isActive) BOOL active; | 89 @property(nonatomic, assign, getter=isActive) BOOL active; |
| 92 | 90 |
| 93 // Returns whether or not text to speech is playing. | 91 // Returns whether or not text to speech is playing. |
| 94 @property(nonatomic, assign, readonly, getter=isPlayingTTS) BOOL playingTTS; | 92 @property(nonatomic, assign, readonly, getter=isPlayingTTS) BOOL playingTTS; |
| 95 | 93 |
| 94 // Returns the TabModel passed to the initializer. |
| 95 @property(nonatomic, assign, readonly) TabModel* tabModel; |
| 96 |
| 97 // Returns the ios::ChromeBrowserState passed to the initializer. |
| 98 @property(nonatomic, assign, readonly) ios::ChromeBrowserState* browserState; |
| 99 |
| 96 // Whether the receiver is currently the primary BVC. | 100 // Whether the receiver is currently the primary BVC. |
| 97 - (void)setPrimary:(BOOL)primary; | 101 - (void)setPrimary:(BOOL)primary; |
| 98 | 102 |
| 99 // Called when the typing shield is tapped. | 103 // Called when the typing shield is tapped. |
| 100 - (void)shieldWasTapped:(id)sender; | 104 - (void)shieldWasTapped:(id)sender; |
| 101 | 105 |
| 102 // Called when a UI element to create a new tab is triggered. | 106 // Called when a UI element to create a new tab is triggered. |
| 103 - (void)newTab:(id)sender; | 107 - (void)newTab:(id)sender; |
| 104 | 108 |
| 105 // Makes sure that the view hierarchy has been built. Equivalent to calling | 109 // Makes sure that the view hierarchy has been built. Equivalent to calling |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 153 |
| 150 // Removes files received from other applications. If |immediately| is YES, | 154 // Removes files received from other applications. If |immediately| is YES, |
| 151 // initiates the removal of files immediately. |completionHandler| is called | 155 // initiates the removal of files immediately. |completionHandler| is called |
| 152 // when files have been removed. | 156 // when files have been removed. |
| 153 - (void)removeExternalFilesImmediately:(BOOL)immediately | 157 - (void)removeExternalFilesImmediately:(BOOL)immediately |
| 154 completionHandler:(ProceduralBlock)completionHandler; | 158 completionHandler:(ProceduralBlock)completionHandler; |
| 155 | 159 |
| 156 @end | 160 @end |
| 157 | 161 |
| 158 #endif // IOS_CHROME_BROWSER_UI_BROWSER_VIEW_CONTROLLER_H_ | 162 #endif // IOS_CHROME_BROWSER_UI_BROWSER_VIEW_CONTROLLER_H_ |
| OLD | NEW |