Chromium Code Reviews| 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); |
| }; |