| 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 19 matching lines...) Expand all Loading... |
| 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 resizeDelegate:(id<ViewResizer>)resizeDelegate; |
| 106 | 105 |
| 106 // Called by BrowserWindowController when the Browser is being destroyed. |
| 107 - (void)browserWillBeDestroyed; |
| 108 |
| 107 // Get the C++ bridge object representing the location bar for this tab. | 109 // Get the C++ bridge object representing the location bar for this tab. |
| 108 - (LocationBarViewMac*)locationBarBridge; | 110 - (LocationBarViewMac*)locationBarBridge; |
| 109 | 111 |
| 110 // Called by the Window delegate so we can provide a custom field editor if | 112 // Called by the Window delegate so we can provide a custom field editor if |
| 111 // needed. | 113 // needed. |
| 112 // Note that this may be called for objects unrelated to the toolbar. | 114 // 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|. | 115 // returns nil if we don't want to override the custom field editor for |obj|. |
| 114 - (id)customFieldEditorForObject:(id)obj; | 116 - (id)customFieldEditorForObject:(id)obj; |
| 115 | 117 |
| 116 // Make the location bar the first responder, if possible. | 118 // Make the location bar the first responder, if possible. |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 @interface ToolbarController(PrivateTestMethods) | 200 @interface ToolbarController(PrivateTestMethods) |
| 199 // Returns an array of views in the order of the outlets above. | 201 // Returns an array of views in the order of the outlets above. |
| 200 - (NSArray*)toolbarViews; | 202 - (NSArray*)toolbarViews; |
| 201 - (void)showOptionalHomeButton; | 203 - (void)showOptionalHomeButton; |
| 202 - (void)installWrenchMenu; | 204 - (void)installWrenchMenu; |
| 203 // Return a hover button for the current event. | 205 // Return a hover button for the current event. |
| 204 - (NSButton*)hoverButtonForEvent:(NSEvent*)theEvent; | 206 - (NSButton*)hoverButtonForEvent:(NSEvent*)theEvent; |
| 205 @end | 207 @end |
| 206 | 208 |
| 207 #endif // CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_ | 209 #endif // CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_ |
| OLD | NEW |