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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 case ROTATE_WINDOW: | 350 case ROTATE_WINDOW: |
351 case SHOW_SYSTEM_TRAY_BUBBLE: | 351 case SHOW_SYSTEM_TRAY_BUBBLE: |
352 case TAKE_PARTIAL_SCREENSHOT: | 352 case TAKE_PARTIAL_SCREENSHOT: |
353 case TAKE_SCREENSHOT: | 353 case TAKE_SCREENSHOT: |
354 case TAKE_WINDOW_SCREENSHOT: | 354 case TAKE_WINDOW_SCREENSHOT: |
355 return true; | 355 return true; |
356 | 356 |
357 #if defined(OS_CHROMEOS) | 357 #if defined(OS_CHROMEOS) |
358 case DEV_ADD_REMOVE_DISPLAY: | 358 case DEV_ADD_REMOVE_DISPLAY: |
359 case DEV_TOGGLE_UNIFIED_DESKTOP: | 359 case DEV_TOGGLE_UNIFIED_DESKTOP: |
360 case TOGGLE_MIRROR_MODE: | |
361 return debug::DeveloperAcceleratorsEnabled(); | 360 return debug::DeveloperAcceleratorsEnabled(); |
362 | 361 |
363 case SWAP_PRIMARY_DISPLAY: | 362 case SWAP_PRIMARY_DISPLAY: |
364 return display::Screen::GetScreen()->GetNumDisplays() > 1; | 363 return display::Screen::GetScreen()->GetNumDisplays() > 1; |
365 case TOUCH_HUD_CLEAR: | 364 case TOUCH_HUD_CLEAR: |
366 case TOUCH_HUD_MODE_CHANGE: | 365 case TOUCH_HUD_MODE_CHANGE: |
367 return CanHandleTouchHud(); | 366 return CanHandleTouchHud(); |
368 | 367 |
369 // Following are always enabled. | 368 // Following are always enabled. |
370 case LOCK_PRESSED: | 369 case LOCK_PRESSED: |
371 case LOCK_RELEASED: | 370 case LOCK_RELEASED: |
372 case POWER_PRESSED: | 371 case POWER_PRESSED: |
373 case POWER_RELEASED: | 372 case POWER_RELEASED: |
| 373 case TOGGLE_MIRROR_MODE: |
374 case TOUCH_HUD_PROJECTION_TOGGLE: | 374 case TOUCH_HUD_PROJECTION_TOGGLE: |
375 return true; | 375 return true; |
376 #endif | 376 #endif |
377 | 377 |
378 default: | 378 default: |
379 NOTREACHED(); | 379 NOTREACHED(); |
380 break; | 380 break; |
381 } | 381 } |
382 return false; | 382 return false; |
383 } | 383 } |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 message_center::NotifierId( | 500 message_center::NotifierId( |
501 message_center::NotifierId::SYSTEM_COMPONENT, | 501 message_center::NotifierId::SYSTEM_COMPONENT, |
502 system_notifier::kNotifierDeprecatedAccelerator), | 502 system_notifier::kNotifierDeprecatedAccelerator), |
503 message_center::RichNotificationData(), | 503 message_center::RichNotificationData(), |
504 new DeprecatedAcceleratorNotificationDelegate)); | 504 new DeprecatedAcceleratorNotificationDelegate)); |
505 message_center::MessageCenter::Get()->AddNotification( | 505 message_center::MessageCenter::Get()->AddNotification( |
506 std::move(notification)); | 506 std::move(notification)); |
507 } | 507 } |
508 | 508 |
509 } // namespace ash | 509 } // namespace ash |
OLD | NEW |