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

Unified Diff: webkit/glue/webframeloaderclient_impl.cc

Issue 56150: Switch the new tab key to command on the Mac. Popping new tabs still doesn't ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webframeloaderclient_impl.cc
===================================================================
--- webkit/glue/webframeloaderclient_impl.cc (revision 12895)
+++ webkit/glue/webframeloaderclient_impl.cc (working copy)
@@ -1563,14 +1563,18 @@
return false;
const MouseEvent* event = static_cast<const MouseEvent*>(action.event());
- const bool middle_or_ctrl = (event->button() == 1) || event->ctrlKey();
+#if defined(OS_WIN) || defined(OS_LINUX)
+ const bool new_tab_modifier = (event->button() == 1) || event->ctrlKey();
+#elif defined(OS_MACOSX)
+ const bool new_tab_modifier = (event->button() == 1) || event->metaKey();
+#endif
const bool shift = event->shiftKey();
const bool alt = event->altKey();
- if (!middle_or_ctrl && !shift && !alt)
+ if (!new_tab_modifier && !shift && !alt)
return false;
DCHECK(disposition);
- if (middle_or_ctrl)
+ if (new_tab_modifier)
*disposition = shift ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB;
else
*disposition = shift ? NEW_WINDOW : SAVE_TO_DISK;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698