Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Unified Diff: ash/system/tray/tray_views.h

Issue 10808080: Implement new volume mute button. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/tray/tray_constants.cc ('k') | ash/system/tray/tray_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e78f29aa8ee43a2e89a321f4acffc27aa26a2bd1 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:
+ TrayBarButtonWithTitle(views::ButtonListener* listener,
+ 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 {
« no previous file with comments | « ash/system/tray/tray_constants.cc ('k') | ash/system/tray/tray_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698