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 11 matching lines...) Expand all Loading... |
22 #include "ash/display/multi_display_manager.h" | 22 #include "ash/display/multi_display_manager.h" |
23 #include "ash/root_window_controller.h" | 23 #include "ash/root_window_controller.h" |
24 #include "ash/rotator/screen_rotation.h" | 24 #include "ash/rotator/screen_rotation.h" |
25 #include "ash/screenshot_delegate.h" | 25 #include "ash/screenshot_delegate.h" |
26 #include "ash/shell.h" | 26 #include "ash/shell.h" |
27 #include "ash/shell_delegate.h" | 27 #include "ash/shell_delegate.h" |
28 #include "ash/shell_window_ids.h" | 28 #include "ash/shell_window_ids.h" |
29 #include "ash/system/brightness/brightness_control_delegate.h" | 29 #include "ash/system/brightness/brightness_control_delegate.h" |
30 #include "ash/system/keyboard_brightness/keyboard_brightness_control_delegate.h" | 30 #include "ash/system/keyboard_brightness/keyboard_brightness_control_delegate.h" |
31 #include "ash/system/tray/system_tray.h" | 31 #include "ash/system/tray/system_tray.h" |
| 32 #include "ash/system/tray/system_tray_delegate.h" |
32 #include "ash/volume_control_delegate.h" | 33 #include "ash/volume_control_delegate.h" |
33 #include "ash/wm/partial_screenshot_view.h" | 34 #include "ash/wm/partial_screenshot_view.h" |
34 #include "ash/wm/property_util.h" | 35 #include "ash/wm/property_util.h" |
35 #include "ash/wm/window_cycle_controller.h" | 36 #include "ash/wm/window_cycle_controller.h" |
36 #include "ash/wm/window_util.h" | 37 #include "ash/wm/window_util.h" |
37 #include "ash/wm/workspace/snap_sizer.h" | 38 #include "ash/wm/workspace/snap_sizer.h" |
38 #include "base/bind.h" | 39 #include "base/bind.h" |
39 #include "base/command_line.h" | 40 #include "base/command_line.h" |
40 #include "ui/aura/event.h" | 41 #include "ui/aura/event.h" |
41 #include "ui/aura/root_window.h" | 42 #include "ui/aura/root_window.h" |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 case LOCK_SCREEN: | 402 case LOCK_SCREEN: |
402 return HandleLock(); | 403 return HandleLock(); |
403 case OPEN_FILE_MANAGER_DIALOG: | 404 case OPEN_FILE_MANAGER_DIALOG: |
404 return HandleFileManager(true /* as_dialog */); | 405 return HandleFileManager(true /* as_dialog */); |
405 case OPEN_FILE_MANAGER_TAB: | 406 case OPEN_FILE_MANAGER_TAB: |
406 return HandleFileManager(false /* as_dialog */); | 407 return HandleFileManager(false /* as_dialog */); |
407 case OPEN_CROSH: | 408 case OPEN_CROSH: |
408 return HandleCrosh(); | 409 return HandleCrosh(); |
409 case TOGGLE_SPOKEN_FEEDBACK: | 410 case TOGGLE_SPOKEN_FEEDBACK: |
410 return HandleToggleSpokenFeedback(); | 411 return HandleToggleSpokenFeedback(); |
| 412 case TOGGLE_WIFI: |
| 413 if (Shell::GetInstance()->tray_delegate()) |
| 414 Shell::GetInstance()->tray_delegate()->ToggleWifi(); |
| 415 return true; |
411 case CYCLE_DISPLAY_MODE: { | 416 case CYCLE_DISPLAY_MODE: { |
412 internal::OutputConfiguratorAnimation* animation = | 417 internal::OutputConfiguratorAnimation* animation = |
413 Shell::GetInstance()->output_configurator_animation(); | 418 Shell::GetInstance()->output_configurator_animation(); |
414 animation->StartFadeOutAnimation(base::Bind( | 419 animation->StartFadeOutAnimation(base::Bind( |
415 base::IgnoreResult(&chromeos::OutputConfigurator::CycleDisplayMode), | 420 base::IgnoreResult(&chromeos::OutputConfigurator::CycleDisplayMode), |
416 base::Unretained(Shell::GetInstance()->output_configurator()))); | 421 base::Unretained(Shell::GetInstance()->output_configurator()))); |
417 return true; | 422 return true; |
418 } | 423 } |
419 #endif | 424 #endif |
420 case OPEN_FEEDBACK_PAGE: | 425 case OPEN_FEEDBACK_PAGE: |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
741 accelerators_.insert( | 746 accelerators_.insert( |
742 std::make_pair(accelerator, accelerators[i].action)); | 747 std::make_pair(accelerator, accelerators[i].action)); |
743 } | 748 } |
744 } | 749 } |
745 | 750 |
746 bool AcceleratorController::CanHandleAccelerators() const { | 751 bool AcceleratorController::CanHandleAccelerators() const { |
747 return true; | 752 return true; |
748 } | 753 } |
749 | 754 |
750 } // namespace ash | 755 } // namespace ash |
OLD | NEW |