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

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: windows change not needed :/ 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
« 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: 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 ||
+ commandId == IDC_EXIT) {
// Not invoking +[BrowserWindowUtils handleKeyboardEvent here], since the
// window in question is a ConstrainedWindowCustomWindow, not a
// BrowserWindow.
« 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