| 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_AREA_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_AREA_BUTTON_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_STATUS_AREA_BUTTON_H_ | 6 #define CHROME_BROWSER_CHROMEOS_STATUS_AREA_BUTTON_H_ |
| 7 | 7 |
| 8 #include "views/controls/button/menu_button.h" | 8 #include "views/controls/button/menu_button.h" |
| 9 #include "views/controls/menu/view_menu_delegate.h" | 9 #include "views/controls/menu/view_menu_delegate.h" |
| 10 | 10 |
| 11 namespace chromeos { |
| 12 |
| 11 // Button to be used to represent status and allow menus to be popped up. | 13 // Button to be used to represent status and allow menus to be popped up. |
| 12 // Shows current button state by drawing a border around the current icon. | 14 // Shows current button state by drawing a border around the current icon. |
| 13 class StatusAreaButton : public views::MenuButton { | 15 class StatusAreaButton : public views::MenuButton { |
| 14 public: | 16 public: |
| 15 explicit StatusAreaButton(views::ViewMenuDelegate* menu_delegate); | 17 explicit StatusAreaButton(views::ViewMenuDelegate* menu_delegate); |
| 16 virtual ~StatusAreaButton() {} | 18 virtual ~StatusAreaButton() {} |
| 17 virtual void Paint(gfx::Canvas* canvas, bool for_drag); | 19 virtual void Paint(gfx::Canvas* canvas, bool for_drag); |
| 18 | 20 |
| 19 protected: | 21 protected: |
| 20 // Draws the icon for this status area button on the canvas. | 22 // Draws the icon for this status area button on the canvas. |
| 21 // Subclasses should override this method if they need to draw their own icon. | 23 // Subclasses should override this method if they need to draw their own icon. |
| 22 // Otherwise, just call SetIcon() and the it will be handled for you. | 24 // Otherwise, just call SetIcon() and the it will be handled for you. |
| 23 virtual void DrawIcon(gfx::Canvas* canvas); | 25 virtual void DrawIcon(gfx::Canvas* canvas); |
| 24 | 26 |
| 25 DISALLOW_COPY_AND_ASSIGN(StatusAreaButton); | 27 DISALLOW_COPY_AND_ASSIGN(StatusAreaButton); |
| 26 }; | 28 }; |
| 27 | 29 |
| 30 } // namespace chromeos |
| 31 |
| 28 #endif // CHROME_BROWSER_CHROMEOS_STATUS_AREA_BUTTON_H_ | 32 #endif // CHROME_BROWSER_CHROMEOS_STATUS_AREA_BUTTON_H_ |
| OLD | NEW |