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

Issue 408973002: mac: Load the system hotkeys after launch. (reland) (Closed)

Created:
6 years, 5 months ago by erikchen
Modified:
6 years, 4 months ago
CC:
chromium-reviews, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, jam, penghuang+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, asvitkine+watch_chromium.org, James Su, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

mac: Load the system hotkeys after launch. (reland) ---------------Reland CL Description--------------------------- System mouse hotkeys were incorrectly being parsed as system keyboard hotkeys. Other minor changes include: - Expanded unit tests to include a sparsely populated symbolichotkeys.plist from a real machine. - Use correct types for the key_code and modifiers of the event. - An event must have at least one of ctr/alt/cmd down to be considered a hotkey. - Use the NSDeviceIndependentModifierFlagsMask mask to prune out device-dependent modifier flags, including event coalescing information. ---------------Original CL Description--------------------------- Original CL: https://codereview.chromium.org/370293004/ Shortly after launch, the system hotkeys are loaded and parsed. If a hotkey is reserved by the system, it is not passed to the renderer. This allows system hotkeys like (cmd + `) to work even if a flash plugin is selected. Add a histogram to ensure that the system hotkey plist is being correctly loaded and parsed. BUG=383558, 395187 TEST=Open 2 Chrome windows. Navigate one to www.twitch.tv. The site should include a flash plugin that automatically starts playing a video. Select the flash plugin. The hotkey combination (cmd + `) should switch between the open windows. The hotkey combination (cmd + L) should have no effect (it is a Chrome hotkey, not a browser hotkey). Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=286737

Patch Set 1 : Copy of patch set 7 from https://codereview.chromium.org/370293004/ #

Patch Set 2 : Don't parse mouse hotkeys as keyboard hotkeys. #

Total comments: 4

Patch Set 3 : Don't parse mouse hotkeys as keyboard hotkeys. Same as patch set 2, but the diff is against a different base. #

Patch Set 4 : Comments from rsesek. #

Total comments: 2

Patch Set 5 : Add more unit tests. #

