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