| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 IBOutlet BrowserActionsContainerView* browserActionsContainerView_; | 57 IBOutlet BrowserActionsContainerView* browserActionsContainerView_; |
| 58 | 58 |
| 59 @private | 59 @private |
| 60 CommandUpdater* commands_; // weak, one per window | 60 CommandUpdater* commands_; // weak, one per window |
| 61 Profile* profile_; // weak, one per window | 61 Profile* profile_; // weak, one per window |
| 62 Browser* browser_; // weak, one per window | 62 Browser* browser_; // weak, one per window |
| 63 scoped_ptr<ToolbarControllerInternal::CommandObserverBridge> commandObserver_; | 63 scoped_ptr<ToolbarControllerInternal::CommandObserverBridge> commandObserver_; |
| 64 scoped_ptr<LocationBarViewMac> locationBarView_; | 64 scoped_ptr<LocationBarViewMac> locationBarView_; |
| 65 base::scoped_nsobject<AutocompleteTextFieldEditor> | 65 base::scoped_nsobject<AutocompleteTextFieldEditor> |
| 66 autocompleteTextFieldEditor_; | 66 autocompleteTextFieldEditor_; |
| 67 id<ViewResizer> resizeDelegate_; // weak | |
| 68 base::scoped_nsobject<BackForwardMenuController> backMenuController_; | 67 base::scoped_nsobject<BackForwardMenuController> backMenuController_; |
| 69 base::scoped_nsobject<BackForwardMenuController> forwardMenuController_; | 68 base::scoped_nsobject<BackForwardMenuController> forwardMenuController_; |
| 70 base::scoped_nsobject<BrowserActionsController> browserActionsController_; | 69 base::scoped_nsobject<BrowserActionsController> browserActionsController_; |
| 71 scoped_ptr<BrowserActionsContainerViewSizeDelegate> | 70 scoped_ptr<BrowserActionsContainerViewSizeDelegate> |
| 72 browserActionsContainerDelegate_; | 71 browserActionsContainerDelegate_; |
| 73 | 72 |
| 74 // Lazily-instantiated menu controller. | 73 // Lazily-instantiated menu controller. |
| 75 base::scoped_nsobject<WrenchMenuController> wrenchMenuController_; | 74 base::scoped_nsobject<WrenchMenuController> wrenchMenuController_; |
| 76 | 75 |
| 77 // Used for monitoring the optional toolbar button prefs. | 76 // Used for monitoring the optional toolbar button prefs. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 94 // hoveredButton_ is required to have an NSCell that responds to | 93 // hoveredButton_ is required to have an NSCell that responds to |
| 95 // setMouseInside:animate:. | 94 // setMouseInside:animate:. |
| 96 NSButton* hoveredButton_; | 95 NSButton* hoveredButton_; |
| 97 } | 96 } |
| 98 | 97 |
| 99 // Initialize the toolbar and register for command updates. The profile is | 98 // Initialize the toolbar and register for command updates. The profile is |
| 100 // needed for initializing the location bar. The browser is needed for | 99 // needed for initializing the location bar. The browser is needed for |
| 101 // the toolbar model and back/forward menus. | 100 // the toolbar model and back/forward menus. |
| 102 - (id)initWithCommands:(CommandUpdater*)commands | 101 - (id)initWithCommands:(CommandUpdater*)commands |
| 103 profile:(Profile*)profile | 102 profile:(Profile*)profile |
| 104 browser:(Browser*)browser | 103 browser:(Browser*)browser; |
| 105 resizeDelegate:(id<ViewResizer>)resizeDelegate; | 104 |
| 105 // Called by BrowserWindowController when the Browser is being destroyed. |
| 106 - (void)browserWillBeDestroyed; |
| 106 | 107 |
| 107 // Get the C++ bridge object representing the location bar for this tab. | 108 // Get the C++ bridge object representing the location bar for this tab. |
| 108 - (LocationBarViewMac*)locationBarBridge; | 109 - (LocationBarViewMac*)locationBarBridge; |
| 109 | 110 |
| 110 // Called by the Window delegate so we can provide a custom field editor if | 111 // Called by the Window delegate so we can provide a custom field editor if |
| 111 // needed. | 112 // needed. |
| 112 // Note that this may be called for objects unrelated to the toolbar. | 113 // Note that this may be called for objects unrelated to the toolbar. |
| 113 // returns nil if we don't want to override the custom field editor for |obj|. | 114 // returns nil if we don't want to override the custom field editor for |obj|. |
| 114 - (id)customFieldEditorForObject:(id)obj; | 115 - (id)customFieldEditorForObject:(id)obj; |
| 115 | 116 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 @end | 184 @end |
| 184 | 185 |
| 185 // A set of private methods used by subclasses. Do not call these directly | 186 // A set of private methods used by subclasses. Do not call these directly |
| 186 // unless a subclass of ToolbarController. | 187 // unless a subclass of ToolbarController. |
| 187 @interface ToolbarController(ProtectedMethods) | 188 @interface ToolbarController(ProtectedMethods) |
| 188 // Designated initializer which takes a nib name in order to allow subclasses | 189 // Designated initializer which takes a nib name in order to allow subclasses |
| 189 // to load a different nib file. | 190 // to load a different nib file. |
| 190 - (id)initWithCommands:(CommandUpdater*)commands | 191 - (id)initWithCommands:(CommandUpdater*)commands |
| 191 profile:(Profile*)profile | 192 profile:(Profile*)profile |
| 192 browser:(Browser*)browser | 193 browser:(Browser*)browser |
| 193 resizeDelegate:(id<ViewResizer>)resizeDelegate | |
| 194 nibFileNamed:(NSString*)nibName; | 194 nibFileNamed:(NSString*)nibName; |
| 195 @end | 195 @end |
| 196 | 196 |
| 197 // A set of private methods used by tests, in the absence of "friends" in ObjC. | 197 // A set of private methods used by tests, in the absence of "friends" in ObjC. |
| 198 @interface ToolbarController(PrivateTestMethods) | 198 @interface ToolbarController(PrivateTestMethods) |
| 199 // Returns an array of views in the order of the outlets above. | 199 // Returns an array of views in the order of the outlets above. |
| 200 - (NSArray*)toolbarViews; | 200 - (NSArray*)toolbarViews; |
| 201 - (void)showOptionalHomeButton; | 201 - (void)showOptionalHomeButton; |
| 202 - (void)installWrenchMenu; | 202 - (void)installWrenchMenu; |
| 203 // Return a hover button for the current event. | 203 // Return a hover button for the current event. |
| 204 - (NSButton*)hoverButtonForEvent:(NSEvent*)theEvent; | 204 - (NSButton*)hoverButtonForEvent:(NSEvent*)theEvent; |
| 205 @end | 205 @end |
| 206 | 206 |
| 207 #endif // CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_ | 207 #endif // CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_ |
| OLD | NEW |