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

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: exclude accelerator_commands_browsertest on win Created 7 years, 1 month 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
« no previous file with comments | « ash/accelerators/accelerator_commands_unittest.cc ('k') | ash/ash.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « ash/accelerators/accelerator_commands_unittest.cc ('k') | ash/ash.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698