| OLD | NEW |
| 1 // Copyright (c) 2009 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/command_observer_bridge.h" | 12 #import "chrome/browser/cocoa/command_observer_bridge.h" |
| 13 #import "chrome/browser/cocoa/delayedmenu_button.h" | 13 #import "chrome/browser/cocoa/delayedmenu_button.h" |
| 14 #import "chrome/browser/cocoa/url_drop_target.h" | 14 #import "chrome/browser/cocoa/url_drop_target.h" |
| 15 #import "chrome/browser/cocoa/view_resizer.h" | 15 #import "chrome/browser/cocoa/view_resizer.h" |
| 16 #include "chrome/browser/pref_member.h" | 16 #include "chrome/browser/pref_member.h" |
| 17 | 17 |
| 18 class AppMenuModel; | 18 class AppMenuModel; |
| 19 @class AutocompleteTextField; | 19 @class AutocompleteTextField; |
| 20 @class AutocompleteTextFieldEditor; | 20 @class AutocompleteTextFieldEditor; |
| 21 @class BrowserActionsContainerView; | 21 @class BrowserActionsContainerView; |
| 22 @class BackForwardMenuController; | 22 @class BackForwardMenuController; |
| 23 class Browser; | 23 class Browser; |
| 24 @class BrowserActionsController; | 24 @class BrowserActionsController; |
| 25 class BubblePositioner; | |
| 26 class CommandUpdater; | 25 class CommandUpdater; |
| 27 @class DelayedMenuButton; | 26 @class DelayedMenuButton; |
| 28 class LocationBar; | 27 class LocationBar; |
| 29 class LocationBarViewMac; | 28 class LocationBarViewMac; |
| 30 @class MenuButton; | 29 @class MenuButton; |
| 31 @class MenuController; | 30 @class MenuController; |
| 32 class PageMenuModel; | 31 class PageMenuModel; |
| 33 namespace ToolbarControllerInternal { | 32 namespace ToolbarControllerInternal { |
| 34 class MenuDelegate; | 33 class MenuDelegate; |
| 35 class PrefObserverBridge; | 34 class PrefObserverBridge; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 63 // it's visible, these will be non-null, but they are not reaped when the | 62 // it's visible, these will be non-null, but they are not reaped when the |
| 64 // button is hidden once it is initially shown. | 63 // button is hidden once it is initially shown. |
| 65 scoped_ptr<PageMenuModel> pageMenuModel_; | 64 scoped_ptr<PageMenuModel> pageMenuModel_; |
| 66 scoped_nsobject<MenuController> pageMenuController_; | 65 scoped_nsobject<MenuController> pageMenuController_; |
| 67 scoped_ptr<ToolbarControllerInternal::MenuDelegate> menuDelegate_; | 66 scoped_ptr<ToolbarControllerInternal::MenuDelegate> menuDelegate_; |
| 68 scoped_ptr<AppMenuModel> appMenuModel_; | 67 scoped_ptr<AppMenuModel> appMenuModel_; |
| 69 scoped_nsobject<MenuController> appMenuController_; | 68 scoped_nsobject<MenuController> appMenuController_; |
| 70 | 69 |
| 71 // Used for monitoring the optional toolbar button prefs. | 70 // Used for monitoring the optional toolbar button prefs. |
| 72 scoped_ptr<ToolbarControllerInternal::PrefObserverBridge> prefObserver_; | 71 scoped_ptr<ToolbarControllerInternal::PrefObserverBridge> prefObserver_; |
| 73 // Used to position the omnibox bubble. | |
| 74 scoped_ptr<BubblePositioner> bubblePositioner_; | |
| 75 BooleanPrefMember showHomeButton_; | 72 BooleanPrefMember showHomeButton_; |
| 76 BooleanPrefMember showPageOptionButtons_; | 73 BooleanPrefMember showPageOptionButtons_; |
| 77 BOOL hasToolbar_; // If NO, we may have only the location bar. | 74 BOOL hasToolbar_; // If NO, we may have only the location bar. |
| 78 BOOL hasLocationBar_; // If |hasToolbar_| is YES, this must also be YES. | 75 BOOL hasLocationBar_; // If |hasToolbar_| is YES, this must also be YES. |
| 79 BOOL locationBarAtMinSize_; // If the location bar is at the minimum size. | 76 BOOL locationBarAtMinSize_; // If the location bar is at the minimum size. |
| 80 | 77 |
| 81 // We have an extra retain in the locationBar_. | 78 // We have an extra retain in the locationBar_. |
| 82 // See comments in awakeFromNib for more info. | 79 // See comments in awakeFromNib for more info. |
| 83 scoped_nsobject<AutocompleteTextField> locationBarRetainer_; | 80 scoped_nsobject<AutocompleteTextField> locationBarRetainer_; |
| 84 | 81 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 // Return the BrowserActionsController for this toolbar. | 161 // Return the BrowserActionsController for this toolbar. |
| 165 - (BrowserActionsController*)browserActionsController; | 162 - (BrowserActionsController*)browserActionsController; |
| 166 @end | 163 @end |
| 167 | 164 |
| 168 // A set of private methods used by tests, in the absence of "friends" in ObjC. | 165 // A set of private methods used by tests, in the absence of "friends" in ObjC. |
| 169 @interface ToolbarController(PrivateTestMethods) | 166 @interface ToolbarController(PrivateTestMethods) |
| 170 // Returns an array of views in the order of the outlets above. | 167 // Returns an array of views in the order of the outlets above. |
| 171 - (NSArray*)toolbarViews; | 168 - (NSArray*)toolbarViews; |
| 172 - (void)showOptionalHomeButton; | 169 - (void)showOptionalHomeButton; |
| 173 - (void)showOptionalPageWrenchButtons; | 170 - (void)showOptionalPageWrenchButtons; |
| 174 - (gfx::Rect)locationStackBounds; | |
| 175 // Return a hover button for the current event. | 171 // Return a hover button for the current event. |
| 176 - (NSButton*)hoverButtonForEvent:(NSEvent*)theEvent; | 172 - (NSButton*)hoverButtonForEvent:(NSEvent*)theEvent; |
| 177 @end | 173 @end |
| 178 | 174 |
| 179 #endif // CHROME_BROWSER_COCOA_TOOLBAR_CONTROLLER_H_ | 175 #endif // CHROME_BROWSER_COCOA_TOOLBAR_CONTROLLER_H_ |
| OLD | NEW |