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

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

Issue 23483041: [Cleanup] Remove mac code from aura/ash/views (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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/shell_unittest.cc ('k') | ash/test/ash_test_helper.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 #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/ash_constants.h" 8 #include "ash/ash_constants.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/system/brightness/brightness_control_delegate.h" 10 #include "ash/system/brightness/brightness_control_delegate.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } 82 }
83 83
84 // Overridden from views:SliderListener. 84 // Overridden from views:SliderListener.
85 virtual void SliderValueChanged(views::Slider* sender, 85 virtual void SliderValueChanged(views::Slider* sender,
86 float value, 86 float value,
87 float old_value, 87 float old_value,
88 views::SliderChangeReason reason) OVERRIDE { 88 views::SliderChangeReason reason) OVERRIDE {
89 DCHECK_EQ(sender, slider_); 89 DCHECK_EQ(sender, slider_);
90 if (reason != views::VALUE_CHANGED_BY_USER) 90 if (reason != views::VALUE_CHANGED_BY_USER)
91 return; 91 return;
92 #if !defined(OS_MACOSX)
93 AcceleratorController* ac = Shell::GetInstance()->accelerator_controller(); 92 AcceleratorController* ac = Shell::GetInstance()->accelerator_controller();
94 if (ac->brightness_control_delegate()) { 93 if (ac->brightness_control_delegate()) {
95 double percent = std::max(value * 100.0, kMinBrightnessPercent); 94 double percent = std::max(value * 100.0, kMinBrightnessPercent);
96 ac->brightness_control_delegate()->SetBrightnessPercent(percent, true); 95 ac->brightness_control_delegate()->SetBrightnessPercent(percent, true);
97 } 96 }
98 #endif // OS_MACOSX
99 } 97 }
100 98
101 // Overridden from views:SliderListener. 99 // Overridden from views:SliderListener.
102 virtual void SliderDragStarted(views::Slider* slider) OVERRIDE { 100 virtual void SliderDragStarted(views::Slider* slider) OVERRIDE {
103 DCHECK_EQ(slider, slider_); 101 DCHECK_EQ(slider, slider_);
104 dragging_ = true; 102 dragging_ = true;
105 } 103 }
106 104
107 // Overridden from views:SliderListener. 105 // Overridden from views:SliderListener.
108 virtual void SliderDragEnded(views::Slider* slider) OVERRIDE { 106 virtual void SliderDragEnded(views::Slider* slider) OVERRIDE {
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 return; 208 return;
211 209
212 if (brightness_view_) 210 if (brightness_view_)
213 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds); 211 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds);
214 else 212 else
215 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false); 213 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false);
216 } 214 }
217 215
218 } // namespace internal 216 } // namespace internal
219 } // namespace ash 217 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell_unittest.cc ('k') | ash/test/ash_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698