| 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 #import "base/mac/scoped_nsobject.h" | 10 #import "base/mac/scoped_nsobject.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 // The chevron button used when Browser Actions are hidden. | 58 // The chevron button used when Browser Actions are hidden. |
| 59 base::scoped_nsobject<MenuButton> chevronMenuButton_; | 59 base::scoped_nsobject<MenuButton> chevronMenuButton_; |
| 60 | 60 |
| 61 // The Browser Actions overflow menu. | 61 // The Browser Actions overflow menu. |
| 62 base::scoped_nsobject<NSMenu> overflowMenu_; | 62 base::scoped_nsobject<NSMenu> overflowMenu_; |
| 63 } | 63 } |
| 64 | 64 |
| 65 @property(readonly, nonatomic) BrowserActionsContainerView* containerView; | 65 @property(readonly, nonatomic) BrowserActionsContainerView* containerView; |
| 66 | 66 |
| 67 // Initializes the controller given the current browser and container view that | 67 // Initializes the controller given the current browser and container view that |
| 68 // will hold the browser action buttons. | 68 // will hold the browser action buttons. If |mainController| is nil, the created |
| 69 // BrowserActionsController will be the main controller; otherwise (if this is |
| 70 // for the overflow menu), |mainController| should be controller of the main bar |
| 71 // for the |browser|. |
| 69 - (id)initWithBrowser:(Browser*)browser | 72 - (id)initWithBrowser:(Browser*)browser |
| 70 containerView:(BrowserActionsContainerView*)container | 73 containerView:(BrowserActionsContainerView*)container |
| 71 isOverflow:(BOOL)isOverflow; | 74 mainController:(BrowserActionsController*)mainController; |
| 72 | 75 |
| 73 // Update the display of all buttons. | 76 // Update the display of all buttons. |
| 74 - (void)update; | 77 - (void)update; |
| 75 | 78 |
| 76 // Returns the current number of browser action buttons within the container, | 79 // Returns the current number of browser action buttons within the container, |
| 77 // whether or not they are displayed. | 80 // whether or not they are displayed. |
| 78 - (NSUInteger)buttonCount; | 81 - (NSUInteger)buttonCount; |
| 79 | 82 |
| 80 // Returns the current number of browser action buttons displayed in the | 83 // Returns the current number of browser action buttons displayed in the |
| 81 // container. | 84 // container. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 99 @end // @interface BrowserActionsController | 102 @end // @interface BrowserActionsController |
| 100 | 103 |
| 101 @interface BrowserActionsController(TestingAPI) | 104 @interface BrowserActionsController(TestingAPI) |
| 102 - (BrowserActionButton*)buttonWithIndex:(NSUInteger)index; | 105 - (BrowserActionButton*)buttonWithIndex:(NSUInteger)index; |
| 103 - (ToolbarActionsBar*)toolbarActionsBar; | 106 - (ToolbarActionsBar*)toolbarActionsBar; |
| 104 + (BrowserActionsController*)fromToolbarActionsBarDelegate: | 107 + (BrowserActionsController*)fromToolbarActionsBarDelegate: |
| 105 (ToolbarActionsBarDelegate*)delegate; | 108 (ToolbarActionsBarDelegate*)delegate; |
| 106 @end | 109 @end |
| 107 | 110 |
| 108 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ | 111 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ |
| OLD | NEW |