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

Unified Diff: chrome/browser/ui/browser.cc

Issue 10444047: Modify Browser::IsReservedCommandOrKey() to make sure it returns false when an Ash shortcut is pres… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 8 years, 7 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 | « no previous file | chrome/browser/ui/browser_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 259099284eeda44650e8e3a86d02cd21445b61d3..1c0e25290cb7bafd9e79ade22db6dea1e5d5fa2e 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -2318,10 +2318,12 @@ bool Browser::IsReservedCommandOrKey(int command_id,
// crbug.com/127333#c8
ui::KeyboardCode key_code =
static_cast<ui::KeyboardCode>(event.windowsKeyCode);
- if (key_code == ui::VKEY_F1 ||
- key_code == ui::VKEY_F2 ||
- key_code == ui::VKEY_F3 ||
- key_code == ui::VKEY_F4) {
+ if ((key_code == ui::VKEY_F1 ||
+ key_code == ui::VKEY_F2 ||
+ key_code == ui::VKEY_F3 ||
+ key_code == ui::VKEY_F4) &&
+ // Make sure it's a browser shortcut (i.e. not an Ash one like Alt+F4).
+ command_id != -1) {
return true;
}
#endif
« no previous file with comments | « no previous file | chrome/browser/ui/browser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698