Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(429)

Side by Side Diff: ash/accelerators/accelerator_controller.cc

Issue 42353002: Introduce WindowStateDelegate::ToggleFullscreen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698