summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/toolbar_controller.h
diff options
context:
space:
mode:
authorpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-09 19:56:30 +0000
committerpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-09 19:56:30 +0000
commit273865aa130f61f321d3eeafc0ea5a2a6dc9adf8 (patch)
tree05b9f5275ef0a0c63592f9b1102235aead02b59d /chrome/browser/cocoa/toolbar_controller.h
parent12c7b1eaa34937a72c8b81de17fdb5c72d842431 (diff)
downloadchromium_src-273865aa130f61f321d3eeafc0ea5a2a6dc9adf8.zip
chromium_src-273865aa130f61f321d3eeafc0ea5a2a6dc9adf8.tar.gz
chromium_src-273865aa130f61f321d3eeafc0ea5a2a6dc9adf8.tar.bz2
Share the code that builds the page menu in a common model, make Mac and Win use it. Implement a mac menu controller that takes this model and generates an NSMenu. Remove the Page Menu NSMenu from Toolbar.xib since it's now created in code.
BUG=22646 TEST=page menu should work as before Review URL: http://codereview.chromium.org/465130 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34179 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/toolbar_controller.h')
-rw-r--r--chrome/browser/cocoa/toolbar_controller.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/toolbar_controller.h b/chrome/browser/cocoa/toolbar_controller.h
index 3801667..dfbe5bf 100644
--- a/chrome/browser/cocoa/toolbar_controller.h
+++ b/chrome/browser/cocoa/toolbar_controller.h
@@ -25,7 +25,10 @@ class CommandUpdater;
class LocationBar;
class LocationBarViewMac;
@class MenuButton;
+@class MenuController;
+class PageMenuModel;
namespace ToolbarControllerInternal {
+class MenuDelegate;
class PrefObserverBridge;
}
class Profile;
@@ -52,6 +55,13 @@ class ToolbarModel;
scoped_nsobject<BackForwardMenuController> forwardMenuController_;
scoped_nsobject<BrowserActionsController> browserActionsController_;
+ // Lazily-instantiated model, controller, and delegate for the menu on the
+ // page button. If it's visible, these will be non-null, but they are not
+ // reaped when the button is hidden once it is initially shown.
+ scoped_ptr<PageMenuModel> pageMenuModel_;
+ scoped_nsobject<MenuController> pageMenuController_;
+ scoped_ptr<ToolbarControllerInternal::MenuDelegate> pageMenuDelegate_;
+
// Used for monitoring the optional toolbar button prefs.
scoped_ptr<ToolbarControllerInternal::PrefObserverBridge> prefObserver_;
// Used to position the omnibox bubble.
@@ -86,7 +96,6 @@ class ToolbarModel;
IBOutlet MenuButton* pageButton_;
IBOutlet MenuButton* wrenchButton_;
IBOutlet AutocompleteTextField* locationBar_;
- IBOutlet NSMenu* encodingMenu_;
IBOutlet NSView* browserActionContainerView_;
}