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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 11192016: Revert 162240 - See also: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/accelerators/accelerator_controller.h ('k') | ash/accelerators/accelerator_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller.cc
===================================================================
--- ash/accelerators/accelerator_controller.cc (revision 162263)
+++ ash/accelerators/accelerator_controller.cc (working copy)
@@ -359,12 +359,12 @@
actions_allowed_at_lock_screen_.insert(
kActionsAllowedAtLoginOrLockScreen[i]);
}
- for (size_t i = 0; i < kActionsAllowedAtLockScreenLength; ++i)
+ for (size_t i = 0; i < kActionsAllowedAtLockScreenLength; ++i) {
actions_allowed_at_lock_screen_.insert(kActionsAllowedAtLockScreen[i]);
- for (size_t i = 0; i < kActionsAllowedAtModalWindowLength; ++i)
- actions_allowed_at_modal_window_.insert(kActionsAllowedAtModalWindow[i]);
- for (size_t i = 0; i < kReservedActionsLength; ++i)
+ }
+ for (size_t i = 0; i < kReservedActionsLength; ++i) {
reserved_actions_.insert(kReservedActions[i]);
+ }
RegisterAccelerators(kAcceleratorData, kAcceleratorDataLength);
@@ -421,25 +421,18 @@
#if defined(OS_CHROMEOS)
at_login_screen = shell->delegate() && !shell->delegate()->IsSessionStarted();
#endif
+ bool at_lock_screen = shell->IsScreenLocked();
+
if (at_login_screen &&
actions_allowed_at_login_screen_.find(action) ==
actions_allowed_at_login_screen_.end()) {
return false;
}
- if (shell->IsScreenLocked() &&
+ if (at_lock_screen &&
actions_allowed_at_lock_screen_.find(action) ==
actions_allowed_at_lock_screen_.end()) {
return false;
}
- if (shell->IsModalWindowOpen() &&
- actions_allowed_at_modal_window_.find(action) ==
- actions_allowed_at_modal_window_.end()) {
- // Note: we return true. This indicates the shortcut is handled
- // and will not be passed to the modal window. This is important
- // for things like Alt+Tab that would cause an undesired effect
- // in the modal window by cycling through its window elements.
- return true;
- }
const ui::KeyboardCode key_code = accelerator.key_code();
const ui::AcceleratorManagerContext& context =
« no previous file with comments | « ash/accelerators/accelerator_controller.h ('k') | ash/accelerators/accelerator_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698