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

Unified Diff: chrome/browser/ui/cocoa/profiles/user_manager_mac.mm

Issue 553133002: [Mac] Add text-editing accelerators to the User Manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
Index: chrome/browser/ui/cocoa/profiles/user_manager_mac.mm
diff --git a/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm b/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm
index 957d95ba57bb6b8b04cab3e077f8fa47836a668c..be3f56625b87c638c7525db1bd08b19783635c62 100644
--- a/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm
+++ b/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm
@@ -55,10 +55,13 @@ class UserManagerWebContentsDelegate : public content::WebContentsDelegate {
if (![BrowserWindowUtils shouldHandleKeyboardEvent:event])
return;
+ // -getCommandId returns -1 if the event isn't a chrome keyboard shortcut.
int commandId = [BrowserWindowUtils getCommandId:event];
- // Since the User Manager is a "top level" window, only handle close events.
- if (commandId == IDC_CLOSE_WINDOW || commandId == IDC_EXIT) {
+ // From the chrome accelerators, only handle close window accelerators, and
+ // allow all other accelerators to be handled by the web contents.
+ if (commandId == -1 || commandId == IDC_CLOSE_WINDOW ||
groby-ooo-7-16 2014/09/10 16:38:21 No support for IDC_CLOSE_TAB? (which is cmd-w. CLO
noms (inactive) 2014/09/10 16:55:09 According to https://code.google.com/p/chromium/co
groby-ooo-7-16 2014/09/10 20:06:40 Sigh. It turns out that the "Close window" entry i
+ commandId == IDC_EXIT) {
// Not invoking +[BrowserWindowUtils handleKeyboardEvent here], since the
// window in question is a ConstrainedWindowCustomWindow, not a
// BrowserWindow.

Powered by Google App Engine
This is Rietveld 408576698