| 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 class ReadingListModel; | 21 class ReadingListModel; |
| 22 @class ToolsMenuContext; | 22 @class ToolsMenuConfiguration; |
| 23 | 23 |
| 24 // The time delay before non-initial button images are loaded. | 24 // The time delay before non-initial button images are loaded. |
| 25 extern const int64_t kNonInitialImageAdditionDelayNanosec; | 25 extern const int64_t kNonInitialImageAdditionDelayNanosec; |
| 26 // Notification when the tools menu is opened. | 26 // Notification when the tools menu is opened. |
| 27 extern NSString* const kMenuWillShowNotification; | 27 extern NSString* const kMenuWillShowNotification; |
| 28 // Notification when the tools menu is closed. | 28 // Notification when the tools menu is closed. |
| 29 extern NSString* const kMenuWillHideNotification; | 29 extern NSString* const kMenuWillHideNotification; |
| 30 // Accessibility identifier of the toolbar view (for use by integration tests). | 30 // Accessibility identifier of the toolbar view (for use by integration tests). |
| 31 extern NSString* const kToolbarIdentifier; | 31 extern NSString* const kToolbarIdentifier; |
| 32 // Accessibility identifier of the incognito toolbar view (for use by | 32 // Accessibility identifier of the incognito toolbar view (for use by |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 forInitialState:(UIControlState)initialState | 158 forInitialState:(UIControlState)initialState |
| 159 hasDisabledImage:(BOOL)hasDisabledImage | 159 hasDisabledImage:(BOOL)hasDisabledImage |
| 160 synchronously:(BOOL)synchronously; | 160 synchronously:(BOOL)synchronously; |
| 161 | 161 |
| 162 // TRUE if |imageEnum| should be flipped when in RTL layout. | 162 // TRUE if |imageEnum| should be flipped when in RTL layout. |
| 163 // Currently none of this class' images have this property, but subclasses | 163 // Currently none of this class' images have this property, but subclasses |
| 164 // can override this method if they need to flip some of their images. | 164 // can override this method if they need to flip some of their images. |
| 165 - (BOOL)imageShouldFlipForRightToLeftLayoutDirection:(int)imageEnum; | 165 - (BOOL)imageShouldFlipForRightToLeftLayoutDirection:(int)imageEnum; |
| 166 | 166 |
| 167 // Shows the tools popup menu. | 167 // Shows the tools popup menu. |
| 168 - (void)showToolsMenuPopupWithContext:(ToolsMenuContext*)context; | 168 - (void)showToolsMenuPopupWithConfiguration: |
| 169 (ToolsMenuConfiguration*)configuration; |
| 169 | 170 |
| 170 // If |toolsPopupController_| is non-nil, dismisses the tools popup menu with | 171 // If |toolsPopupController_| is non-nil, dismisses the tools popup menu with |
| 171 // animation. | 172 // animation. |
| 172 - (void)dismissToolsMenuPopup; | 173 - (void)dismissToolsMenuPopup; |
| 173 | 174 |
| 174 // Returns the bound of the share button. Used to position the share menu. | 175 // Returns the bound of the share button. Used to position the share menu. |
| 175 - (CGRect)shareButtonAnchorRect; | 176 - (CGRect)shareButtonAnchorRect; |
| 176 | 177 |
| 177 // Returns the share button's view. Used to position the share menu. | 178 // Returns the share button's view. Used to position the share menu. |
| 178 - (UIView*)shareButtonView; | 179 - (UIView*)shareButtonView; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 | 280 |
| 280 // Called when transition animations can be removed. | 281 // Called when transition animations can be removed. |
| 281 - (void)cleanUpTransitionAnimations; | 282 - (void)cleanUpTransitionAnimations; |
| 282 | 283 |
| 283 // Shows/hides iPhone toolbar views for when the new tab page is displayed. | 284 // Shows/hides iPhone toolbar views for when the new tab page is displayed. |
| 284 - (void)hideViewsForNewTabPage:(BOOL)hide; | 285 - (void)hideViewsForNewTabPage:(BOOL)hide; |
| 285 | 286 |
| 286 @end | 287 @end |
| 287 | 288 |
| 288 #endif // IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_CONTROLLER_H_ | 289 #endif // IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_CONTROLLER_H_ |
| OLD | NEW |