Chromium Code Reviews| 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. |