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

Issue 64273008: [Windows] Finish global and non-global media keys support on Windows. (Closed)

Created:
7 years, 1 month ago by zhchbin
Modified:
7 years ago
Reviewers:
Finnur, sky
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, tfarina, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

[Windows] Finish global and non-global media keys support on Windows. This patch make sure that Media keys go to all apps/extensions that register for them. BUG=131612, 302437 TEST=interactive_ui_tests --gtest_filter=CommandsApiTest.AllowDuplicatedMediaKeys TEST=interactive_ui_tests --gtest_filter=GlobalCommandsApiTest.GlobalDuplicatedMediaKey Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=236707

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Nits. #

Patch Set 4 : #

Total comments: 57

Patch Set 5 : Address some comments. #

Total comments: 6

Patch Set 6 : Update. #

Total comments: 4

Patch Set 7 : Cocoa support #

Patch Set 8 : Fix DCHECK fail of accelerator_manager && Sync. #

Patch Set 9 : Address comments. #

Total comments: 25

Patch Set 10 : Address comments again... #

Total comments: 4

Patch Set 11 : Nits. #

Patch Set 12 : gclient sync #

Patch Set 13 : Fix the test case!! #

Total comments: 2

Patch Set 14 : nit. #

Total comments: 11

Patch Set 15 : Address @sky's comment. #

Total comments: 2

Patch Set 16 : Syntax of DCHECK_EQ. #

Patch Set 17 : nit. #

