Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1266)

Unified Diff: chrome/browser/cocoa/toolbar_controller.h

Issue 155151: Hook up the prefs for the optional home buttons and page/wrench buttons. Move... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/cocoa/toolbar_controller.h
===================================================================
--- chrome/browser/cocoa/toolbar_controller.h (revision 20018)
+++ chrome/browser/cocoa/toolbar_controller.h (working copy)
@@ -10,10 +10,14 @@
#include "base/scoped_ptr.h"
#include "base/scoped_nsobject.h"
#import "chrome/browser/cocoa/command_observer_bridge.h"
+#include "chrome/common/pref_member.h"
class CommandUpdater;
class LocationBar;
class LocationBarViewMac;
+namespace ToolbarControllerInternal {
+class PrefObserverBridge;
+}
class Profile;
class TabContents;
class ToolbarModel;
@@ -40,14 +44,25 @@
scoped_ptr<LocationBarViewMac> locationBarView_;
scoped_nsobject<LocationBarFieldEditor> locationBarFieldEditor_; // strong
+ // Used for monitoring the optional toolbar button prefs.
+ scoped_ptr<ToolbarControllerInternal::PrefObserverBridge> prefObserver_;
+ BooleanPrefMember showHomeButton_;
+ BooleanPrefMember showPageOptionButtons_;
+
+ IBOutlet NSMenu* pageMenu_;
+ IBOutlet NSMenu* wrenchMenu_;
+
// The ordering is important for unit tests. If new items are added or the
// ordering is changed, make sure to update |-toolbarViews| and the
// corresponding enum in the unit tests.
IBOutlet NSButton* backButton_;
IBOutlet NSButton* forwardButton_;
IBOutlet NSButton* reloadButton_;
+ IBOutlet NSButton* homeButton_;
IBOutlet NSButton* starButton_;
IBOutlet NSButton* goButton_;
+ IBOutlet NSButton* pageButton_;
+ IBOutlet NSButton* wrenchButton_;
IBOutlet NSTextField* locationBar_;
}
@@ -83,12 +98,19 @@
// state.
- (void)setIsLoading:(BOOL)isLoading;
+// Actions for the optional menu buttons for the page and wrench menus. These
+// will show a menu while the mouse is down.
+- (IBAction)showPageMenu:(id)sender;
+- (IBAction)showWrenchMenu:(id)sender;
+
@end
// A set of private methods used by tests, in the absence of "friends" in ObjC.
@interface ToolbarController(PrivateTestMethods)
// Returns an array of views in the order of the outlets above.
- (NSArray*)toolbarViews;
+- (void)showOptionalHomeButton;
+- (void)showOptionalPageWrenchButtons;
@end
#endif // CHROME_BROWSER_COCOA_TOOLBAR_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698