| 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 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 internal::SnapSizer::RIGHT_EDGE); | 839 internal::SnapSizer::RIGHT_EDGE); |
| 840 return true; | 840 return true; |
| 841 } | 841 } |
| 842 case WINDOW_MINIMIZE: | 842 case WINDOW_MINIMIZE: |
| 843 return accelerators::ToggleMinimized(); | 843 return accelerators::ToggleMinimized(); |
| 844 case TOGGLE_FULLSCREEN: { | 844 case TOGGLE_FULLSCREEN: { |
| 845 if (key_code == ui::VKEY_MEDIA_LAUNCH_APP2) { | 845 if (key_code == ui::VKEY_MEDIA_LAUNCH_APP2) { |
| 846 shell->delegate()->RecordUserMetricsAction( | 846 shell->delegate()->RecordUserMetricsAction( |
| 847 UMA_ACCEL_FULLSCREEN_F4); | 847 UMA_ACCEL_FULLSCREEN_F4); |
| 848 } | 848 } |
| 849 shell->delegate()->ToggleFullscreen(); | 849 accelerators::ToggleFullscreen(); |
| 850 return true; | 850 return true; |
| 851 } | 851 } |
| 852 case TOGGLE_MAXIMIZED: { | 852 case TOGGLE_MAXIMIZED: { |
| 853 accelerators::ToggleMaximized(); | 853 accelerators::ToggleMaximized(); |
| 854 return true; | 854 return true; |
| 855 } | 855 } |
| 856 case WINDOW_POSITION_CENTER: { | 856 case WINDOW_POSITION_CENTER: { |
| 857 aura::Window* window = wm::GetActiveWindow(); | 857 aura::Window* window = wm::GetActiveWindow(); |
| 858 if (window) { | 858 if (window) { |
| 859 wm::CenterWindow(window); | 859 wm::CenterWindow(window); |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 980 keyboard_brightness_control_delegate) { | 980 keyboard_brightness_control_delegate) { |
| 981 keyboard_brightness_control_delegate_ = | 981 keyboard_brightness_control_delegate_ = |
| 982 keyboard_brightness_control_delegate.Pass(); | 982 keyboard_brightness_control_delegate.Pass(); |
| 983 } | 983 } |
| 984 | 984 |
| 985 bool AcceleratorController::CanHandleAccelerators() const { | 985 bool AcceleratorController::CanHandleAccelerators() const { |
| 986 return true; | 986 return true; |
| 987 } | 987 } |
| 988 | 988 |
| 989 } // namespace ash | 989 } // namespace ash |
| OLD | NEW |