Patch Set 18 : gclient sync. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+333 lines, -88 lines) Patch
M chrome/browser/extensions/api/commands/command_service.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/commands/command_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 7 chunks +47 lines, -9 lines 0 comments Download
M chrome/browser/extensions/extension_commands_global_registry.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +9 lines, -11 lines 0 comments Download
M chrome/browser/extensions/extension_commands_global_registry_apitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +34 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_keybinding_apitest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +26 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_keybinding_registry.h View 1 2 3 4 5 6 7 8 9 2 chunks +14 lines, -7 lines 0 comments Download
M chrome/browser/extensions/extension_keybinding_registry.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +32 lines, -13 lines 0 comments Download
M chrome/browser/extensions/global_shortcut_listener_win.cc View 1 2 3 4 5 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/extensions/global_shortcut_listener_x11.cc View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 7 chunks +30 lines, -15 lines 0 comments Download
M chrome/browser/ui/gtk/extensions/extension_keybinding_registry_gtk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +20 lines, -16 lines 0 comments Download
M chrome/browser/ui/views/extensions/extension_keybinding_registry_views.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +12 lines, -13 lines 0 comments Download
A + chrome/test/data/extensions/api_test/keybinding/global_media_keys_0/background.js View 1 chunk +1 line, -1 line 0 comments Download
A chrome/test/data/extensions/api_test/keybinding/global_media_keys_0/manifest.json View 1 2 1 chunk +24 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/api_test/keybinding/global_media_keys_1/background.js View 1 chunk +1 line, -1 line 0 comments Download
A chrome/test/data/extensions/api_test/keybinding/global_media_keys_1/manifest.json View 1 2 3 4 1 chunk +24 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/api_test/keybinding/non_global_media_keys_0/background.js View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
A chrome/test/data/extensions/api_test/keybinding/non_global_media_keys_0/manifest.json View 1 2 3 4 1 chunk +22 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/api_test/keybinding/non_global_media_keys_1/background.js View 1 chunk +1 line, -1 line 0 comments Download
A chrome/test/data/extensions/api_test/keybinding/non_global_media_keys_1/manifest.json View 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
zhchbin
PTAL :)
7 years, 1 month ago (2013-11-12 14:29:29 UTC) #1
Finnur
Great to see progress here. Thank you for working on this. A few questions/comments... https://codereview.chromium.org/64273008/diff/80001/chrome/browser/extensions/api/commands/command_service.cc ...
7 years, 1 month ago (2013-11-12 16:27:53 UTC) #2
zhchbin
Updated. https://codereview.chromium.org/64273008/diff/80001/chrome/browser/extensions/api/commands/command_service.cc File chrome/browser/extensions/api/commands/command_service.cc (right): https://codereview.chromium.org/64273008/diff/80001/chrome/browser/extensions/api/commands/command_service.cc#newcode118 chrome/browser/extensions/api/commands/command_service.cc:118: // staitc On 2013/11/12 16:27:54, Finnur wrote: > ...
7 years, 1 month ago (2013-11-13 05:01:57 UTC) #3
Finnur
There's a typo in the CL description: "non-gloabl" Apart from that, here are my comments: ...
7 years, 1 month ago (2013-11-13 10:22:24 UTC) #4
zhchbin
PTAL. https://codereview.chromium.org/64273008/diff/80001/chrome/browser/extensions/api/commands/command_service.cc File chrome/browser/extensions/api/commands/command_service.cc (right): https://codereview.chromium.org/64273008/diff/80001/chrome/browser/extensions/api/commands/command_service.cc#newcode212 chrome/browser/extensions/api/commands/command_service.cc:212: if (IsMediaKey(accelerator)) On 2013/11/13 10:22:24, Finnur wrote: > ...
7 years, 1 month ago (2013-11-13 16:05:10 UTC) #5
Finnur
Sorry for the lack of updates on this; I started reviewing, then got distracted with ...
7 years, 1 month ago (2013-11-15 21:10:10 UTC) #6
zhchbin
> Sorry for the lack of updates on this; I started reviewing, then got distracted ...
7 years, 1 month ago (2013-11-16 01:33:30 UTC) #7
Finnur
https://codereview.chromium.org/64273008/diff/80001/chrome/browser/extensions/api/commands/command_service.cc File chrome/browser/extensions/api/commands/command_service.cc (right): https://codereview.chromium.org/64273008/diff/80001/chrome/browser/extensions/api/commands/command_service.cc#newcode338 chrome/browser/extensions/api/commands/command_service.cc:338: extensions::CommandService::IsMediaKey(iter->second.accelerator())) { Hmm... Are they already reserved? OK, then ...
7 years, 1 month ago (2013-11-18 11:16:13 UTC) #8
zhchbin
https://codereview.chromium.org/64273008/diff/80001/chrome/browser/extensions/api/commands/command_service.cc File chrome/browser/extensions/api/commands/command_service.cc (right): https://codereview.chromium.org/64273008/diff/80001/chrome/browser/extensions/api/commands/command_service.cc#newcode338 chrome/browser/extensions/api/commands/command_service.cc:338: extensions::CommandService::IsMediaKey(iter->second.accelerator())) { On 2013/11/18 11:16:14, Finnur wrote: > Hmm... ...
7 years, 1 month ago (2013-11-18 13:10:13 UTC) #9
Finnur
https://codereview.chromium.org/64273008/diff/80001/chrome/browser/extensions/extension_commands_global_registry_apitest.cc File chrome/browser/extensions/extension_commands_global_registry_apitest.cc (right): https://codereview.chromium.org/64273008/diff/80001/chrome/browser/extensions/extension_commands_global_registry_apitest.cc#newcode97 chrome/browser/extensions/extension_commands_global_registry_apitest.cc:97: // TODO(zhchbin): Clear up the comment. I think this ...
7 years, 1 month ago (2013-11-18 14:14:53 UTC) #10
zhchbin
https://codereview.chromium.org/64273008/diff/80001/chrome/browser/extensions/extension_commands_global_registry_apitest.cc File chrome/browser/extensions/extension_commands_global_registry_apitest.cc (right): https://codereview.chromium.org/64273008/diff/80001/chrome/browser/extensions/extension_commands_global_registry_apitest.cc#newcode97 chrome/browser/extensions/extension_commands_global_registry_apitest.cc:97: // TODO(zhchbin): Clear up the comment. Em... first of ...
7 years, 1 month ago (2013-11-18 14:54:43 UTC) #11
zhchbin
I will "gclient sync" the code as soon as I can.
7 years, 1 month ago (2013-11-18 14:59:43 UTC) #12
Finnur
OK, I think I have grok'ed the problem now. What happens if you use SendKeyPressImpl ...
7 years, 1 month ago (2013-11-19 13:48:09 UTC) #13
zhchbin
On 2013/11/19 13:48:09, Finnur wrote: > OK, I think I have grok'ed the problem now. ...
7 years, 1 month ago (2013-11-19 14:02:03 UTC) #14
Finnur
Um, no. Probably easier to temporarily modify (purely for testing purposes) the relevant SendKeyPressFoo function ...
7 years, 1 month ago (2013-11-19 14:27:47 UTC) #15
zhchbin
On 2013/11/19 14:27:47, Finnur wrote: > Um, no. Probably easier to temporarily modify (purely for ...
7 years, 1 month ago (2013-11-19 14:54:22 UTC) #16
Finnur
Excellent! LGTM, with one nit. https://codereview.chromium.org/64273008/diff/1070001/chrome/browser/extensions/api/commands/command_service.cc File chrome/browser/extensions/api/commands/command_service.cc (right): https://codereview.chromium.org/64273008/diff/1070001/chrome/browser/extensions/api/commands/command_service.cc#newcode219 chrome/browser/extensions/api/commands/command_service.cc:219: command_name != manifest_values::kScriptBadgeCommandEvent); nit: ...
7 years, 1 month ago (2013-11-19 15:29:47 UTC) #17
zhchbin
@finnur, thanks for the review! @sky, ping for an owner approve: chrome/browser/ui/*. Due to the ...
7 years, 1 month ago (2013-11-19 15:49:10 UTC) #18
sky
https://codereview.chromium.org/64273008/diff/1280001/chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa.mm File chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa.mm (right): https://codereview.chromium.org/64273008/diff/1280001/chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa.mm#newcode53 chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa.mm:53: if (first_target == targets->second.end()) Is there a reason to ...
7 years, 1 month ago (2013-11-19 16:54:46 UTC) #19
zhchbin
Ping Finnur for a double check about cocoa's change. @sky, I didn't have MAC development ...
7 years, 1 month ago (2013-11-20 02:05:40 UTC) #20
Finnur
Agree with the changes you made to the .mm. https://codereview.chromium.org/64273008/diff/1280001/chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa.mm File chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa.mm (right): https://codereview.chromium.org/64273008/diff/1280001/chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa.mm#newcode53 chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa.mm:53: ...
7 years, 1 month ago (2013-11-20 13:26:38 UTC) #21
zhchbin
https://codereview.chromium.org/64273008/diff/1320001/chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa.mm File chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa.mm (right): https://codereview.chromium.org/64273008/diff/1320001/chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa.mm#newcode79 chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa.mm:79: DCHECK_EQ(targets->second.size(), 1u); On 2013/11/20 13:26:39, Finnur wrote: > The ...
7 years, 1 month ago (2013-11-20 15:03:02 UTC) #22
zhchbin
Ping @sky again. PTAL if you are available.
7 years, 1 month ago (2013-11-21 13:48:06 UTC) #23
sky
LGTM
7 years ago (2013-11-21 16:46:59 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/zhchbin@gmail.com/64273008/1570001
7 years ago (2013-11-21 16:47:38 UTC) #25
commit-bot: I haz the power
Failed to apply patch for chrome/browser/extensions/extension_keybinding_registry.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years ago (2013-11-21 19:06:51 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/zhchbin@gmail.com/64273008/1920001
7 years ago (2013-11-22 03:12:55 UTC) #27
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=193692
7 years ago (2013-11-22 04:56:51 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/zhchbin@gmail.com/64273008/1920001
7 years ago (2013-11-22 06:15:54 UTC) #29
commit-bot: I haz the power
7 years ago (2013-11-22 07:20:04 UTC) #30
Message was sent while issue was closed.
Change committed as 236707

Powered by Google App Engine
This is Rietveld 408576698