OLD | NEW |
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/accelerators/accelerator_controller.h" | 5 #include "ash/accelerators/accelerator_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1203 break; | 1203 break; |
1204 case OPEN_CROSH: | 1204 case OPEN_CROSH: |
1205 HandleCrosh(); | 1205 HandleCrosh(); |
1206 break; | 1206 break; |
1207 case OPEN_FILE_MANAGER: | 1207 case OPEN_FILE_MANAGER: |
1208 HandleFileManager(); | 1208 HandleFileManager(); |
1209 break; | 1209 break; |
1210 case POWER_PRESSED: // fallthrough | 1210 case POWER_PRESSED: // fallthrough |
1211 case POWER_RELEASED: | 1211 case POWER_RELEASED: |
1212 if (!base::SysInfo::IsRunningOnChromeOS()) { | 1212 if (!base::SysInfo::IsRunningOnChromeOS()) { |
1213 // There is no powerd in linux desktop, so call the | 1213 // There is no power in linux desktop, so call the |
1214 // PowerButtonController here. | 1214 // PowerButtonController here. |
1215 Shell::GetInstance()->power_button_controller()-> | 1215 Shell::GetInstance()->power_button_controller()-> |
1216 OnPowerButtonEvent(action == POWER_PRESSED, base::TimeTicks()); | 1216 OnPowerButtonEvent(action == POWER_PRESSED, base::TimeTicks()); |
1217 } | 1217 } |
1218 // We don't do anything with these at present on the device, | 1218 // We don't do anything with these at present on the device, |
1219 // (power button events are reported to us from powerm via | 1219 // (power button events are reported to us from powerm via |
1220 // D-BUS), but we consume them to prevent them from getting | 1220 // D-BUS), but we consume them to prevent them from getting |
1221 // passed to apps -- see http://crbug.com/146609. | 1221 // passed to apps -- see http://crbug.com/146609. |
1222 break; | 1222 break; |
1223 case SILENCE_SPOKEN_FEEDBACK: | 1223 case SILENCE_SPOKEN_FEEDBACK: |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1321 } | 1321 } |
1322 | 1322 |
1323 void AcceleratorController::SetKeyboardBrightnessControlDelegate( | 1323 void AcceleratorController::SetKeyboardBrightnessControlDelegate( |
1324 scoped_ptr<KeyboardBrightnessControlDelegate> | 1324 scoped_ptr<KeyboardBrightnessControlDelegate> |
1325 keyboard_brightness_control_delegate) { | 1325 keyboard_brightness_control_delegate) { |
1326 keyboard_brightness_control_delegate_ = | 1326 keyboard_brightness_control_delegate_ = |
1327 keyboard_brightness_control_delegate.Pass(); | 1327 keyboard_brightness_control_delegate.Pass(); |
1328 } | 1328 } |
1329 | 1329 |
1330 } // namespace ash | 1330 } // namespace ash |
OLD | NEW |