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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/system/tray/tray_constants.cc ('k') | ash/system/tray/tray_views.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 ASH_SYSTEM_TRAY_TRAY_VIEWS_H_ 5 #ifndef ASH_SYSTEM_TRAY_TRAY_VIEWS_H_
6 #define ASH_SYSTEM_TRAY_TRAY_VIEWS_H_ 6 #define ASH_SYSTEM_TRAY_TRAY_VIEWS_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ui/gfx/font.h" 9 #include "ui/gfx/font.h"
10 #include "ui/gfx/size.h" 10 #include "ui/gfx/size.h"
11 #include "ui/views/controls/button/custom_button.h"
11 #include "ui/views/controls/button/image_button.h" 12 #include "ui/views/controls/button/image_button.h"
12 #include "ui/views/controls/button/text_button.h" 13 #include "ui/views/controls/button/text_button.h"
13 #include "ui/views/controls/image_view.h" 14 #include "ui/views/controls/image_view.h"
14 #include "ui/views/controls/scroll_view.h" 15 #include "ui/views/controls/scroll_view.h"
15 #include "ui/views/controls/slider.h" 16 #include "ui/views/controls/slider.h"
16 #include "ui/views/view.h" 17 #include "ui/views/view.h"
17 18
18 typedef unsigned int SkColor; 19 typedef unsigned int SkColor;
19 20
20 namespace gfx { 21 namespace gfx {
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 virtual gfx::Size GetPreferredSize() OVERRIDE; 221 virtual gfx::Size GetPreferredSize() OVERRIDE;
221 virtual void OnPaintBorder(gfx::Canvas* canvas) OVERRIDE; 222 virtual void OnPaintBorder(gfx::Canvas* canvas) OVERRIDE;
222 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; 223 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE;
223 224
224 // Overridden from views::CustomButton. 225 // Overridden from views::CustomButton.
225 virtual void StateChanged() OVERRIDE; 226 virtual void StateChanged() OVERRIDE;
226 227
227 DISALLOW_COPY_AND_ASSIGN(TrayPopupHeaderButton); 228 DISALLOW_COPY_AND_ASSIGN(TrayPopupHeaderButton);
228 }; 229 };
229 230
231 // A button with a bar image and title text below the bar image. These buttons
232 // will be used in audio and brightness control UI, which can be toggled with
233 // on/off states.
234 class TrayBarButtonWithTitle : public views::CustomButton {
235 public:
236 TrayBarButtonWithTitle(views::ButtonListener* listener,
237 int title_id,
238 int width);
239 virtual ~TrayBarButtonWithTitle();
240
241 // Overridden from views::View:
242 virtual gfx::Size GetPreferredSize() OVERRIDE;
243 virtual void Layout() OVERRIDE;
244
245 void UpdateButton(bool control_on);
246
247 private:
248 class TrayBarButton;
249
250 TrayBarButton* image_;
251 views::Label* title_;
252 int width_;
253 int image_height_;
254
255 DISALLOW_COPY_AND_ASSIGN(TrayBarButtonWithTitle);
256 };
257
230 // The 'special' looking row in the uber-tray popups. This is usually the bottom 258 // The 'special' looking row in the uber-tray popups. This is usually the bottom
231 // row in the popups, and has a fixed height. 259 // row in the popups, and has a fixed height.
232 class SpecialPopupRow : public views::View { 260 class SpecialPopupRow : public views::View {
233 public: 261 public:
234 SpecialPopupRow(); 262 SpecialPopupRow();
235 virtual ~SpecialPopupRow(); 263 virtual ~SpecialPopupRow();
236 264
237 void SetTextLabel(int string_id, ViewClickListener* listener); 265 void SetTextLabel(int string_id, ViewClickListener* listener);
238 void SetContent(views::View* view); 266 void SetContent(views::View* view);
239 267
(...skipping 12 matching lines...) Expand all
252 DISALLOW_COPY_AND_ASSIGN(SpecialPopupRow); 280 DISALLOW_COPY_AND_ASSIGN(SpecialPopupRow);
253 }; 281 };
254 282
255 // Sets up a Label properly for the tray (sets color, font etc.). 283 // Sets up a Label properly for the tray (sets color, font etc.).
256 void SetupLabelForTray(views::Label* label); 284 void SetupLabelForTray(views::Label* label);
257 285
258 } // namespace internal 286 } // namespace internal
259 } // namespace ash 287 } // namespace ash
260 288
261 #endif // ASH_SYSTEM_TRAY_TRAY_VIEWS_H_ 289 #endif // ASH_SYSTEM_TRAY_TRAY_VIEWS_H_
OLDNEW
« 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