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