Index: ash/system/tray/tray_views.h |
diff --git a/ash/system/tray/tray_views.h b/ash/system/tray/tray_views.h |
index e1e612d0614a2ba0b7f8564f2c7ae29391ff0bb8..8598d951da977ab14669c2869d77e9a7a58b5dc9 100644 |
--- a/ash/system/tray/tray_views.h |
+++ b/ash/system/tray/tray_views.h |
@@ -8,6 +8,7 @@ |
#include "ash/ash_export.h" |
#include "ui/gfx/font.h" |
#include "ui/gfx/size.h" |
+#include "ui/views/controls/button/custom_button.h" |
#include "ui/views/controls/button/image_button.h" |
#include "ui/views/controls/button/text_button.h" |
#include "ui/views/controls/image_view.h" |
@@ -227,6 +228,33 @@ class TrayPopupHeaderButton : public views::ToggleImageButton { |
DISALLOW_COPY_AND_ASSIGN(TrayPopupHeaderButton); |
}; |
+// A button with a bar image and title text below the bar image. These buttons |
+// will be used in audio and brightness control UI, which can be toggled with |
+// on/off states. |
+class TrayBarButtonWithTitle : public views::CustomButton { |
+ public: |
+ explicit TrayBarButtonWithTitle(views::ButtonListener* listener, |
sadrul
2012/07/23 21:02:30
explicit not needed
jennyz
2012/07/23 21:22:03
Done.
|
+ int title_id, |
+ int width); |
+ virtual ~TrayBarButtonWithTitle(); |
+ |
+ // Overridden from views::View: |
+ virtual gfx::Size GetPreferredSize() OVERRIDE; |
+ virtual void Layout() OVERRIDE; |
+ |
+ void UpdateButton(bool control_on); |
+ |
+ private: |
+ class TrayBarButton; |
+ |
+ TrayBarButton* image_; |
+ views::Label* title_; |
+ int width_; |
+ int image_height_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(TrayBarButtonWithTitle); |
+}; |
+ |
// The 'special' looking row in the uber-tray popups. This is usually the bottom |
// row in the popups, and has a fixed height. |
class SpecialPopupRow : public views::View { |