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

Side by Side Diff: ash/system/brightness/tray_brightness.cc

Issue 9585004: ash uber tray: Update the volume icon for various levels of volumes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 9 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/brightness/tray_brightness.h ('k') | ui/resources/ui_resources.grd » ('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 #include "ash/system/brightness/tray_brightness.h" 5 #include "ash/system/brightness/tray_brightness.h"
6 6
7 #include "ash/accelerators/accelerator_controller.h" 7 #include "ash/accelerators/accelerator_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/system/brightness/brightness_control_delegate.h" 9 #include "ash/system/brightness/brightness_control_delegate.h"
10 #include "ash/system/tray/system_tray_delegate.h" 10 #include "ash/system/tray/system_tray_delegate.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "grit/ui_resources.h" 12 #include "grit/ui_resources.h"
13 #include "ui/base/resource/resource_bundle.h" 13 #include "ui/base/resource/resource_bundle.h"
14 #include "ui/gfx/image/image.h" 14 #include "ui/gfx/image/image.h"
15 #include "ui/views/controls/button/image_button.h" 15 #include "ui/views/controls/button/image_button.h"
16 #include "ui/views/controls/image_view.h" 16 #include "ui/views/controls/image_view.h"
17 #include "ui/views/controls/label.h" 17 #include "ui/views/controls/label.h"
18 #include "ui/views/controls/slider.h" 18 #include "ui/views/controls/slider.h"
19 #include "ui/views/layout/box_layout.h" 19 #include "ui/views/layout/box_layout.h"
20 #include "ui/views/controls/image_view.h" 20 #include "ui/views/controls/image_view.h"
21 #include "ui/views/view.h" 21 #include "ui/views/view.h"
22 22
23 namespace ash {
24 namespace internal {
25
23 namespace tray { 26 namespace tray {
24 27
25 class BrightnessView : public views::View, 28 class BrightnessView : public views::View,
26 public views::SliderListener { 29 public views::SliderListener {
27 public: 30 public:
28 BrightnessView() { 31 BrightnessView() {
29 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal, 32 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal,
30 0, 0, 5)); 33 0, 0, 5));
31 34
32 views::ImageView* icon = new views::ImageView(); 35 views::ImageView* icon = new views::ImageView();
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 } 72 }
70 } 73 }
71 74
72 views::Slider* slider_; 75 views::Slider* slider_;
73 76
74 DISALLOW_COPY_AND_ASSIGN(BrightnessView); 77 DISALLOW_COPY_AND_ASSIGN(BrightnessView);
75 }; 78 };
76 79
77 } // namespace tray 80 } // namespace tray
78 81
79 namespace ash {
80 namespace internal {
81
82 TrayBrightness::TrayBrightness() {} 82 TrayBrightness::TrayBrightness() {}
83 83
84 TrayBrightness::~TrayBrightness() {} 84 TrayBrightness::~TrayBrightness() {}
85 85
86 views::View* TrayBrightness::CreateTrayView() { 86 views::View* TrayBrightness::CreateTrayView() {
87 return NULL; 87 return NULL;
88 } 88 }
89 89
90 views::View* TrayBrightness::CreateDefaultView() { 90 views::View* TrayBrightness::CreateDefaultView() {
91 brightness_view_.reset(new tray::BrightnessView); 91 brightness_view_.reset(new tray::BrightnessView);
(...skipping 21 matching lines...) Expand all
113 brightness_view_->SetBrightnessLevel(percent); 113 brightness_view_->SetBrightnessLevel(percent);
114 return; 114 return;
115 } 115 }
116 if (!user_initiated) 116 if (!user_initiated)
117 return; 117 return;
118 PopupDetailedView(); 118 PopupDetailedView();
119 } 119 }
120 120
121 } // namespace internal 121 } // namespace internal
122 } // namespace ash 122 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/brightness/tray_brightness.h ('k') | ui/resources/ui_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698