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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 | 157 |
158 // Create and add the Browser Action buttons to the toolbar view. | 158 // Create and add the Browser Action buttons to the toolbar view. |
159 - (void)createBrowserActionButtons; | 159 - (void)createBrowserActionButtons; |
160 | 160 |
161 // Return the BrowserActionsController for this toolbar. | 161 // Return the BrowserActionsController for this toolbar. |
162 - (BrowserActionsController*)browserActionsController; | 162 - (BrowserActionsController*)browserActionsController; |
163 | 163 |
164 // Returns the wrench button. | 164 // Returns the wrench button. |
165 - (NSView*)wrenchButton; | 165 - (NSView*)wrenchButton; |
166 | 166 |
167 // Activates the page action for the extension that has the given id. | |
168 - (void)activatePageAction:(const std::string&)extension_id; | |
169 | |
170 // Activates the browser action for the extension that has the given id. | |
171 - (void)activateBrowserAction:(const std::string&)extension_id; | |
172 | |
173 @end | 167 @end |
174 | 168 |
175 // 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 |
176 // unless a subclass of ToolbarController. | 170 // unless a subclass of ToolbarController. |
177 @interface ToolbarController(ProtectedMethods) | 171 @interface ToolbarController(ProtectedMethods) |
178 // 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 |
179 // to load a different nib file. | 173 // to load a different nib file. |
180 - (id)initWithCommands:(CommandUpdater*)commands | 174 - (id)initWithCommands:(CommandUpdater*)commands |
181 profile:(Profile*)profile | 175 profile:(Profile*)profile |
182 browser:(Browser*)browser | 176 browser:(Browser*)browser |
183 resizeDelegate:(id<ViewResizer>)resizeDelegate | 177 resizeDelegate:(id<ViewResizer>)resizeDelegate |
184 nibFileNamed:(NSString*)nibName; | 178 nibFileNamed:(NSString*)nibName; |
185 @end | 179 @end |
186 | 180 |
187 // 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. |
188 @interface ToolbarController(PrivateTestMethods) | 182 @interface ToolbarController(PrivateTestMethods) |
189 // 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. |
190 - (NSArray*)toolbarViews; | 184 - (NSArray*)toolbarViews; |
191 - (void)showOptionalHomeButton; | 185 - (void)showOptionalHomeButton; |
192 - (void)installWrenchMenu; | 186 - (void)installWrenchMenu; |
193 - (WrenchMenuController*)wrenchMenuController; | 187 - (WrenchMenuController*)wrenchMenuController; |
194 // Return a hover button for the current event. | 188 // Return a hover button for the current event. |
195 - (NSButton*)hoverButtonForEvent:(NSEvent*)theEvent; | 189 - (NSButton*)hoverButtonForEvent:(NSEvent*)theEvent; |
196 @end | 190 @end |
197 | 191 |
198 #endif // CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_ | 192 #endif // CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_ |
OLD | NEW |