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

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

Issue 201573015: Introdcue AshWindowTreeHost and move ash/chrome specific code in WTH to ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
« no previous file with comments | « no previous file | ash/ash.gyp » ('j') | ash/host/ash_window_tree_host.h » ('J')
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>
11 11
12 #include "ash/accelerators/accelerator_commands.h" 12 #include "ash/accelerators/accelerator_commands.h"
13 #include "ash/accelerators/accelerator_table.h" 13 #include "ash/accelerators/accelerator_table.h"
14 #include "ash/accelerators/debug_commands.h" 14 #include "ash/accelerators/debug_commands.h"
15 #include "ash/ash_switches.h" 15 #include "ash/ash_switches.h"
16 #include "ash/debug.h" 16 #include "ash/debug.h"
17 #include "ash/display/display_controller.h" 17 #include "ash/display/display_controller.h"
18 #include "ash/display/display_manager.h" 18 #include "ash/display/display_manager.h"
19 #include "ash/focus_cycler.h" 19 #include "ash/focus_cycler.h"
20 #include "ash/gpu_support.h" 20 #include "ash/gpu_support.h"
21 #include "ash/ime_control_delegate.h" 21 #include "ash/ime_control_delegate.h"
22 #include "ash/host/ash_window_tree_host.h"
22 #include "ash/magnifier/magnification_controller.h" 23 #include "ash/magnifier/magnification_controller.h"
23 #include "ash/magnifier/partial_magnification_controller.h" 24 #include "ash/magnifier/partial_magnification_controller.h"
24 #include "ash/media_delegate.h" 25 #include "ash/media_delegate.h"
25 #include "ash/multi_profile_uma.h" 26 #include "ash/multi_profile_uma.h"
26 #include "ash/new_window_delegate.h" 27 #include "ash/new_window_delegate.h"
27 #include "ash/root_window_controller.h" 28 #include "ash/root_window_controller.h"
28 #include "ash/rotator/screen_rotation.h" 29 #include "ash/rotator/screen_rotation.h"
29 #include "ash/screenshot_delegate.h" 30 #include "ash/screenshot_delegate.h"
30 #include "ash/session_state_delegate.h" 31 #include "ash/session_state_delegate.h"
31 #include "ash/shelf/shelf.h" 32 #include "ash/shelf/shelf.h"
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 492
492 bool HandleToggleFullscreen(ui::KeyboardCode key_code) { 493 bool HandleToggleFullscreen(ui::KeyboardCode key_code) {
493 if (key_code == ui::VKEY_MEDIA_LAUNCH_APP2) { 494 if (key_code == ui::VKEY_MEDIA_LAUNCH_APP2) {
494 base::RecordAction(UserMetricsAction("Accel_Fullscreen_F4")); 495 base::RecordAction(UserMetricsAction("Accel_Fullscreen_F4"));
495 } 496 }
496 accelerators::ToggleFullscreen(); 497 accelerators::ToggleFullscreen();
497 return true; 498 return true;
498 } 499 }
499 500
500 bool HandleToggleRootWindowFullScreen() { 501 bool HandleToggleRootWindowFullScreen() {
501 Shell::GetPrimaryRootWindow()->GetHost()->ToggleFullScreen(); 502 Shell::GetPrimaryRootWindowController()->ash_host()->ToggleFullScreen();
502 return true; 503 return true;
503 } 504 }
504 505
505 bool HandleWindowSnap(int action) { 506 bool HandleWindowSnap(int action) {
506 wm::WindowState* window_state = wm::GetActiveWindowState(); 507 wm::WindowState* window_state = wm::GetActiveWindowState();
507 // Disable window snapping shortcut key for full screen window due to 508 // Disable window snapping shortcut key for full screen window due to
508 // http://crbug.com/135487. 509 // http://crbug.com/135487.
509 if (!window_state || 510 if (!window_state ||
510 window_state->window()->type() != ui::wm::WINDOW_TYPE_NORMAL || 511 window_state->window()->type() != ui::wm::WINDOW_TYPE_NORMAL ||
511 window_state->IsFullscreen()) { 512 window_state->IsFullscreen()) {
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 keyboard_brightness_control_delegate) { 1190 keyboard_brightness_control_delegate) {
1190 keyboard_brightness_control_delegate_ = 1191 keyboard_brightness_control_delegate_ =
1191 keyboard_brightness_control_delegate.Pass(); 1192 keyboard_brightness_control_delegate.Pass();
1192 } 1193 }
1193 1194
1194 bool AcceleratorController::CanHandleAccelerators() const { 1195 bool AcceleratorController::CanHandleAccelerators() const {
1195 return true; 1196 return true;
1196 } 1197 }
1197 1198
1198 } // namespace ash 1199 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/ash.gyp » ('j') | ash/host/ash_window_tree_host.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698