| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_POWER_MENU_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_POWER_MENU_BUTTON_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_STATUS_POWER_MENU_BUTTON_H_ | 6 #define CHROME_BROWSER_CHROMEOS_STATUS_POWER_MENU_BUTTON_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/chromeos/cros/power_library.h" | 9 #include "chrome/browser/chromeos/cros/power_library.h" |
| 10 #include "chrome/browser/chromeos/status/status_area_button.h" | 10 #include "chrome/browser/chromeos/status/status_area_button.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 virtual bool HasIcons() const { return false; } | 34 virtual bool HasIcons() const { return false; } |
| 35 virtual int GetItemCount() const; | 35 virtual int GetItemCount() const; |
| 36 virtual ui::MenuModel::ItemType GetTypeAt(int index) const; | 36 virtual ui::MenuModel::ItemType GetTypeAt(int index) const; |
| 37 virtual int GetCommandIdAt(int index) const { return index; } | 37 virtual int GetCommandIdAt(int index) const { return index; } |
| 38 virtual string16 GetLabelAt(int index) const; | 38 virtual string16 GetLabelAt(int index) const; |
| 39 virtual bool IsItemDynamicAt(int index) const { return true; } | 39 virtual bool IsItemDynamicAt(int index) const { return true; } |
| 40 virtual bool GetAcceleratorAt(int index, | 40 virtual bool GetAcceleratorAt(int index, |
| 41 ui::Accelerator* accelerator) const { return false; } | 41 ui::Accelerator* accelerator) const { return false; } |
| 42 virtual bool IsItemCheckedAt(int index) const { return false; } | 42 virtual bool IsItemCheckedAt(int index) const { return false; } |
| 43 virtual int GetGroupIdAt(int index) const { return 0; } | 43 virtual int GetGroupIdAt(int index) const { return 0; } |
| 44 virtual bool GetIconAt(int index, SkBitmap* icon) const { return false; } | 44 virtual bool GetIconAt(int index, SkBitmap* icon) { return false; } |
| 45 virtual ui::ButtonMenuItemModel* GetButtonMenuItemAt(int index) const { | 45 virtual ui::ButtonMenuItemModel* GetButtonMenuItemAt(int index) const { |
| 46 return NULL; | 46 return NULL; |
| 47 } | 47 } |
| 48 virtual bool IsEnabledAt(int index) const { return false; } | 48 virtual bool IsEnabledAt(int index) const { return false; } |
| 49 virtual ui::MenuModel* GetSubmenuModelAt(int index) const { return NULL; } | 49 virtual ui::MenuModel* GetSubmenuModelAt(int index) const { return NULL; } |
| 50 virtual void HighlightChangedTo(int index) {} | 50 virtual void HighlightChangedTo(int index) {} |
| 51 virtual void ActivatedAt(int index) {} | 51 virtual void ActivatedAt(int index) {} |
| 52 virtual void MenuWillShow() {} | 52 virtual void MenuWillShow() {} |
| 53 virtual void SetMenuModelDelegate(ui::MenuModelDelegate* delegate) {} |
| 53 | 54 |
| 54 // PowerLibrary::Observer implementation. | 55 // PowerLibrary::Observer implementation. |
| 55 virtual void PowerChanged(PowerLibrary* obj); | 56 virtual void PowerChanged(PowerLibrary* obj); |
| 56 virtual void SystemResumed() {} | 57 virtual void SystemResumed() {} |
| 57 | 58 |
| 58 int icon_id() const { return icon_id_; } | 59 int icon_id() const { return icon_id_; } |
| 59 | 60 |
| 60 protected: | 61 protected: |
| 61 virtual int icon_width() { return 26; } | 62 virtual int icon_width() { return 26; } |
| 62 | 63 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 84 // The power menu. This needs to be initialized last since it calls into | 85 // The power menu. This needs to be initialized last since it calls into |
| 85 // GetLabelAt() during construction. | 86 // GetLabelAt() during construction. |
| 86 views::Menu2 power_menu_; | 87 views::Menu2 power_menu_; |
| 87 | 88 |
| 88 DISALLOW_COPY_AND_ASSIGN(PowerMenuButton); | 89 DISALLOW_COPY_AND_ASSIGN(PowerMenuButton); |
| 89 }; | 90 }; |
| 90 | 91 |
| 91 } // namespace chromeos | 92 } // namespace chromeos |
| 92 | 93 |
| 93 #endif // CHROME_BROWSER_CHROMEOS_STATUS_POWER_MENU_BUTTON_H_ | 94 #endif // CHROME_BROWSER_CHROMEOS_STATUS_POWER_MENU_BUTTON_H_ |
| OLD | NEW |