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 27 matching lines...) Expand all Loading... |
38 #include "ash/system/status_area_widget.h" | 38 #include "ash/system/status_area_widget.h" |
39 #include "ash/system/tray/system_tray.h" | 39 #include "ash/system/tray/system_tray.h" |
40 #include "ash/system/tray/system_tray_delegate.h" | 40 #include "ash/system/tray/system_tray_delegate.h" |
41 #include "ash/system/tray/system_tray_notifier.h" | 41 #include "ash/system/tray/system_tray_notifier.h" |
42 #include "ash/system/web_notification/web_notification_tray.h" | 42 #include "ash/system/web_notification/web_notification_tray.h" |
43 #include "ash/touch/touch_hud_debug.h" | 43 #include "ash/touch/touch_hud_debug.h" |
44 #include "ash/volume_control_delegate.h" | 44 #include "ash/volume_control_delegate.h" |
45 #include "ash/wm/overview/window_selector_controller.h" | 45 #include "ash/wm/overview/window_selector_controller.h" |
46 #include "ash/wm/partial_screenshot_view.h" | 46 #include "ash/wm/partial_screenshot_view.h" |
47 #include "ash/wm/power_button_controller.h" | 47 #include "ash/wm/power_button_controller.h" |
48 #include "ash/wm/property_util.h" | |
49 #include "ash/wm/window_cycle_controller.h" | 48 #include "ash/wm/window_cycle_controller.h" |
| 49 #include "ash/wm/window_state.h" |
50 #include "ash/wm/window_util.h" | 50 #include "ash/wm/window_util.h" |
51 #include "ash/wm/workspace/snap_sizer.h" | 51 #include "ash/wm/workspace/snap_sizer.h" |
52 #include "base/bind.h" | 52 #include "base/bind.h" |
53 #include "base/command_line.h" | 53 #include "base/command_line.h" |
54 #include "content/public/browser/gpu_data_manager.h" | 54 #include "content/public/browser/gpu_data_manager.h" |
55 #include "ui/aura/env.h" | 55 #include "ui/aura/env.h" |
56 #include "ui/aura/root_window.h" | 56 #include "ui/aura/root_window.h" |
57 #include "ui/base/accelerators/accelerator.h" | 57 #include "ui/base/accelerators/accelerator.h" |
58 #include "ui/base/accelerators/accelerator_manager.h" | 58 #include "ui/base/accelerators/accelerator_manager.h" |
59 #include "ui/compositor/debug_utils.h" | 59 #include "ui/compositor/debug_utils.h" |
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
824 case LAUNCH_LAST_APP: | 824 case LAUNCH_LAST_APP: |
825 Launcher::ForPrimaryDisplay()->LaunchAppIndexAt(-1); | 825 Launcher::ForPrimaryDisplay()->LaunchAppIndexAt(-1); |
826 return true; | 826 return true; |
827 case WINDOW_SNAP_LEFT: | 827 case WINDOW_SNAP_LEFT: |
828 case WINDOW_SNAP_RIGHT: { | 828 case WINDOW_SNAP_RIGHT: { |
829 aura::Window* window = wm::GetActiveWindow(); | 829 aura::Window* window = wm::GetActiveWindow(); |
830 // Disable window docking shortcut key for full screen window due to | 830 // Disable window docking shortcut key for full screen window due to |
831 // http://crbug.com/135487. | 831 // http://crbug.com/135487. |
832 if (!window || | 832 if (!window || |
833 window->type() != aura::client::WINDOW_TYPE_NORMAL || | 833 window->type() != aura::client::WINDOW_TYPE_NORMAL || |
834 wm::IsWindowFullscreen(window)) { | 834 wm::GetWindowState(window)->IsFullscreen()) { |
835 break; | 835 break; |
836 } | 836 } |
837 | 837 |
838 internal::SnapSizer::SnapWindow(window, | 838 internal::SnapSizer::SnapWindow(window, |
839 action == WINDOW_SNAP_LEFT ? internal::SnapSizer::LEFT_EDGE : | 839 action == WINDOW_SNAP_LEFT ? internal::SnapSizer::LEFT_EDGE : |
840 internal::SnapSizer::RIGHT_EDGE); | 840 internal::SnapSizer::RIGHT_EDGE); |
841 return true; | 841 return true; |
842 } | 842 } |
843 case WINDOW_MINIMIZE: | 843 case WINDOW_MINIMIZE: |
844 return accelerators::ToggleMinimized(); | 844 return accelerators::ToggleMinimized(); |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
981 keyboard_brightness_control_delegate) { | 981 keyboard_brightness_control_delegate) { |
982 keyboard_brightness_control_delegate_ = | 982 keyboard_brightness_control_delegate_ = |
983 keyboard_brightness_control_delegate.Pass(); | 983 keyboard_brightness_control_delegate.Pass(); |
984 } | 984 } |
985 | 985 |
986 bool AcceleratorController::CanHandleAccelerators() const { | 986 bool AcceleratorController::CanHandleAccelerators() const { |
987 return true; | 987 return true; |
988 } | 988 } |
989 | 989 |
990 } // namespace ash | 990 } // namespace ash |
OLD | NEW |