| 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 #include <utility> | 10 #include <utility> |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 message_center::NotifierId::SYSTEM_COMPONENT, | 177 message_center::NotifierId::SYSTEM_COMPONENT, |
| 178 system_notifier::kNotifierDeprecatedAccelerator), | 178 system_notifier::kNotifierDeprecatedAccelerator), |
| 179 message_center::RichNotificationData(), | 179 message_center::RichNotificationData(), |
| 180 new DeprecatedAcceleratorNotificationDelegate)); | 180 new DeprecatedAcceleratorNotificationDelegate)); |
| 181 message_center::MessageCenter::Get()->AddNotification( | 181 message_center::MessageCenter::Get()->AddNotification( |
| 182 std::move(notification)); | 182 std::move(notification)); |
| 183 } | 183 } |
| 184 | 184 |
| 185 void RecordUmaHistogram(const char* histogram_name, | 185 void RecordUmaHistogram(const char* histogram_name, |
| 186 DeprecatedAcceleratorUsage sample) { | 186 DeprecatedAcceleratorUsage sample) { |
| 187 auto histogram = base::LinearHistogram::FactoryGet( | 187 auto* histogram = base::LinearHistogram::FactoryGet( |
| 188 histogram_name, 1, DEPRECATED_USAGE_COUNT, DEPRECATED_USAGE_COUNT + 1, | 188 histogram_name, 1, DEPRECATED_USAGE_COUNT, DEPRECATED_USAGE_COUNT + 1, |
| 189 base::HistogramBase::kUmaTargetedHistogramFlag); | 189 base::HistogramBase::kUmaTargetedHistogramFlag); |
| 190 histogram->Add(sample); | 190 histogram->Add(sample); |
| 191 } | 191 } |
| 192 | 192 |
| 193 void HandleCycleBackwardMRU(const ui::Accelerator& accelerator) { | 193 void HandleCycleBackwardMRU(const ui::Accelerator& accelerator) { |
| 194 if (accelerator.key_code() == ui::VKEY_TAB) | 194 if (accelerator.key_code() == ui::VKEY_TAB) |
| 195 base::RecordAction(base::UserMetricsAction("Accel_PrevWindow_Tab")); | 195 base::RecordAction(base::UserMetricsAction("Accel_PrevWindow_Tab")); |
| 196 | 196 |
| 197 Shell::GetInstance()->window_cycle_controller()->HandleCycleWindow( | 197 Shell::GetInstance()->window_cycle_controller()->HandleCycleWindow( |
| (...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1444 } | 1444 } |
| 1445 | 1445 |
| 1446 void AcceleratorController::SetKeyboardBrightnessControlDelegate( | 1446 void AcceleratorController::SetKeyboardBrightnessControlDelegate( |
| 1447 std::unique_ptr<KeyboardBrightnessControlDelegate> | 1447 std::unique_ptr<KeyboardBrightnessControlDelegate> |
| 1448 keyboard_brightness_control_delegate) { | 1448 keyboard_brightness_control_delegate) { |
| 1449 keyboard_brightness_control_delegate_ = | 1449 keyboard_brightness_control_delegate_ = |
| 1450 std::move(keyboard_brightness_control_delegate); | 1450 std::move(keyboard_brightness_control_delegate); |
| 1451 } | 1451 } |
| 1452 | 1452 |
| 1453 } // namespace ash | 1453 } // namespace ash |
| OLD | NEW |