| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 id<BookmarkURLOpener> bookmarkBarDelegate_; // weak | 43 id<BookmarkURLOpener> bookmarkBarDelegate_; // weak |
| 44 NSView* webContentView_; // weak; where the web goes | 44 NSView* webContentView_; // weak; where the web goes |
| 45 NSView* infoBarsView_; // weak; where the infobars go | 45 NSView* infoBarsView_; // weak; where the infobars go |
| 46 | 46 |
| 47 // Used for monitoring the optional toolbar button prefs. | 47 // Used for monitoring the optional toolbar button prefs. |
| 48 scoped_ptr<ToolbarControllerInternal::PrefObserverBridge> prefObserver_; | 48 scoped_ptr<ToolbarControllerInternal::PrefObserverBridge> prefObserver_; |
| 49 BooleanPrefMember showHomeButton_; | 49 BooleanPrefMember showHomeButton_; |
| 50 BooleanPrefMember showPageOptionButtons_; | 50 BooleanPrefMember showPageOptionButtons_; |
| 51 BOOL hasToolbar_; // if NO, we only have the location bar. | 51 BOOL hasToolbar_; // if NO, we only have the location bar. |
| 52 | 52 |
| 53 // We have an extra retain in the locationBar_. |
| 54 // See comments in awakeFromNib for more info. |
| 55 scoped_nsobject<AutocompleteTextField> locationBarRetainer_; |
| 56 |
| 53 IBOutlet NSMenu* pageMenu_; | 57 IBOutlet NSMenu* pageMenu_; |
| 54 IBOutlet NSMenu* wrenchMenu_; | 58 IBOutlet NSMenu* wrenchMenu_; |
| 55 | 59 |
| 56 // The ordering is important for unit tests. If new items are added or the | 60 // The ordering is important for unit tests. If new items are added or the |
| 57 // ordering is changed, make sure to update |-toolbarViews| and the | 61 // ordering is changed, make sure to update |-toolbarViews| and the |
| 58 // corresponding enum in the unit tests. | 62 // corresponding enum in the unit tests. |
| 59 IBOutlet NSButton* backButton_; | 63 IBOutlet NSButton* backButton_; |
| 60 IBOutlet NSButton* forwardButton_; | 64 IBOutlet NSButton* forwardButton_; |
| 61 IBOutlet NSButton* reloadButton_; | 65 IBOutlet NSButton* reloadButton_; |
| 62 IBOutlet NSButton* homeButton_; | 66 IBOutlet NSButton* homeButton_; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 123 |
| 120 // A set of private methods used by tests, in the absence of "friends" in ObjC. | 124 // A set of private methods used by tests, in the absence of "friends" in ObjC. |
| 121 @interface ToolbarController(PrivateTestMethods) | 125 @interface ToolbarController(PrivateTestMethods) |
| 122 // Returns an array of views in the order of the outlets above. | 126 // Returns an array of views in the order of the outlets above. |
| 123 - (NSArray*)toolbarViews; | 127 - (NSArray*)toolbarViews; |
| 124 - (void)showOptionalHomeButton; | 128 - (void)showOptionalHomeButton; |
| 125 - (void)showOptionalPageWrenchButtons; | 129 - (void)showOptionalPageWrenchButtons; |
| 126 @end | 130 @end |
| 127 | 131 |
| 128 #endif // CHROME_BROWSER_COCOA_TOOLBAR_CONTROLLER_H_ | 132 #endif // CHROME_BROWSER_COCOA_TOOLBAR_CONTROLLER_H_ |
| OLD | NEW |