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

Unified Diff: ash/accelerators/accelerator_delegate.cc

Issue 1502993004: Make sure Search+<key(s)> are un-interceptable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding a unit test. Created 5 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 side-by-side diff with in-line comments
Download patch
Index: ash/accelerators/accelerator_delegate.cc
diff --git a/ash/accelerators/accelerator_delegate.cc b/ash/accelerators/accelerator_delegate.cc
index bcdc75e0774d051e870bd530dc61319582f2cab3..e8158815ff8bb51a9cf400771b6b9e09b2e2040b 100644
--- a/ash/accelerators/accelerator_delegate.cc
+++ b/ash/accelerators/accelerator_delegate.cc
@@ -51,6 +51,11 @@ bool AcceleratorDelegate::CanConsumeSystemKeys(const ui::KeyEvent& event) {
bool AcceleratorDelegate::ShouldProcessAcceleratorNow(
const ui::KeyEvent& event,
const ui::Accelerator& accelerator) {
+ // On ChromeOS, If the accelerator is Search+<key(s)> then it must never be
+ // intercepted by apps or windows.
+ if (accelerator.IsCmdDown())
+ return true;
+
aura::Window* target = static_cast<aura::Window*>(event.target());
DCHECK(target);
« no previous file with comments | « no previous file | ash/accelerators/accelerator_filter_unittest.cc » ('j') | ash/accelerators/accelerator_filter_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698