OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_delegate_aura.h" | 5 #include "ash/accelerators/accelerator_controller_delegate_aura.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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 | 354 |
355 AcceleratorControllerDelegateAura::~AcceleratorControllerDelegateAura() {} | 355 AcceleratorControllerDelegateAura::~AcceleratorControllerDelegateAura() {} |
356 | 356 |
357 void AcceleratorControllerDelegateAura::SetScreenshotDelegate( | 357 void AcceleratorControllerDelegateAura::SetScreenshotDelegate( |
358 std::unique_ptr<ScreenshotDelegate> screenshot_delegate) { | 358 std::unique_ptr<ScreenshotDelegate> screenshot_delegate) { |
359 screenshot_delegate_ = std::move(screenshot_delegate); | 359 screenshot_delegate_ = std::move(screenshot_delegate); |
360 } | 360 } |
361 | 361 |
362 bool AcceleratorControllerDelegateAura::HandlesAction( | 362 bool AcceleratorControllerDelegateAura::HandlesAction( |
363 AcceleratorAction action) { | 363 AcceleratorAction action) { |
| 364 // NOTE: When adding a new accelerator that only depends on //ash/common code, |
| 365 // add it to accelerator_controller.cc instead. See class comment. |
364 switch (action) { | 366 switch (action) { |
365 case DEBUG_TOGGLE_DESKTOP_BACKGROUND_MODE: | 367 case DEBUG_TOGGLE_DESKTOP_BACKGROUND_MODE: |
366 case DEBUG_TOGGLE_DEVICE_SCALE_FACTOR: | 368 case DEBUG_TOGGLE_DEVICE_SCALE_FACTOR: |
367 case DEBUG_TOGGLE_ROOT_WINDOW_FULL_SCREEN: | 369 case DEBUG_TOGGLE_ROOT_WINDOW_FULL_SCREEN: |
368 case DEBUG_TOGGLE_SHOW_DEBUG_BORDERS: | 370 case DEBUG_TOGGLE_SHOW_DEBUG_BORDERS: |
369 case DEBUG_TOGGLE_SHOW_FPS_COUNTER: | 371 case DEBUG_TOGGLE_SHOW_FPS_COUNTER: |
370 case DEBUG_TOGGLE_SHOW_PAINT_RECTS: | 372 case DEBUG_TOGGLE_SHOW_PAINT_RECTS: |
371 case FOCUS_SHELF: | 373 case FOCUS_SHELF: |
372 case LAUNCH_APP_0: | 374 case LAUNCH_APP_0: |
373 case LAUNCH_APP_1: | 375 case LAUNCH_APP_1: |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 message_center::NotifierId( | 646 message_center::NotifierId( |
645 message_center::NotifierId::SYSTEM_COMPONENT, | 647 message_center::NotifierId::SYSTEM_COMPONENT, |
646 system_notifier::kNotifierDeprecatedAccelerator), | 648 system_notifier::kNotifierDeprecatedAccelerator), |
647 message_center::RichNotificationData(), | 649 message_center::RichNotificationData(), |
648 new DeprecatedAcceleratorNotificationDelegate)); | 650 new DeprecatedAcceleratorNotificationDelegate)); |
649 message_center::MessageCenter::Get()->AddNotification( | 651 message_center::MessageCenter::Get()->AddNotification( |
650 std::move(notification)); | 652 std::move(notification)); |
651 } | 653 } |
652 | 654 |
653 } // namespace ash | 655 } // namespace ash |
OLD | NEW |