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

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: 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
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 {

Powered by Google App Engine
This is Rietveld 408576698