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

Issue 130673002: Explicitly use Cmd+w for "Close Window" in apps. (Mac) (Closed)

Created:
6 years, 11 months ago by jackhou1
Modified:
6 years, 11 months ago
Reviewers:
tapted
CC:
chromium-reviews
Visibility:
Public.

Description

Explicitly use Cmd+w for "Close Window" in apps. (Mac) Previously, the "Close Window" item is copied from Chrome's "File" menu. However, the key equivalent of this item changes between Cmd+Shift+w and Cmd+w depending on whether a tabbed window has focus. This happens in -[AppControllerMac adjustCloseWindowMenuItemKeyEquivalent:]. This causes a bug when the item in the app's menu does not match the one in Chrome's. OSX will remove the keyboard shortcut for any items that have a matching title but different key equivalents. In this CL, the key equivalent is always set to Cmd+w in the app's menu. The "Close Window" item in Chrome will be changed to Cmd+w when an app window gains focus. Duplicate items are allowed to share a key equivalent if their titles match. BUG=302117 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=244133

Patch Set 1 #

Total comments: 2

Patch Set 2 : Add comment. Fix line length. #

Total comments: 2

Patch Set 3 : Update comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -0 lines) Patch
M chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm View 1 2 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
jackhou1
6 years, 11 months ago (2014-01-09 04:04:29 UTC) #1
tapted
https://codereview.chromium.org/130673002/diff/1/chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm File chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm (right): https://codereview.chromium.org/130673002/diff/1/chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm#newcode243 chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm:243: [[[fileMenuItem_ submenu] itemWithTag:IDC_CLOSE_WINDOW] setKeyEquivalent:@"w"]; Do you need to hook ...
6 years, 11 months ago (2014-01-09 04:35:05 UTC) #2
jackhou1
https://codereview.chromium.org/130673002/diff/1/chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm File chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm (right): https://codereview.chromium.org/130673002/diff/1/chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm#newcode243 chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm:243: [[[fileMenuItem_ submenu] itemWithTag:IDC_CLOSE_WINDOW] setKeyEquivalent:@"w"]; On 2014/01/09 04:35:05, tapted wrote: ...
6 years, 11 months ago (2014-01-09 06:18:56 UTC) #3
tapted
https://codereview.chromium.org/130673002/diff/60001/chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm File chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm (right): https://codereview.chromium.org/130673002/diff/60001/chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm#newcode240 chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm:240: // Set the expected key equivalent explicitly here because ...
6 years, 11 months ago (2014-01-09 06:54:55 UTC) #4
jackhou1
https://codereview.chromium.org/130673002/diff/60001/chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm File chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm (right): https://codereview.chromium.org/130673002/diff/60001/chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm#newcode240 chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm:240: // Set the expected key equivalent explicitly here because ...
6 years, 11 months ago (2014-01-09 22:44:07 UTC) #5
tapted
lgtm . I think you can be more confident in the CL description too - ...
6 years, 11 months ago (2014-01-09 23:24:47 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jackhou@chromium.org/130673002/110001
6 years, 11 months ago (2014-01-10 04:47:52 UTC) #7
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=244632
6 years, 11 months ago (2014-01-10 06:55:42 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jackhou@chromium.org/130673002/110001
6 years, 11 months ago (2014-01-10 07:46:25 UTC) #9
commit-bot: I haz the power
6 years, 11 months ago (2014-01-10 09:11:59 UTC) #10
Message was sent while issue was closed.
Change committed as 244133

Powered by Google App Engine
This is Rietveld 408576698