| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_COCOA_TOOLBAR_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_COCOA_TOOLBAR_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_COCOA_TOOLBAR_CONTROLLER_H_ | 6 #define CHROME_BROWSER_COCOA_TOOLBAR_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| 11 #include "base/scoped_nsobject.h" | 11 #include "base/scoped_nsobject.h" |
| 12 #import "chrome/browser/cocoa/button_with_viewid.h" |
| 12 #import "chrome/browser/cocoa/command_observer_bridge.h" | 13 #import "chrome/browser/cocoa/command_observer_bridge.h" |
| 13 #import "chrome/browser/cocoa/delayedmenu_button.h" | 14 #import "chrome/browser/cocoa/delayedmenu_button.h" |
| 14 #import "chrome/browser/cocoa/url_drop_target.h" | 15 #import "chrome/browser/cocoa/url_drop_target.h" |
| 15 #import "chrome/browser/cocoa/view_resizer.h" | 16 #import "chrome/browser/cocoa/view_resizer.h" |
| 16 #include "chrome/browser/pref_member.h" | 17 #include "chrome/browser/pref_member.h" |
| 17 | 18 |
| 18 @class AutocompleteTextField; | 19 @class AutocompleteTextField; |
| 19 @class AutocompleteTextFieldEditor; | 20 @class AutocompleteTextFieldEditor; |
| 20 @class BrowserActionsContainerView; | 21 @class BrowserActionsContainerView; |
| 21 @class BackForwardMenuController; | 22 @class BackForwardMenuController; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 44 | 45 |
| 45 @interface ToolbarController : NSViewController<CommandObserverProtocol, | 46 @interface ToolbarController : NSViewController<CommandObserverProtocol, |
| 46 URLDropTargetController> { | 47 URLDropTargetController> { |
| 47 @protected | 48 @protected |
| 48 // The ordering is important for unit tests. If new items are added or the | 49 // The ordering is important for unit tests. If new items are added or the |
| 49 // ordering is changed, make sure to update |-toolbarViews| and the | 50 // ordering is changed, make sure to update |-toolbarViews| and the |
| 50 // corresponding enum in the unit tests. | 51 // corresponding enum in the unit tests. |
| 51 IBOutlet DelayedMenuButton* backButton_; | 52 IBOutlet DelayedMenuButton* backButton_; |
| 52 IBOutlet DelayedMenuButton* forwardButton_; | 53 IBOutlet DelayedMenuButton* forwardButton_; |
| 53 IBOutlet ReloadButton* reloadButton_; | 54 IBOutlet ReloadButton* reloadButton_; |
| 54 IBOutlet NSButton* homeButton_; | 55 IBOutlet ButtonWithViewID* homeButton_; |
| 55 IBOutlet MenuButton* wrenchButton_; | 56 IBOutlet MenuButton* wrenchButton_; |
| 56 IBOutlet AutocompleteTextField* locationBar_; | 57 IBOutlet AutocompleteTextField* locationBar_; |
| 57 IBOutlet BrowserActionsContainerView* browserActionsContainerView_; | 58 IBOutlet BrowserActionsContainerView* browserActionsContainerView_; |
| 58 | 59 |
| 59 @private | 60 @private |
| 60 ToolbarModel* toolbarModel_; // weak, one per window | 61 ToolbarModel* toolbarModel_; // weak, one per window |
| 61 CommandUpdater* commands_; // weak, one per window | 62 CommandUpdater* commands_; // weak, one per window |
| 62 Profile* profile_; // weak, one per window | 63 Profile* profile_; // weak, one per window |
| 63 Browser* browser_; // weak, one per window | 64 Browser* browser_; // weak, one per window |
| 64 scoped_ptr<CommandObserverBridge> commandObserver_; | 65 scoped_ptr<CommandObserverBridge> commandObserver_; |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 @interface ToolbarController(PrivateTestMethods) | 177 @interface ToolbarController(PrivateTestMethods) |
| 177 // Returns an array of views in the order of the outlets above. | 178 // Returns an array of views in the order of the outlets above. |
| 178 - (NSArray*)toolbarViews; | 179 - (NSArray*)toolbarViews; |
| 179 - (void)showOptionalHomeButton; | 180 - (void)showOptionalHomeButton; |
| 180 - (void)installWrenchMenu; | 181 - (void)installWrenchMenu; |
| 181 // Return a hover button for the current event. | 182 // Return a hover button for the current event. |
| 182 - (NSButton*)hoverButtonForEvent:(NSEvent*)theEvent; | 183 - (NSButton*)hoverButtonForEvent:(NSEvent*)theEvent; |
| 183 @end | 184 @end |
| 184 | 185 |
| 185 #endif // CHROME_BROWSER_COCOA_TOOLBAR_CONTROLLER_H_ | 186 #endif // CHROME_BROWSER_COCOA_TOOLBAR_CONTROLLER_H_ |
| OLD | NEW |