| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 BOOL isOverflow_; | 53 BOOL isOverflow_; |
| 54 | 54 |
| 55 // The bubble that is actively showing, if any. | 55 // The bubble that is actively showing, if any. |
| 56 ToolbarActionsBarBubbleMac* activeBubble_; | 56 ToolbarActionsBarBubbleMac* activeBubble_; |
| 57 | 57 |
| 58 // The index of the currently-focused view in the overflow menu, or -1 if | 58 // The index of the currently-focused view in the overflow menu, or -1 if |
| 59 // no view is focused. | 59 // no view is focused. |
| 60 NSInteger focusedViewIndex_; | 60 NSInteger focusedViewIndex_; |
| 61 } | 61 } |
| 62 | 62 |
| 63 @property(nonatomic) CGFloat maxWidth; |
| 63 @property(readonly, nonatomic) BrowserActionsContainerView* containerView; | 64 @property(readonly, nonatomic) BrowserActionsContainerView* containerView; |
| 64 @property(readonly, nonatomic) Browser* browser; | 65 @property(readonly, nonatomic) Browser* browser; |
| 65 @property(readonly, nonatomic) BOOL isOverflow; | 66 @property(readonly, nonatomic) BOOL isOverflow; |
| 66 @property(readonly, nonatomic) ToolbarActionsBarBubbleMac* activeBubble; | 67 @property(readonly, nonatomic) ToolbarActionsBarBubbleMac* activeBubble; |
| 67 | 68 |
| 68 // Initializes the controller given the current browser and container view that | 69 // Initializes the controller given the current browser and container view that |
| 69 // will hold the browser action buttons. If |mainController| is nil, the created | 70 // will hold the browser action buttons. If |mainController| is nil, the created |
| 70 // BrowserActionsController will be the main controller; otherwise (if this is | 71 // BrowserActionsController will be the main controller; otherwise (if this is |
| 71 // for the overflow menu), |mainController| should be controller of the main bar | 72 // for the overflow menu), |mainController| should be controller of the main bar |
| 72 // for the |browser|. | 73 // for the |browser|. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // Returns the size for the provided |maxWidth| of the overflow menu. | 109 // Returns the size for the provided |maxWidth| of the overflow menu. |
| 109 - (gfx::Size)sizeForOverflowWidth:(int)maxWidth; | 110 - (gfx::Size)sizeForOverflowWidth:(int)maxWidth; |
| 110 | 111 |
| 111 @end // @interface BrowserActionsController | 112 @end // @interface BrowserActionsController |
| 112 | 113 |
| 113 @interface BrowserActionsController(TestingAPI) | 114 @interface BrowserActionsController(TestingAPI) |
| 114 - (BrowserActionButton*)buttonWithIndex:(NSUInteger)index; | 115 - (BrowserActionButton*)buttonWithIndex:(NSUInteger)index; |
| 115 @end | 116 @end |
| 116 | 117 |
| 117 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ | 118 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ |
| OLD | NEW |