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

Unified Diff: chrome/browser/ui/cocoa/location_bar/plus_decoration.h

Issue 10833056: Add a menu to the Action Box Button. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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/ui/cocoa/location_bar/plus_decoration.h
diff --git a/chrome/browser/ui/cocoa/location_bar/plus_decoration.h b/chrome/browser/ui/cocoa/location_bar/plus_decoration.h
index 519dc320f7797bb0bd8773575ab3c94e127226a3..e8f839cbada6cfc725b5a571d92de5ff129e6bc0 100644
--- a/chrome/browser/ui/cocoa/location_bar/plus_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/plus_decoration.h
@@ -7,16 +7,26 @@
#import <Cocoa/Cocoa.h>
+#include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/cocoa/location_bar/image_decoration.h"
+class Browser;
class CommandUpdater;
+class LocationBarViewMac;
+@class MenuController;
+
+namespace ui {
+class SimpleMenuModel;
+} // namespace ui
// Note: this file is under development (see crbug.com/138118).
// Plus icon on the right side of the location bar.
class PlusDecoration : public ImageDecoration {
public:
- explicit PlusDecoration(CommandUpdater* command_updater);
+ explicit PlusDecoration(LocationBarViewMac* owner,
+ CommandUpdater* command_updater,
+ Browser* browser);
Scott Hess - ex-Googler 2012/07/27 20:31:06 Can drop explicit then.
beaudoin 2012/08/01 02:23:26 Done.
virtual ~PlusDecoration();
// Implement |LocationBarDecoration|.
@@ -25,11 +35,25 @@ class PlusDecoration : public ImageDecoration {
virtual NSString* GetToolTip() OVERRIDE;
private:
+ // Owner of the decoration, used to obtain the menu.
+ LocationBarViewMac* owner_;
+
CommandUpdater* command_updater_; // Weak, owned by Browser.
+ Browser* browser_;
+
// The string to show for a tooltip.
scoped_nsobject<NSString> tooltip_;
+ // Popup cell.
+ scoped_nsobject<NSPopUpButtonCell> popUpCell_;
Scott Hess - ex-Googler 2012/07/27 20:31:06 Probably want this one after menuController_ so th
beaudoin 2012/08/01 02:23:26 Done.
+
+ // Model for the menu attached to the plus decoration.
+ scoped_ptr<ui::SimpleMenuModel> menu_model_;
+
+ // Controller for the menu attached to the plus decoration.
+ scoped_nsobject<MenuController> menuController_;
+
DISALLOW_COPY_AND_ASSIGN(PlusDecoration);
};

Powered by Google App Engine
This is Rietveld 408576698