| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 151 |
| 152 // Create and add the Browser Action buttons to the toolbar view. | 152 // Create and add the Browser Action buttons to the toolbar view. |
| 153 - (void)createBrowserActionButtons; | 153 - (void)createBrowserActionButtons; |
| 154 | 154 |
| 155 // Return the BrowserActionsController for this toolbar. | 155 // Return the BrowserActionsController for this toolbar. |
| 156 - (BrowserActionsController*)browserActionsController; | 156 - (BrowserActionsController*)browserActionsController; |
| 157 | 157 |
| 158 // Returns the wrench button. | 158 // Returns the wrench button. |
| 159 - (NSView*)wrenchButton; | 159 - (NSView*)wrenchButton; |
| 160 | 160 |
| 161 // Activates the page action for the extension that has the given id. |
| 162 - (void)activatePageAction:(const std::string&)extension_id; |
| 163 |
| 164 // Activates the browser action for the extension that has the given id. |
| 165 - (void)activateBrowserAction:(const std::string&)extension_id; |
| 166 |
| 161 @end | 167 @end |
| 162 | 168 |
| 163 // A set of private methods used by subclasses. Do not call these directly | 169 // A set of private methods used by subclasses. Do not call these directly |
| 164 // unless a subclass of ToolbarController. | 170 // unless a subclass of ToolbarController. |
| 165 @interface ToolbarController(ProtectedMethods) | 171 @interface ToolbarController(ProtectedMethods) |
| 166 // Designated initializer which takes a nib name in order to allow subclasses | 172 // Designated initializer which takes a nib name in order to allow subclasses |
| 167 // to load a different nib file. | 173 // to load a different nib file. |
| 168 - (id)initWithCommands:(CommandUpdater*)commands | 174 - (id)initWithCommands:(CommandUpdater*)commands |
| 169 profile:(Profile*)profile | 175 profile:(Profile*)profile |
| 170 browser:(Browser*)browser | 176 browser:(Browser*)browser |
| 171 resizeDelegate:(id<ViewResizer>)resizeDelegate | 177 resizeDelegate:(id<ViewResizer>)resizeDelegate |
| 172 nibFileNamed:(NSString*)nibName; | 178 nibFileNamed:(NSString*)nibName; |
| 173 @end | 179 @end |
| 174 | 180 |
| 175 // A set of private methods used by tests, in the absence of "friends" in ObjC. | 181 // A set of private methods used by tests, in the absence of "friends" in ObjC. |
| 176 @interface ToolbarController(PrivateTestMethods) | 182 @interface ToolbarController(PrivateTestMethods) |
| 177 // Returns an array of views in the order of the outlets above. | 183 // Returns an array of views in the order of the outlets above. |
| 178 - (NSArray*)toolbarViews; | 184 - (NSArray*)toolbarViews; |
| 179 - (void)showOptionalHomeButton; | 185 - (void)showOptionalHomeButton; |
| 180 - (void)installWrenchMenu; | 186 - (void)installWrenchMenu; |
| 181 - (WrenchMenuController*)wrenchMenuController; | 187 - (WrenchMenuController*)wrenchMenuController; |
| 182 // Return a hover button for the current event. | 188 // Return a hover button for the current event. |
| 183 - (NSButton*)hoverButtonForEvent:(NSEvent*)theEvent; | 189 - (NSButton*)hoverButtonForEvent:(NSEvent*)theEvent; |
| 184 @end | 190 @end |
| 185 | 191 |
| 186 #endif // CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_ | 192 #endif // CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_ |
| OLD | NEW |