| 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_POWER_MENU_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POWER_MENU_BUTTON_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_POWER_MENU_BUTTON_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POWER_MENU_BUTTON_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/chromeos/cros_power_library.h" | 8 #include "chrome/browser/chromeos/cros_power_library.h" |
| 9 #include "views/controls/button/menu_button.h" | 9 #include "views/controls/button/menu_button.h" |
| 10 #include "views/controls/menu/menu_2.h" | 10 #include "views/controls/menu/menu_2.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 virtual Menu2Model* GetSubmenuModelAt(int index) const { return NULL; } | 40 virtual Menu2Model* GetSubmenuModelAt(int index) const { return NULL; } |
| 41 virtual void HighlightChangedTo(int index) {} | 41 virtual void HighlightChangedTo(int index) {} |
| 42 virtual void ActivatedAt(int index) {} | 42 virtual void ActivatedAt(int index) {} |
| 43 virtual void MenuWillShow() {} | 43 virtual void MenuWillShow() {} |
| 44 | 44 |
| 45 // CrosPowerLibrary::Observer implementation. | 45 // CrosPowerLibrary::Observer implementation. |
| 46 virtual void PowerChanged(CrosPowerLibrary* obj); | 46 virtual void PowerChanged(CrosPowerLibrary* obj); |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 // views::ViewMenuDelegate implementation. | 49 // views::ViewMenuDelegate implementation. |
| 50 virtual void RunMenu(views::View* source, const gfx::Point& pt, | 50 virtual void RunMenu(views::View* source, const gfx::Point& pt); |
| 51 gfx::NativeView hwnd); | |
| 52 | 51 |
| 53 // Update the power icon depending on the power status. | 52 // Update the power icon depending on the power status. |
| 54 void UpdateIcon(); | 53 void UpdateIcon(); |
| 55 | 54 |
| 56 // The number of power images. | 55 // The number of power images. |
| 57 static const int kNumPowerImages; | 56 static const int kNumPowerImages; |
| 58 | 57 |
| 59 // The power menu. | 58 // The power menu. |
| 60 views::Menu2 power_menu_; | 59 views::Menu2 power_menu_; |
| 61 | 60 |
| 62 DISALLOW_COPY_AND_ASSIGN(PowerMenuButton); | 61 DISALLOW_COPY_AND_ASSIGN(PowerMenuButton); |
| 63 }; | 62 }; |
| 64 | 63 |
| 65 #endif // CHROME_BROWSER_CHROMEOS_POWER_MENU_BUTTON_H_ | 64 #endif // CHROME_BROWSER_CHROMEOS_POWER_MENU_BUTTON_H_ |
| OLD | NEW |