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

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

Issue 9585028: Mac Aura fails compile and some tests (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 | « no previous file | ash/wm/compact_layout_manager_unittest.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/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"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // Overridden from views:SliderListener. 55 // Overridden from views:SliderListener.
56 virtual void SliderValueChanged(views::Slider* sender, 56 virtual void SliderValueChanged(views::Slider* sender,
57 float value, 57 float value,
58 float old_value, 58 float old_value,
59 views::SliderChangeReason reason) OVERRIDE { 59 views::SliderChangeReason reason) OVERRIDE {
60 if (reason != views::VALUE_CHANGED_BY_USER) 60 if (reason != views::VALUE_CHANGED_BY_USER)
61 return; 61 return;
62 // TODO(sad|davemoore): This isn't correct, since we are unable to pass on 62 // TODO(sad|davemoore): This isn't correct, since we are unable to pass on
63 // the amount the brightness should be increased/decreased. 63 // the amount the brightness should be increased/decreased.
64 // http://crosbug.com/26935 64 // http://crosbug.com/26935
65 #if !defined(OS_MACOSX)
65 ash::Shell* shell = ash::Shell::GetInstance(); 66 ash::Shell* shell = ash::Shell::GetInstance();
66 if (value < old_value) { 67 if (value < old_value) {
67 shell->accelerator_controller()->brightness_control_delegate()-> 68 shell->accelerator_controller()->brightness_control_delegate()->
68 HandleBrightnessDown(ui::Accelerator()); 69 HandleBrightnessDown(ui::Accelerator());
69 } else { 70 } else {
70 shell->accelerator_controller()->brightness_control_delegate()-> 71 shell->accelerator_controller()->brightness_control_delegate()->
71 HandleBrightnessUp(ui::Accelerator()); 72 HandleBrightnessUp(ui::Accelerator());
72 } 73 }
74 #endif // OS_MACOSX
73 } 75 }
74 76
75 views::Slider* slider_; 77 views::Slider* slider_;
76 78
77 DISALLOW_COPY_AND_ASSIGN(BrightnessView); 79 DISALLOW_COPY_AND_ASSIGN(BrightnessView);
78 }; 80 };
79 81
80 } // namespace tray 82 } // namespace tray
81 83
82 TrayBrightness::TrayBrightness() {} 84 TrayBrightness::TrayBrightness() {}
(...skipping 30 matching lines...) Expand all
113 brightness_view_->SetBrightnessLevel(percent); 115 brightness_view_->SetBrightnessLevel(percent);
114 return; 116 return;
115 } 117 }
116 if (!user_initiated) 118 if (!user_initiated)
117 return; 119 return;
118 PopupDetailedView(); 120 PopupDetailedView();
119 } 121 }
120 122
121 } // namespace internal 123 } // namespace internal
122 } // namespace ash 124 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/compact_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698