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

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

Issue 2084503007: Moves WindowSelectorController onto WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_overview
Patch Set: fix mash Created 4 years, 6 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
« no previous file with comments | « no previous file | ash/aura/wm_shell_aura.h » ('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 <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 } 502 }
503 503
504 void HandleToggleFullscreen(const ui::Accelerator& accelerator) { 504 void HandleToggleFullscreen(const ui::Accelerator& accelerator) {
505 if (accelerator.key_code() == ui::VKEY_MEDIA_LAUNCH_APP2) 505 if (accelerator.key_code() == ui::VKEY_MEDIA_LAUNCH_APP2)
506 base::RecordAction(UserMetricsAction("Accel_Fullscreen_F4")); 506 base::RecordAction(UserMetricsAction("Accel_Fullscreen_F4"));
507 accelerators::ToggleFullscreen(); 507 accelerators::ToggleFullscreen();
508 } 508 }
509 509
510 void HandleToggleOverview() { 510 void HandleToggleOverview() {
511 base::RecordAction(base::UserMetricsAction("Accel_Overview_F5")); 511 base::RecordAction(base::UserMetricsAction("Accel_Overview_F5"));
512 Shell::GetInstance()->window_selector_controller()->ToggleOverview(); 512 WmShell::Get()->window_selector_controller()->ToggleOverview();
513 } 513 }
514 514
515 bool CanHandleWindowSnapOrDock() { 515 bool CanHandleWindowSnapOrDock() {
516 wm::WindowState* window_state = wm::GetActiveWindowState(); 516 wm::WindowState* window_state = wm::GetActiveWindowState();
517 // Disable window snapping shortcut key for full screen window due to 517 // Disable window snapping shortcut key for full screen window due to
518 // http://crbug.com/135487. 518 // http://crbug.com/135487.
519 return (window_state && window_state->IsUserPositionable() && 519 return (window_state && window_state->IsUserPositionable() &&
520 !window_state->IsFullscreen()); 520 !window_state->IsFullscreen());
521 } 521 }
522 522
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
1461 } 1461 }
1462 1462
1463 void AcceleratorController::SetKeyboardBrightnessControlDelegate( 1463 void AcceleratorController::SetKeyboardBrightnessControlDelegate(
1464 std::unique_ptr<KeyboardBrightnessControlDelegate> 1464 std::unique_ptr<KeyboardBrightnessControlDelegate>
1465 keyboard_brightness_control_delegate) { 1465 keyboard_brightness_control_delegate) {
1466 keyboard_brightness_control_delegate_ = 1466 keyboard_brightness_control_delegate_ =
1467 std::move(keyboard_brightness_control_delegate); 1467 std::move(keyboard_brightness_control_delegate);
1468 } 1468 }
1469 1469
1470 } // namespace ash 1470 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/aura/wm_shell_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698