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

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

Issue 10700151: Disable windows dock shortcut key for fullscreen mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | no next file » | 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 <cmath> 7 #include <cmath>
8 8
9 #include "ash/accelerators/accelerator_table.h" 9 #include "ash/accelerators/accelerator_table.h"
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 return true; 517 return true;
518 case SELECT_WIN_7: 518 case SELECT_WIN_7:
519 SwitchToWindow(7); 519 SwitchToWindow(7);
520 return true; 520 return true;
521 case SELECT_LAST_WIN: 521 case SELECT_LAST_WIN:
522 SwitchToWindow(-1); 522 SwitchToWindow(-1);
523 return true; 523 return true;
524 case WINDOW_SNAP_LEFT: 524 case WINDOW_SNAP_LEFT:
525 case WINDOW_SNAP_RIGHT: { 525 case WINDOW_SNAP_RIGHT: {
526 aura::Window* window = wm::GetActiveWindow(); 526 aura::Window* window = wm::GetActiveWindow();
527 if (!window) 527 // Disable window docking shortcut key due to http://crbug.com/135487.
528 if (!window || wm::IsWindowFullscreen(window))
528 break; 529 break;
529 internal::SnapSizer sizer(window, 530 internal::SnapSizer sizer(window,
530 gfx::Point(), 531 gfx::Point(),
531 action == WINDOW_SNAP_LEFT ? internal::SnapSizer::LEFT_EDGE : 532 action == WINDOW_SNAP_LEFT ? internal::SnapSizer::LEFT_EDGE :
532 internal::SnapSizer::RIGHT_EDGE, 533 internal::SnapSizer::RIGHT_EDGE,
533 shell->GetGridSize()); 534 shell->GetGridSize());
534 if (wm::IsWindowFullscreen(window) || 535 if (wm::IsWindowFullscreen(window) ||
535 wm::IsWindowMaximized(window)) { 536 wm::IsWindowMaximized(window)) {
536 SetRestoreBounds(window, sizer.GetSnapBounds(window->bounds())); 537 SetRestoreBounds(window, sizer.GetSnapBounds(window->bounds()));
537 wm::RestoreWindow(window); 538 wm::RestoreWindow(window);
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 // Then set this one as active. 677 // Then set this one as active.
677 Shell::GetInstance()->launcher()->ActivateLauncherItem(found_index); 678 Shell::GetInstance()->launcher()->ActivateLauncherItem(found_index);
678 } 679 }
679 } 680 }
680 681
681 bool AcceleratorController::CanHandleAccelerators() const { 682 bool AcceleratorController::CanHandleAccelerators() const {
682 return true; 683 return true;
683 } 684 }
684 685
685 } // namespace ash 686 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698