| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
| 10 | 10 |
| 11 #include "base/scoped_ptr.h" | 11 #include "base/scoped_ptr.h" |
| 12 #include "base/scoped_nsobject.h" | 12 #include "base/scoped_nsobject.h" |
| 13 #import "chrome/browser/ui/cocoa/command_observer_bridge.h" | 13 #import "chrome/browser/ui/cocoa/command_observer_bridge.h" |
| 14 #import "chrome/browser/ui/cocoa/tracking_area.h" |
| 14 #import "chrome/browser/ui/cocoa/url_drop_target.h" | 15 #import "chrome/browser/ui/cocoa/url_drop_target.h" |
| 15 #import "chrome/browser/ui/cocoa/view_resizer.h" | 16 #import "chrome/browser/ui/cocoa/view_resizer.h" |
| 16 #include "chrome/browser/prefs/pref_member.h" | 17 #include "chrome/browser/prefs/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; |
| 22 class Browser; | 23 class Browser; |
| 23 @class BrowserActionsController; | 24 @class BrowserActionsController; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 BooleanPrefMember showPageOptionButtons_; | 83 BooleanPrefMember showPageOptionButtons_; |
| 83 BOOL hasToolbar_; // If NO, we may have only the location bar. | 84 BOOL hasToolbar_; // If NO, we may have only the location bar. |
| 84 BOOL hasLocationBar_; // If |hasToolbar_| is YES, this must also be YES. | 85 BOOL hasLocationBar_; // If |hasToolbar_| is YES, this must also be YES. |
| 85 BOOL locationBarAtMinSize_; // If the location bar is at the minimum size. | 86 BOOL locationBarAtMinSize_; // If the location bar is at the minimum size. |
| 86 | 87 |
| 87 // We have an extra retain in the locationBar_. | 88 // We have an extra retain in the locationBar_. |
| 88 // See comments in awakeFromNib for more info. | 89 // See comments in awakeFromNib for more info. |
| 89 scoped_nsobject<AutocompleteTextField> locationBarRetainer_; | 90 scoped_nsobject<AutocompleteTextField> locationBarRetainer_; |
| 90 | 91 |
| 91 // Tracking area for mouse enter/exit/moved in the toolbar. | 92 // Tracking area for mouse enter/exit/moved in the toolbar. |
| 92 scoped_nsobject<NSTrackingArea> trackingArea_; | 93 ScopedCrTrackingArea trackingArea_; |
| 93 | 94 |
| 94 // We retain/release the hover button since interaction with the | 95 // We retain/release the hover button since interaction with the |
| 95 // button may make it go away (e.g. delete menu option over a | 96 // button may make it go away (e.g. delete menu option over a |
| 96 // bookmark button). Thus this variable is not weak. The | 97 // bookmark button). Thus this variable is not weak. The |
| 97 // hoveredButton_ is required to have an NSCell that responds to | 98 // hoveredButton_ is required to have an NSCell that responds to |
| 98 // setMouseInside:animate:. | 99 // setMouseInside:animate:. |
| 99 NSButton* hoveredButton_; | 100 NSButton* hoveredButton_; |
| 100 } | 101 } |
| 101 | 102 |
| 102 // Initialize the toolbar and register for command updates. The profile is | 103 // Initialize the toolbar and register for command updates. The profile is |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 // Returns an array of views in the order of the outlets above. | 179 // Returns an array of views in the order of the outlets above. |
| 179 - (NSArray*)toolbarViews; | 180 - (NSArray*)toolbarViews; |
| 180 - (void)showOptionalHomeButton; | 181 - (void)showOptionalHomeButton; |
| 181 - (void)installWrenchMenu; | 182 - (void)installWrenchMenu; |
| 182 - (WrenchMenuController*)wrenchMenuController; | 183 - (WrenchMenuController*)wrenchMenuController; |
| 183 // Return a hover button for the current event. | 184 // Return a hover button for the current event. |
| 184 - (NSButton*)hoverButtonForEvent:(NSEvent*)theEvent; | 185 - (NSButton*)hoverButtonForEvent:(NSEvent*)theEvent; |
| 185 @end | 186 @end |
| 186 | 187 |
| 187 #endif // CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_ | 188 #endif // CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_ |
| OLD | NEW |