Chromium Code Reviews| Index: chrome/browser/chromeos/status/clock_menu_button.h |
| diff --git a/chrome/browser/chromeos/status/clock_menu_button.h b/chrome/browser/chromeos/status/clock_menu_button.h |
| index 8221dcad8b21ec71c9ea373065ea74e496f4c120..7f6f25f5c77d214dbd37247fe65ed17e473b3886 100644 |
| --- a/chrome/browser/chromeos/status/clock_menu_button.h |
| +++ b/chrome/browser/chromeos/status/clock_menu_button.h |
| @@ -13,7 +13,7 @@ |
| #include "chrome/browser/chromeos/status/status_area_button.h" |
| #include "unicode/calendar.h" |
| #include "views/controls/button/menu_button.h" |
| -#include "views/controls/menu/menu_2.h" |
| +#include "views/controls/menu/menu_delegate.h" |
| #include "views/controls/menu/view_menu_delegate.h" |
| namespace chromeos { |
| @@ -23,35 +23,18 @@ class StatusAreaHost; |
| // The clock menu button in the status area. |
| // This button shows the current time. |
| class ClockMenuButton : public StatusAreaButton, |
| + public views::MenuDelegate, |
| public views::ViewMenuDelegate, |
| - public ui::MenuModel, |
| public PowerLibrary::Observer, |
| public SystemLibrary::Observer { |
| public: |
| explicit ClockMenuButton(StatusAreaHost* host); |
| virtual ~ClockMenuButton(); |
| - // ui::MenuModel implementation. |
| - virtual bool HasIcons() const { return false; } |
| - virtual int GetItemCount() const; |
| - virtual ui::MenuModel::ItemType GetTypeAt(int index) const; |
| - virtual int GetCommandIdAt(int index) const { return index; } |
| - virtual string16 GetLabelAt(int index) const; |
| - virtual bool IsItemDynamicAt(int index) const { return true; } |
| - virtual bool GetAcceleratorAt(int index, |
| - ui::Accelerator* accelerator) const { return false; } |
| - virtual bool IsItemCheckedAt(int index) const { return false; } |
| - virtual int GetGroupIdAt(int index) const { return 0; } |
| - virtual bool GetIconAt(int index, SkBitmap* icon) { return false; } |
| - virtual ui::ButtonMenuItemModel* GetButtonMenuItemAt(int index) const { |
| - return NULL; |
| - } |
| - virtual bool IsEnabledAt(int index) const; |
| - virtual ui::MenuModel* GetSubmenuModelAt(int index) const { return NULL; } |
| - virtual void HighlightChangedTo(int index) {} |
| - virtual void ActivatedAt(int index); |
| - virtual void MenuWillShow() {} |
| - virtual void SetMenuModelDelegate(ui::MenuModelDelegate* delegate) {} |
| + // views::MenuDelegate implementation |
| + virtual std::wstring GetLabel(int id) const; |
|
oshima
2011/04/14 17:27:31
include compiler_specific.h and add
OVERRIDE
(or
rhashimoto
2011/04/14 18:27:04
Done.
|
| + virtual bool IsCommandEnabled(int id) const; |
| + virtual void ExecuteCommand(int id); |
| // Overridden from ResumeLibrary::Observer: |
| virtual void PowerChanged(PowerLibrary* obj) {} |
| @@ -79,7 +62,7 @@ class ClockMenuButton : public StatusAreaButton, |
| // The clock menu. |
| // NOTE: we use a scoped_ptr here as menu calls into 'this' from the |
| // constructor. |
| - scoped_ptr<views::Menu2> clock_menu_; |
| + scoped_ptr<views::MenuItemView> menu_; |
| StatusAreaHost* host_; |