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

Issue 143493005: Allow extensions to remove and override the bookmark shortcut key (Closed)

Created:
6 years, 10 months ago by Mike Wittman
Modified:
6 years, 10 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, tfarina, extensions-reviews_chromium.org
Visibility:
Public.

Description

Allow extensions to remove and override the bookmark shortcut key This feature is enabled for dev behind the --enable-override-bookmarks-ui=1 feature flag, and for all releases for internal bookmarks extensions. Implements the shortcut key aspect of the Remove Bookmark Shortcut Chrome API proposal: https://docs.google.com/a/chromium.org/document/d/1C2Mle92O9uGlji5y5gGDM5tNJ_tVE1Vb-2xgsZPNDTk BUG=335655 R=erg@chromium.org, finnur@chromium.org, shess@chromium.org, sky@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=251368

Patch Set 1 #

Total comments: 15

Patch Set 2 : update Views implementation #

Patch Set 3 : address comments #

Patch Set 4 : add docs and tests #

Total comments: 3

Patch Set 5 : remove use of GetActiveDesktop() #

Total comments: 17

Patch Set 6 : address comments #

Total comments: 6

Patch Set 7 : unify override checking logic #

Total comments: 3

Patch Set 8 : address comment and remove unused function #

Patch Set 9 : address comment and remove unused function #

Patch Set 10 : mac test fix #

Total comments: 2

Patch Set 11 : update mac test fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+308 lines, -54 lines) Patch
M chrome/browser/extensions/api/commands/command_service.cc View 1 2 3 4 5 6 7 5 chunks +83 lines, -38 lines 0 comments Download
M chrome/browser/extensions/extension_keybinding_apitest.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +67 lines, -2 lines 0 comments Download
M chrome/browser/ui/accelerator_utils.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/accelerator_utils_cocoa.mm View 1 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/ui/gtk/accelerator_utils_gtk.cc View 1 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/ui/omnibox/location_bar.cc View 1 2 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/accelerator_utils_aura.cc View 1 2 3 4 2 chunks +25 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/manifest_types.json View 1 chunk +5 lines, -0 lines 0 comments Download
A chrome/common/extensions/docs/templates/articles/settings_override.html View 1 2 3 4 5 1 chunk +53 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/templates/json/manifest.json View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
A chrome/common/extensions/docs/templates/public/extensions/settings_override.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/manifest_handlers/settings_overrides_handler.h View 1 2 1 chunk +4 lines, -1 line 0 comments Download
M chrome/common/extensions/manifest_handlers/settings_overrides_handler.cc View 1 2 2 chunks +13 lines, -4 lines 0 comments Download
M chrome/test/data/extensions/api_test/keybinding/dont_overwrite_system/manifest.json View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/api_test/keybinding/overwrite_bookmark_shortcut/background.js View 1 2 3 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/test/data/extensions/api_test/keybinding/overwrite_bookmark_shortcut/manifest.json View 1 2 3 1 chunk +20 lines, -0 lines 0 comments Download
M ui/base/accelerators/accelerator.cc View 1 2 3 4 5 6 7 8 9 1 chunk +8 lines, -7 lines 0 comments Download

Messages

