| 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 <iostream> | 9 #include <iostream> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #include "ash/shell.h" | 32 #include "ash/shell.h" |
| 33 #include "ash/shell_delegate.h" | 33 #include "ash/shell_delegate.h" |
| 34 #include "ash/shell_window_ids.h" | 34 #include "ash/shell_window_ids.h" |
| 35 #include "ash/system/brightness/brightness_control_delegate.h" | 35 #include "ash/system/brightness/brightness_control_delegate.h" |
| 36 #include "ash/system/keyboard_brightness/keyboard_brightness_control_delegate.h" | 36 #include "ash/system/keyboard_brightness/keyboard_brightness_control_delegate.h" |
| 37 #include "ash/system/status_area_widget.h" | 37 #include "ash/system/status_area_widget.h" |
| 38 #include "ash/system/tray/system_tray.h" | 38 #include "ash/system/tray/system_tray.h" |
| 39 #include "ash/system/tray/system_tray_delegate.h" | 39 #include "ash/system/tray/system_tray_delegate.h" |
| 40 #include "ash/system/tray/system_tray_notifier.h" | 40 #include "ash/system/tray/system_tray_notifier.h" |
| 41 #include "ash/system/web_notification/web_notification_tray.h" | 41 #include "ash/system/web_notification/web_notification_tray.h" |
| 42 #include "ash/touch/touch_observer_hud.h" | 42 #include "ash/touch/touch_hud_debug.h" |
| 43 #include "ash/volume_control_delegate.h" | 43 #include "ash/volume_control_delegate.h" |
| 44 #include "ash/wm/partial_screenshot_view.h" | 44 #include "ash/wm/partial_screenshot_view.h" |
| 45 #include "ash/wm/power_button_controller.h" | 45 #include "ash/wm/power_button_controller.h" |
| 46 #include "ash/wm/property_util.h" | 46 #include "ash/wm/property_util.h" |
| 47 #include "ash/wm/window_cycle_controller.h" | 47 #include "ash/wm/window_cycle_controller.h" |
| 48 #include "ash/wm/window_util.h" | 48 #include "ash/wm/window_util.h" |
| 49 #include "ash/wm/workspace/snap_sizer.h" | 49 #include "ash/wm/workspace/snap_sizer.h" |
| 50 #include "base/bind.h" | 50 #include "base/bind.h" |
| 51 #include "base/command_line.h" | 51 #include "base/command_line.h" |
| 52 #include "content/public/browser/gpu_data_manager.h" | 52 #include "content/public/browser/gpu_data_manager.h" |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 Shell::GetInstance()->display_controller()->SwapPrimaryDisplay(); | 554 Shell::GetInstance()->display_controller()->SwapPrimaryDisplay(); |
| 555 return true; | 555 return true; |
| 556 case TOGGLE_SPOKEN_FEEDBACK: | 556 case TOGGLE_SPOKEN_FEEDBACK: |
| 557 return HandleToggleSpokenFeedback(); | 557 return HandleToggleSpokenFeedback(); |
| 558 case TOGGLE_WIFI: | 558 case TOGGLE_WIFI: |
| 559 Shell::GetInstance()->system_tray_notifier()->NotifyRequestToggleWifi(); | 559 Shell::GetInstance()->system_tray_notifier()->NotifyRequestToggleWifi(); |
| 560 return true; | 560 return true; |
| 561 case TOUCH_HUD_CLEAR: { | 561 case TOUCH_HUD_CLEAR: { |
| 562 internal::RootWindowController* controller = | 562 internal::RootWindowController* controller = |
| 563 internal::RootWindowController::ForActiveRootWindow(); | 563 internal::RootWindowController::ForActiveRootWindow(); |
| 564 if (controller->touch_observer_hud()) { | 564 if (controller->touch_hud_debug()) { |
| 565 controller->touch_observer_hud()->Clear(); | 565 controller->touch_hud_debug()->Clear(); |
| 566 return true; | 566 return true; |
| 567 } | 567 } |
| 568 return false; | 568 return false; |
| 569 } | 569 } |
| 570 case TOUCH_HUD_MODE_CHANGE: { | 570 case TOUCH_HUD_MODE_CHANGE: { |
| 571 internal::RootWindowController* controller = | 571 internal::RootWindowController* controller = |
| 572 internal::RootWindowController::ForActiveRootWindow(); | 572 internal::RootWindowController::ForActiveRootWindow(); |
| 573 if (controller->touch_observer_hud()) { | 573 if (controller->touch_hud_debug()) { |
| 574 controller->touch_observer_hud()->ChangeToNextMode(); | 574 controller->touch_hud_debug()->ChangeToNextMode(); |
| 575 return true; | 575 return true; |
| 576 } | 576 } |
| 577 return false; | 577 return false; |
| 578 } | 578 } |
| 579 case TOUCH_HUD_PROJECTION_TOGGLE: { |
| 580 bool enabled = Shell::GetInstance()->is_touch_hud_projection_enabled(); |
| 581 Shell::GetInstance()->SetTouchHudProjectionEnabled(!enabled); |
| 582 return true; |
| 583 } |
| 579 case DISABLE_GPU_WATCHDOG: | 584 case DISABLE_GPU_WATCHDOG: |
| 580 content::GpuDataManager::GetInstance()->DisableGpuWatchdog(); | 585 content::GpuDataManager::GetInstance()->DisableGpuWatchdog(); |
| 581 return true; | 586 return true; |
| 582 #endif | 587 #endif |
| 583 case OPEN_FEEDBACK_PAGE: | 588 case OPEN_FEEDBACK_PAGE: |
| 584 ash::Shell::GetInstance()->delegate()->OpenFeedbackPage(); | 589 ash::Shell::GetInstance()->delegate()->OpenFeedbackPage(); |
| 585 return true; | 590 return true; |
| 586 case EXIT: | 591 case EXIT: |
| 587 // UMA metrics are recorded in the handler. | 592 // UMA metrics are recorded in the handler. |
| 588 exit_warning_handler_.HandleAccelerator(); | 593 exit_warning_handler_.HandleAccelerator(); |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 963 keyboard_brightness_control_delegate) { | 968 keyboard_brightness_control_delegate) { |
| 964 keyboard_brightness_control_delegate_ = | 969 keyboard_brightness_control_delegate_ = |
| 965 keyboard_brightness_control_delegate.Pass(); | 970 keyboard_brightness_control_delegate.Pass(); |
| 966 } | 971 } |
| 967 | 972 |
| 968 bool AcceleratorController::CanHandleAccelerators() const { | 973 bool AcceleratorController::CanHandleAccelerators() const { |
| 969 return true; | 974 return true; |
| 970 } | 975 } |
| 971 | 976 |
| 972 } // namespace ash | 977 } // namespace ash |
| OLD | NEW |