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

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: Made model and controller method-scoped. Created 8 years, 4 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..484de3366541b66063b8a0264623791a6ae54dc1 100644
--- a/chrome/browser/ui/cocoa/location_bar/plus_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/plus_decoration.h
@@ -7,16 +7,21 @@
#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;
// 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);
+ PlusDecoration(LocationBarViewMac* owner,
+ CommandUpdater* command_updater,
+ Browser* browser);
virtual ~PlusDecoration();
// Implement |LocationBarDecoration|.
@@ -25,11 +30,18 @@ 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_;
+ scoped_nsobject<NSPopUpButtonCell> pop_up_cell_;
+
DISALLOW_COPY_AND_ASSIGN(PlusDecoration);
};

Powered by Google App Engine
This is Rietveld 408576698