Total messages: 52 (0 generated)
Mike Wittman
PTAL kalman: chrome/{browser,commmon}/extensions sky: chrome/browser/ui, chrome/browser/ui/views shess: chrome/browser/ui/cocoa erg: chrome/browser/ui/gtk
6 years, 10 months ago (2014-02-04 19:57:14 UTC) #1
not at google - send to devlin
I'll let finnur take this one.
6 years, 10 months ago (2014-02-04 20:31:22 UTC) #2
sky
https://codereview.chromium.org/143493005/diff/1/chrome/browser/ui/views/accelerator_utils_views.cc File chrome/browser/ui/views/accelerator_utils_views.cc (right): https://codereview.chromium.org/143493005/diff/1/chrome/browser/ui/views/accelerator_utils_views.cc#newcode28 chrome/browser/ui/views/accelerator_utils_views.cc:28: ui::Accelerator GetChromeAcceleratorForCommandId(int command_id) { Accelerators handled in ash aren't ...
6 years, 10 months ago (2014-02-04 22:52:53 UTC) #3
Scott Hess - ex-Googler
LGTM for cocoa/.
6 years, 10 months ago (2014-02-04 23:03:16 UTC) #4
Elliot Glaysher
gtk lgtm
6 years, 10 months ago (2014-02-04 23:05:12 UTC) #5
not at google - send to devlin
(though the manifest stuff l g t m)
6 years, 10 months ago (2014-02-04 23:05:13 UTC) #6
Finnur
https://codereview.chromium.org/143493005/diff/1/chrome/browser/extensions/api/commands/command_service.cc File chrome/browser/extensions/api/commands/command_service.cc (right): https://codereview.chromium.org/143493005/diff/1/chrome/browser/extensions/api/commands/command_service.cc#newcode92 chrome/browser/extensions/api/commands/command_service.cc:92: if (SettingsOverrides::Get(extension)->RemovesBookmarkShortcut() && I mentioned this in the design ...
6 years, 10 months ago (2014-02-05 13:37:40 UTC) #7
Finnur
Also, this setting should be documented (see src\chrome\common\extensions\docs). Is it possible to write a test ...
6 years, 10 months ago (2014-02-05 15:32:05 UTC) #8
Mike Wittman
https://codereview.chromium.org/143493005/diff/1/chrome/browser/ui/views/accelerator_utils_views.cc File chrome/browser/ui/views/accelerator_utils_views.cc (right): https://codereview.chromium.org/143493005/diff/1/chrome/browser/ui/views/accelerator_utils_views.cc#newcode28 chrome/browser/ui/views/accelerator_utils_views.cc:28: ui::Accelerator GetChromeAcceleratorForCommandId(int command_id) { On 2014/02/04 22:52:54, sky wrote: ...
6 years, 10 months ago (2014-02-05 18:10:45 UTC) #9
Mike Wittman
https://codereview.chromium.org/143493005/diff/1/chrome/browser/extensions/api/commands/command_service.cc File chrome/browser/extensions/api/commands/command_service.cc (right): https://codereview.chromium.org/143493005/diff/1/chrome/browser/extensions/api/commands/command_service.cc#newcode92 chrome/browser/extensions/api/commands/command_service.cc:92: if (SettingsOverrides::Get(extension)->RemovesBookmarkShortcut() && On 2014/02/05 13:37:40, Finnur wrote: > ...
6 years, 10 months ago (2014-02-05 19:17:06 UTC) #10
Mike Wittman
On 2014/02/05 15:32:05, Finnur wrote: > Also, this setting should be documented (see src\chrome\common\extensions\docs). > ...
6 years, 10 months ago (2014-02-06 02:29:57 UTC) #11
sky
https://codereview.chromium.org/143493005/diff/1/chrome/browser/ui/views/accelerator_utils_views.cc File chrome/browser/ui/views/accelerator_utils_views.cc (right): https://codereview.chromium.org/143493005/diff/1/chrome/browser/ui/views/accelerator_utils_views.cc#newcode28 chrome/browser/ui/views/accelerator_utils_views.cc:28: ui::Accelerator GetChromeAcceleratorForCommandId(int command_id) { On 2014/02/05 18:10:46, Mike Wittman ...
6 years, 10 months ago (2014-02-06 16:03:15 UTC) #12
Mike Wittman
https://codereview.chromium.org/143493005/diff/410017/chrome/browser/ui/views/accelerator_utils_aura.cc File chrome/browser/ui/views/accelerator_utils_aura.cc (right): https://codereview.chromium.org/143493005/diff/410017/chrome/browser/ui/views/accelerator_utils_aura.cc#newcode44 chrome/browser/ui/views/accelerator_utils_aura.cc:44: chrome::GetActiveDesktop(), On 2014/02/06 16:03:16, sky wrote: > Using activedesktop ...
6 years, 10 months ago (2014-02-06 19:35:41 UTC) #13
Finnur
LGTM, with the caveat that I'd like the question resolved in the design doc. I ...
6 years, 10 months ago (2014-02-10 10:14:17 UTC) #14
Finnur
https://codereview.chromium.org/143493005/diff/550001/chrome/browser/extensions/api/commands/command_service.cc File chrome/browser/extensions/api/commands/command_service.cc (right): https://codereview.chromium.org/143493005/diff/550001/chrome/browser/extensions/api/commands/command_service.cc#newcode88 chrome/browser/extensions/api/commands/command_service.cc:88: return false; Ooops! Not LGTM. This is incorrect for ...
6 years, 10 months ago (2014-02-11 09:35:00 UTC) #15
Finnur
https://codereview.chromium.org/143493005/diff/550001/chrome/browser/extensions/api/commands/command_service.cc File chrome/browser/extensions/api/commands/command_service.cc (right): https://codereview.chromium.org/143493005/diff/550001/chrome/browser/extensions/api/commands/command_service.cc#newcode105 chrome/browser/extensions/api/commands/command_service.cc:105: } We need to flip this logic. Instead of ...
6 years, 10 months ago (2014-02-11 09:50:05 UTC) #16
Mike Wittman
https://codereview.chromium.org/143493005/diff/550001/chrome/browser/extensions/api/commands/command_service.cc File chrome/browser/extensions/api/commands/command_service.cc (right): https://codereview.chromium.org/143493005/diff/550001/chrome/browser/extensions/api/commands/command_service.cc#newcode88 chrome/browser/extensions/api/commands/command_service.cc:88: return false; On 2014/02/11 09:35:01, Finnur wrote: > Ooops! ...
6 years, 10 months ago (2014-02-11 23:09:44 UTC) #17
Finnur
https://codereview.chromium.org/143493005/diff/550001/chrome/browser/extensions/api/commands/command_service.cc File chrome/browser/extensions/api/commands/command_service.cc (right): https://codereview.chromium.org/143493005/diff/550001/chrome/browser/extensions/api/commands/command_service.cc#newcode88 chrome/browser/extensions/api/commands/command_service.cc:88: return false; Thank you. https://codereview.chromium.org/143493005/diff/760001/chrome/browser/extensions/api/commands/command_service.cc File chrome/browser/extensions/api/commands/command_service.cc (right): https://codereview.chromium.org/143493005/diff/760001/chrome/browser/extensions/api/commands/command_service.cc#newcode98 ...
6 years, 10 months ago (2014-02-12 12:51:13 UTC) #18
Mike Wittman
https://codereview.chromium.org/143493005/diff/760001/chrome/browser/extensions/api/commands/command_service.cc File chrome/browser/extensions/api/commands/command_service.cc (right): https://codereview.chromium.org/143493005/diff/760001/chrome/browser/extensions/api/commands/command_service.cc#newcode98 chrome/browser/extensions/api/commands/command_service.cc:98: FeatureSwitch::enable_override_bookmarks_ui()->IsEnabled())); On 2014/02/12 12:51:14, Finnur wrote: > It is ...
6 years, 10 months ago (2014-02-12 19:55:57 UTC) #19
Mike Wittman
The Mac fix for IsChromeAccelerator is now committed in r250793. Can you approve this CL, ...
6 years, 10 months ago (2014-02-12 22:15:30 UTC) #20
Finnur
LGTM, one nit and a comment. https://codereview.chromium.org/143493005/diff/850001/chrome/browser/extensions/api/commands/command_service.cc File chrome/browser/extensions/api/commands/command_service.cc (right): https://codereview.chromium.org/143493005/diff/850001/chrome/browser/extensions/api/commands/command_service.cc#newcode106 chrome/browser/extensions/api/commands/command_service.cc:106: const ui::Accelerator& accelerator, ...
6 years, 10 months ago (2014-02-12 22:54:44 UTC) #21
Mike Wittman
https://codereview.chromium.org/143493005/diff/850001/chrome/browser/extensions/api/commands/command_service.cc File chrome/browser/extensions/api/commands/command_service.cc (right): https://codereview.chromium.org/143493005/diff/850001/chrome/browser/extensions/api/commands/command_service.cc#newcode106 chrome/browser/extensions/api/commands/command_service.cc:106: const ui::Accelerator& accelerator, On 2014/02/12 22:54:48, Finnur wrote: > ...
6 years, 10 months ago (2014-02-12 23:57:03 UTC) #22
Mike Wittman
sky: can I get an lgtm on c/b/ui?
6 years, 10 months ago (2014-02-13 00:03:40 UTC) #23
sky
LGTM
6 years, 10 months ago (2014-02-13 01:31:31 UTC) #24
Mike Wittman
The CQ bit was checked by wittman@chromium.org
6 years, 10 months ago (2014-02-13 01:45:11 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wittman@chromium.org/143493005/1010001
6 years, 10 months ago (2014-02-13 01:46:15 UTC) #26
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-13 03:39:51 UTC) #27
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) app_list_unittests, cacheinvalidation_unittests, cc_unittests, check_deps, check_deps2git, chromedriver_unittests, ...
6 years, 10 months ago (2014-02-13 03:39:52 UTC) #28
Mike Wittman
The CQ bit was checked by wittman@chromium.org
6 years, 10 months ago (2014-02-13 07:25:06 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wittman@chromium.org/143493005/1010001
6 years, 10 months ago (2014-02-13 07:25:53 UTC) #30
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-13 09:40:06 UTC) #31
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) interactive_ui_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=226335
6 years, 10 months ago (2014-02-13 09:40:07 UTC) #32
erikchen
There are 2 reasons that the tests are failing on mac: 1. SendKeyPressSync() needs to ...
6 years, 10 months ago (2014-02-13 19:54:53 UTC) #33
Mike Wittman
The CQ bit was checked by wittman@chromium.org
6 years, 10 months ago (2014-02-13 20:23:49 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wittman@chromium.org/143493005/1480001
6 years, 10 months ago (2014-02-13 20:24:11 UTC) #35
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-13 20:52:44 UTC) #36
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=50168
6 years, 10 months ago (2014-02-13 20:52:45 UTC) #37
Mike Wittman
The CQ bit was checked by wittman@chromium.org
6 years, 10 months ago (2014-02-13 22:17:02 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wittman@chromium.org/143493005/1480001
6 years, 10 months ago (2014-02-13 22:17:49 UTC) #39
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-13 22:36:34 UTC) #40
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=50198
6 years, 10 months ago (2014-02-13 22:36:35 UTC) #41
Mike Wittman
The CQ bit was checked by wittman@chromium.org
6 years, 10 months ago (2014-02-13 23:24:17 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wittman@chromium.org/143493005/1480001
6 years, 10 months ago (2014-02-13 23:27:13 UTC) #43
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-14 03:03:52 UTC) #44
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=201910
6 years, 10 months ago (2014-02-14 03:03:54 UTC) #45
erikchen
The CQ bit was checked by erikchen@chromium.org
6 years, 10 months ago (2014-02-14 03:07:20 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wittman@chromium.org/143493005/1480001
6 years, 10 months ago (2014-02-14 03:10:26 UTC) #47
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-14 06:31:10 UTC) #48
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=202032
6 years, 10 months ago (2014-02-14 06:31:11 UTC) #49
Finnur
https://codereview.chromium.org/143493005/diff/1480001/chrome/browser/extensions/extension_keybinding_apitest.cc File chrome/browser/extensions/extension_keybinding_apitest.cc (right): https://codereview.chromium.org/143493005/diff/1480001/chrome/browser/extensions/extension_keybinding_apitest.cc#newcode212 chrome/browser/extensions/extension_keybinding_apitest.cc:212: browser(), ui::VKEY_D, true, false, false, false)); This also needs ...
6 years, 10 months ago (2014-02-14 10:53:40 UTC) #50
Mike Wittman
https://codereview.chromium.org/143493005/diff/1480001/chrome/browser/extensions/extension_keybinding_apitest.cc File chrome/browser/extensions/extension_keybinding_apitest.cc (right): https://codereview.chromium.org/143493005/diff/1480001/chrome/browser/extensions/extension_keybinding_apitest.cc#newcode212 chrome/browser/extensions/extension_keybinding_apitest.cc:212: browser(), ui::VKEY_D, true, false, false, false)); On 2014/02/14 10:53:41, ...
6 years, 10 months ago (2014-02-14 17:03:52 UTC) #51
Mike Wittman
6 years, 10 months ago (2014-02-14 18:06:18 UTC) #52
Message was sent while issue was closed.
Committed patchset #11 manually as r251368 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698