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

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

Issue 115153002: wm: public window_types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ozone deps Created 7 years 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/display/screen_position_controller_unittest.cc » ('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 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 bool HandleToggleRootWindowFullScreen() { 573 bool HandleToggleRootWindowFullScreen() {
574 Shell::GetPrimaryRootWindow()->GetDispatcher()->host()->ToggleFullScreen(); 574 Shell::GetPrimaryRootWindow()->GetDispatcher()->host()->ToggleFullScreen();
575 return true; 575 return true;
576 } 576 }
577 577
578 bool HandleWindowSnap(int action) { 578 bool HandleWindowSnap(int action) {
579 wm::WindowState* window_state = wm::GetActiveWindowState(); 579 wm::WindowState* window_state = wm::GetActiveWindowState();
580 // Disable window snapping shortcut key for full screen window due to 580 // Disable window snapping shortcut key for full screen window due to
581 // http://crbug.com/135487. 581 // http://crbug.com/135487.
582 if (!window_state || 582 if (!window_state ||
583 window_state->window()->type() != aura::client::WINDOW_TYPE_NORMAL || 583 window_state->window()->type() != ui::wm::WINDOW_TYPE_NORMAL ||
584 window_state->IsFullscreen()) { 584 window_state->IsFullscreen()) {
585 return false; 585 return false;
586 } 586 }
587 587
588 if (action == WINDOW_SNAP_LEFT) { 588 if (action == WINDOW_SNAP_LEFT) {
589 content::RecordAction(UserMetricsAction("Accel_Window_Snap_Left")); 589 content::RecordAction(UserMetricsAction("Accel_Window_Snap_Left"));
590 } else { 590 } else {
591 content::RecordAction(UserMetricsAction("Accel_Window_Snap_Right")); 591 content::RecordAction(UserMetricsAction("Accel_Window_Snap_Right"));
592 } 592 }
593 593
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 keyboard_brightness_control_delegate) { 1206 keyboard_brightness_control_delegate) {
1207 keyboard_brightness_control_delegate_ = 1207 keyboard_brightness_control_delegate_ =
1208 keyboard_brightness_control_delegate.Pass(); 1208 keyboard_brightness_control_delegate.Pass();
1209 } 1209 }
1210 1210
1211 bool AcceleratorController::CanHandleAccelerators() const { 1211 bool AcceleratorController::CanHandleAccelerators() const {
1212 return true; 1212 return true;
1213 } 1213 }
1214 1214
1215 } // namespace ash 1215 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/display/screen_position_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698