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..28651778971151b23ffe85d9c60a8572dcc2ab9a 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); |
| + PlusDecoration(LocationBarViewMac* owner, |
| + CommandUpdater* command_updater, |
| + Browser* browser); |
|
Scott Hess - ex-Googler
2012/08/08 15:00:14
Double-check the style guide as to whether continu
beaudoin
2012/08/08 21:38:08
Done.
|
| virtual ~PlusDecoration(); |
| // Implement |LocationBarDecoration|. |
| @@ -25,11 +35,28 @@ class PlusDecoration : public ImageDecoration { |
| virtual NSString* GetToolTip() OVERRIDE; |
| private: |
| + // Creates a menu model and a menu controller. |
| + void CreateMenuController(); |
| + |
| + // 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_; |
| + // 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_; |
|
Scott Hess - ex-Googler
2012/08/08 15:00:14
Studly caps is for Objective-C files. Admittedly
beaudoin
2012/08/08 21:38:08
Done.
|
| + |
| + // Popup cell. |
|
Scott Hess - ex-Googler
2012/08/08 15:00:14
Redundant comments document things multiple times!
beaudoin
2012/08/08 21:38:08
Done.
|
| + scoped_nsobject<NSPopUpButtonCell> popUpCell_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(PlusDecoration); |
| }; |