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_TOOLBAR_TOOLBAR_CONTROLLER_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_CONTROLLER_H_ |
6 #define IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_CONTROLLER_H_ | 6 #define IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_CONTROLLER_H_ |
7 | 7 |
8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
9 | 9 |
10 #include <stdint.h> | 10 #include <stdint.h> |
11 | 11 |
12 #include <map> | 12 #include <map> |
13 | 13 |
14 #include "base/ios/weak_nsobject.h" | 14 #include "base/ios/weak_nsobject.h" |
15 #import "base/mac/scoped_nsobject.h" | 15 #import "base/mac/scoped_nsobject.h" |
16 #include "ios/chrome/browser/ui/rtl_geometry.h" | 16 #include "ios/chrome/browser/ui/rtl_geometry.h" |
17 #import "ios/chrome/browser/ui/tools_menu/tools_popup_controller.h" | 17 #import "ios/chrome/browser/ui/tools_menu/tools_popup_controller.h" |
18 #include "ios/chrome/browser/ui/ui_util.h" | 18 #include "ios/chrome/browser/ui/ui_util.h" |
19 #import "ios/chrome/browser/ui/util/relaxed_bounds_constraints_hittest.h" | 19 #import "ios/chrome/browser/ui/util/relaxed_bounds_constraints_hittest.h" |
20 | 20 |
| 21 @protocol BrowserCommands; |
21 class ReadingListModel; | 22 class ReadingListModel; |
22 @class ToolsMenuConfiguration; | 23 @class ToolsMenuConfiguration; |
23 | 24 |
24 // The time delay before non-initial button images are loaded. | 25 // The time delay before non-initial button images are loaded. |
25 extern const int64_t kNonInitialImageAdditionDelayNanosec; | 26 extern const int64_t kNonInitialImageAdditionDelayNanosec; |
26 // Notification that the tools menu has been requested to be shown. | 27 // Notification that the tools menu has been requested to be shown. |
27 extern NSString* const kMenuWillShowNotification; | 28 extern NSString* const kMenuWillShowNotification; |
28 // Notification that the tools menu is closed. | 29 // Notification that the tools menu is closed. |
29 extern NSString* const kMenuWillHideNotification; | 30 extern NSString* const kMenuWillHideNotification; |
30 // Accessibility identifier of the toolbar view (for use by integration tests). | 31 // Accessibility identifier of the toolbar view (for use by integration tests). |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // The tools popup controller. Nil if the tools popup menu is not visible. | 128 // The tools popup controller. Nil if the tools popup menu is not visible. |
128 @property(nonatomic, readonly, strong) | 129 @property(nonatomic, readonly, strong) |
129 ToolsPopupController* toolsPopupController; | 130 ToolsPopupController* toolsPopupController; |
130 | 131 |
131 // Style of this toolbar. | 132 // Style of this toolbar. |
132 @property(nonatomic, readonly, assign) ToolbarControllerStyle style; | 133 @property(nonatomic, readonly, assign) ToolbarControllerStyle style; |
133 | 134 |
134 // The reading list model reflected by the toolbar. | 135 // The reading list model reflected by the toolbar. |
135 @property(nonatomic, readwrite, assign) ReadingListModel* readingListModel; | 136 @property(nonatomic, readwrite, assign) ReadingListModel* readingListModel; |
136 | 137 |
| 138 @property(nonatomic, readwrite, weak) id<BrowserCommands> dispatcher; |
| 139 |
137 // Designated initializer. |style| determines how the toolbar draws itself. | 140 // Designated initializer. |style| determines how the toolbar draws itself. |
138 - (instancetype)initWithStyle:(ToolbarControllerStyle)style | 141 - (instancetype)initWithStyle:(ToolbarControllerStyle)style |
139 NS_DESIGNATED_INITIALIZER; | 142 NS_DESIGNATED_INITIALIZER; |
140 | 143 |
141 - (instancetype)init NS_UNAVAILABLE; | 144 - (instancetype)init NS_UNAVAILABLE; |
142 | 145 |
143 // Called when the application has entered the background. | 146 // Called when the application has entered the background. |
144 - (void)applicationDidEnterBackground:(NSNotification*)notify; | 147 - (void)applicationDidEnterBackground:(NSNotification*)notify; |
145 | 148 |
146 // Sets whether the share button is enabled or not. | 149 // Sets whether the share button is enabled or not. |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 | 283 |
281 // Called when transition animations can be removed. | 284 // Called when transition animations can be removed. |
282 - (void)cleanUpTransitionAnimations; | 285 - (void)cleanUpTransitionAnimations; |
283 | 286 |
284 // Shows/hides iPhone toolbar views for when the new tab page is displayed. | 287 // Shows/hides iPhone toolbar views for when the new tab page is displayed. |
285 - (void)hideViewsForNewTabPage:(BOOL)hide; | 288 - (void)hideViewsForNewTabPage:(BOOL)hide; |
286 | 289 |
287 @end | 290 @end |
288 | 291 |
289 #endif // IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_CONTROLLER_H_ | 292 #endif // IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_CONTROLLER_H_ |
OLD | NEW |