summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/toolbar_controller.h
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-07 18:34:55 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-07 18:34:55 +0000
commit630559915695886f8239fc0748aad03c9596bb9e (patch)
tree60737a2f1983ec8bd5b678a473721efa142f8d72 /chrome/browser/cocoa/toolbar_controller.h
parente91a617485ddf9fa6fd151a777f012a1ab5f43eb (diff)
downloadchromium_src-630559915695886f8239fc0748aad03c9596bb9e.zip
chromium_src-630559915695886f8239fc0748aad03c9596bb9e.tar.gz
chromium_src-630559915695886f8239fc0748aad03c9596bb9e.tar.bz2
Implement back/forward toolbar menus on Mac (bug 13203).
Note: The drop-down menu is actually a drag-down (activating on click-hold or on drag), working much like Safari's (and other Apple apps, such as Dictionary). This can be changed to a pop-down if that's what's desired. TODO: Show keyboard shortcut for "Show Full History". Patch by viettrungluu. BUG=http://crbug.com/13203 TEST=Navigate around, check out and use the menus; do so in multiple tabs and windows. Review URL: http://codereview.chromium.org/160496 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22740 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/toolbar_controller.h')
-rw-r--r--chrome/browser/cocoa/toolbar_controller.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/chrome/browser/cocoa/toolbar_controller.h b/chrome/browser/cocoa/toolbar_controller.h
index 0e33048..c5135d3 100644
--- a/chrome/browser/cocoa/toolbar_controller.h
+++ b/chrome/browser/cocoa/toolbar_controller.h
@@ -11,11 +11,15 @@
#include "base/scoped_nsobject.h"
#import "chrome/browser/cocoa/command_observer_bridge.h"
#import "chrome/browser/cocoa/bookmark_bar_controller.h"
+#import "chrome/browser/cocoa/delayedmenu_button.h"
#import "chrome/browser/cocoa/view_resizer.h"
#include "chrome/common/pref_member.h"
@class AutocompleteTextField;
@class AutocompleteTextFieldEditor;
+@class DelayedMenuButton;
+@class BackForwardMenuController;
+class Browser;
class CommandUpdater;
class LocationBar;
class LocationBarViewMac;
@@ -38,12 +42,15 @@ class ToolbarView;
ToolbarModel* toolbarModel_; // weak, one per window
CommandUpdater* commands_; // weak, one per window
Profile* profile_; // weak, one per window
+ Browser* browser_; // weak, one per window
scoped_ptr<CommandObserverBridge> commandObserver_;
scoped_ptr<LocationBarViewMac> locationBarView_;
scoped_nsobject<AutocompleteTextFieldEditor> autocompleteTextFieldEditor_;
scoped_nsobject<BookmarkBarController> bookmarkBarController_;
id<ViewResizer> resizeDelegate_; // weak
id<BookmarkURLOpener> bookmarkBarDelegate_; // weak
+ scoped_nsobject<BackForwardMenuController> backMenuController_;
+ scoped_nsobject<BackForwardMenuController> forwardMenuController_;
// Used for monitoring the optional toolbar button prefs.
scoped_ptr<ToolbarControllerInternal::PrefObserverBridge> prefObserver_;
@@ -61,8 +68,8 @@ class ToolbarView;
// 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 DelayedMenuButton* backButton_;
+ IBOutlet DelayedMenuButton* forwardButton_;
IBOutlet NSButton* reloadButton_;
IBOutlet NSButton* homeButton_;
IBOutlet NSButton* starButton_;
@@ -73,10 +80,12 @@ class ToolbarView;
}
// Initialize the toolbar and register for command updates. The profile is
-// needed for initializing the location bar.
+// needed for initializing the location bar. The browser is needed for
+// initializing the back/forward menus.
- (id)initWithModel:(ToolbarModel*)model
commands:(CommandUpdater*)commands
profile:(Profile*)profile
+ browser:(Browser*)browser
resizeDelegate:(id<ViewResizer>)resizeDelegate
bookmarkDelegate:(id<BookmarkURLOpener>)delegate;