Patch Set 6 : Add more unit tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+620 lines, -1109 lines) Patch
D chrome/browser/ui/cocoa/system_hotkey_map.h View 2 1 chunk +0 lines, -44 lines 0 comments Download
D chrome/browser/ui/cocoa/system_hotkey_map.mm View 2 1 chunk +0 lines, -131 lines 0 comments Download
D chrome/browser/ui/cocoa/system_hotkey_map_unittest.mm View 2 1 chunk +0 lines, -51 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 2 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 2 1 chunk +0 lines, -1 line 0 comments Download
D chrome/test/data/mac/mac_system_hotkeys.plist View 2 1 chunk +0 lines, -866 lines 0 comments Download
M content/browser/browser_main_loop.cc View 2 2 chunks +2 lines, -0 lines 0 comments Download
A content/browser/cocoa/system_hotkey_helper_mac.h View 2 1 chunk +56 lines, -0 lines 0 comments Download
A content/browser/cocoa/system_hotkey_helper_mac.mm View 2 1 chunk +77 lines, -0 lines 0 comments Download
A content/browser/cocoa/system_hotkey_map.h View 1 2 3 4 1 chunk +66 lines, -0 lines 0 comments Download
A + content/browser/cocoa/system_hotkey_map.mm View 1 2 3 4 8 chunks +49 lines, -15 lines 0 comments Download
A content/browser/cocoa/system_hotkey_map_unittest.mm View 1 2 3 4 5 1 chunk +196 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 2 4 chunks +30 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 2 1 chunk +4 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 2 1 chunk +1 line, -0 lines 0 comments Download
A + content/test/data/mac/mac_system_hotkeys.plist View 2 0 chunks +-1 lines, --1 lines 0 comments Download
A content/test/data/mac/mac_system_hotkeys_sparse.plist View 1 1 chunk +133 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
erikchen
rsesek: Please review.
6 years, 5 months ago (2014-07-21 23:10:27 UTC) #1
Robert Sesek
https://codereview.chromium.org/408973002/diff/60001/content/browser/cocoa/system_hotkey_map_unittest.mm File content/browser/cocoa/system_hotkey_map_unittest.mm (right): https://codereview.chromium.org/408973002/diff/60001/content/browser/cocoa/system_hotkey_map_unittest.mm#newcode17 content/browser/cocoa/system_hotkey_map_unittest.mm:17: NSData* DataFromTestFile(const char* file) { I'd put this as ...
6 years, 5 months ago (2014-07-22 17:15:25 UTC) #2
erikchen
rsesek: PTAL Diff patch set 4 against patch set 3. https://codereview.chromium.org/408973002/diff/60001/content/browser/cocoa/system_hotkey_map_unittest.mm File content/browser/cocoa/system_hotkey_map_unittest.mm (right): https://codereview.chromium.org/408973002/diff/60001/content/browser/cocoa/system_hotkey_map_unittest.mm#newcode17 ...
6 years, 5 months ago (2014-07-22 18:30:57 UTC) #3
Robert Sesek
Is the regression test for https://code.google.com/p/chromium/issues/detail?id=395187 just parsing the mouse keys? Also, you should set ...
6 years, 5 months ago (2014-07-23 15:34:07 UTC) #4
erikchen
rsesek: PTAL https://codereview.chromium.org/408973002/diff/100001/content/browser/cocoa/system_hotkey_map_unittest.mm File content/browser/cocoa/system_hotkey_map_unittest.mm (right): https://codereview.chromium.org/408973002/diff/100001/content/browser/cocoa/system_hotkey_map_unittest.mm#newcode64 content/browser/cocoa/system_hotkey_map_unittest.mm:64: EXPECT_FALSE(map.IsHotkeyReserved(key_code, modifiers)); On 2014/07/23 15:34:07, rsesek wrote: ...
6 years, 5 months ago (2014-07-23 18:05:34 UTC) #5
Robert Sesek
LGTM
6 years, 5 months ago (2014-07-23 18:36:31 UTC) #6
erikchen
isherman: Looking for an owner review of tools/metrics/histograms/histograms.xml. This CL is a reland, and no ...
6 years, 5 months ago (2014-07-23 18:39:40 UTC) #7
Ilya Sherman
On 2014/07/23 18:39:40, erikchen wrote: > isherman: Looking for an owner review of > tools/metrics/histograms/histograms.xml. ...
6 years, 5 months ago (2014-07-23 19:45:18 UTC) #8
erikchen
avi: Please review.
6 years, 5 months ago (2014-07-23 19:49:27 UTC) #9
Avi (use Gerrit)
On 2014/07/23 19:49:27, erikchen wrote: > avi: Please review. Is there something that you want ...
6 years, 4 months ago (2014-07-28 15:25:13 UTC) #10
erikchen
avi: This is a reland of a change for which you were an original reviewer. ...
6 years, 4 months ago (2014-07-28 17:36:40 UTC) #11
Avi (use Gerrit)
Thanks! This all LGTM.
6 years, 4 months ago (2014-07-28 17:55:59 UTC) #12
erikchen
The CQ bit was checked by erikchen@chromium.org
6 years, 4 months ago (2014-07-30 17:10:48 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erikchen@chromium.org/408973002/140001
6 years, 4 months ago (2014-07-30 17:12:13 UTC) #14
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_x64_rel on tryserver.chromium.win ...
6 years, 4 months ago (2014-07-30 19:09:12 UTC) #15
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-07-31 00:54:32 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel/builds/1678)
6 years, 4 months ago (2014-07-31 00:54:33 UTC) #17
erikchen
The CQ bit was checked by erikchen@chromium.org
6 years, 4 months ago (2014-07-31 07:23:28 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erikchen@chromium.org/408973002/140001
6 years, 4 months ago (2014-07-31 07:25:35 UTC) #19
commit-bot: I haz the power
6 years, 4 months ago (2014-07-31 11:35:58 UTC) #20
Message was sent while issue was closed.
Change committed as 286737

Powered by Google App Engine
This is Rietveld 408576698