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

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

Issue 2115663002: Folds methods in WmShellCommon to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 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
« no previous file with comments | « ash/accelerators/accelerator_commands.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 <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1423 } 1423 }
1424 if (WmShell::Get()->IsSystemModalWindowOpen() && 1424 if (WmShell::Get()->IsSystemModalWindowOpen() &&
1425 actions_allowed_at_modal_window_.find(action) == 1425 actions_allowed_at_modal_window_.find(action) ==
1426 actions_allowed_at_modal_window_.end()) { 1426 actions_allowed_at_modal_window_.end()) {
1427 // Note we prevent the shortcut from propagating so it will not 1427 // Note we prevent the shortcut from propagating so it will not
1428 // be passed to the modal window. This is important for things like 1428 // be passed to the modal window. This is important for things like
1429 // Alt+Tab that would cause an undesired effect in the modal window by 1429 // Alt+Tab that would cause an undesired effect in the modal window by
1430 // cycling through its window elements. 1430 // cycling through its window elements.
1431 return RESTRICTION_PREVENT_PROCESSING_AND_PROPAGATION; 1431 return RESTRICTION_PREVENT_PROCESSING_AND_PROPAGATION;
1432 } 1432 }
1433 if (shell->mru_window_tracker()->BuildMruWindowList().empty() && 1433 if (wm_shell->mru_window_tracker()->BuildMruWindowList().empty() &&
1434 actions_needing_window_.find(action) != actions_needing_window_.end()) { 1434 actions_needing_window_.find(action) != actions_needing_window_.end()) {
1435 wm_shell->GetAccessibilityDelegate()->TriggerAccessibilityAlert( 1435 wm_shell->GetAccessibilityDelegate()->TriggerAccessibilityAlert(
1436 A11Y_ALERT_WINDOW_NEEDED); 1436 A11Y_ALERT_WINDOW_NEEDED);
1437 return RESTRICTION_PREVENT_PROCESSING_AND_PROPAGATION; 1437 return RESTRICTION_PREVENT_PROCESSING_AND_PROPAGATION;
1438 } 1438 }
1439 return RESTRICTION_NONE; 1439 return RESTRICTION_NONE;
1440 } 1440 }
1441 1441
1442 void AcceleratorController::SetKeyboardBrightnessControlDelegate( 1442 void AcceleratorController::SetKeyboardBrightnessControlDelegate(
1443 std::unique_ptr<KeyboardBrightnessControlDelegate> 1443 std::unique_ptr<KeyboardBrightnessControlDelegate>
1444 keyboard_brightness_control_delegate) { 1444 keyboard_brightness_control_delegate) {
1445 keyboard_brightness_control_delegate_ = 1445 keyboard_brightness_control_delegate_ =
1446 std::move(keyboard_brightness_control_delegate); 1446 std::move(keyboard_brightness_control_delegate);
1447 } 1447 }
1448 1448
1449 } // namespace ash 1449 } // namespace ash
OLDNEW
« no previous file with comments | « ash/accelerators/accelerator_commands.cc ('k') | ash/ash.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698