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

Issue 10880064: Make extension commands grant the activeTab permission. (Closed)

Created:
8 years, 3 months ago by not at google - send to devlin
Modified:
8 years, 3 months ago
CC:
chromium-reviews, mihaip-chromium-reviews_chromium.org, benwells, koz (OOO until 15th September)
Visibility:
Public.

Description

Make extension commands grant the activeTab permission. BUG=138203 TEST=Install an extension with commands and the activeTab permission. Activating commands should grant it. See chrome/test/data/extensions/api_test/keybinding/... for examples. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=158224

Patch Set 1 #

Patch Set 2 : views #

Patch Set 3 : epic rebase #

Patch Set 4 : updated for cocoa but the brower_window_controller syntax is WRONG helpplz #

Patch Set 5 : cocoa works #

Patch Set 6 : cocoa works attempt 2 #

Patch Set 7 : fix gtk compile #

Total comments: 8

Patch Set 8 : aa #

Patch Set 9 : update GTK with the TabContents changes #

Total comments: 8

Patch Set 10 : comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+265 lines, -328 lines) Patch
A + chrome/browser/extensions/active_tab_permission_granter.h View 3 chunks +7 lines, -7 lines 0 comments Download
A + chrome/browser/extensions/active_tab_permission_granter.cc View 7 chunks +10 lines, -10 lines 0 comments Download
D chrome/browser/extensions/active_tab_permission_manager.h View 1 chunk +0 lines, -80 lines 0 comments Download
D chrome/browser/extensions/active_tab_permission_manager.cc View 1 chunk +0 lines, -117 lines 0 comments Download
M chrome/browser/extensions/active_tab_unittest.cc View 1 2 11 chunks +29 lines, -29 lines 0 comments Download
M chrome/browser/extensions/api/omnibox/omnibox_api.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_keybinding_apitest.cc View 1 2 3 4 5 6 7 8 9 8 chunks +23 lines, -7 lines 0 comments Download
M chrome/browser/extensions/extension_keybinding_registry.h View 1 2 4 chunks +24 lines, -7 lines 0 comments Download
M chrome/browser/extensions/extension_keybinding_registry.cc View 1 2 3 chunks +27 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_toolbar_model.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/menu_manager.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/page_action_controller.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/script_badge_controller.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/tab_helper.h View 1 2 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/extensions/tab_helper.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.h View 1 2 3 4 4 chunks +10 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.mm View 1 2 3 4 2 chunks +12 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.mm View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa.mm View 1 2 3 4 5 6 7 8 9 3 chunks +4 lines, -6 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/shell_window_cocoa.mm View 1 2 3 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/extensions/shell_window.h View 1 2 3 chunks +7 lines, -1 line 0 comments Download
M chrome/browser/ui/extensions/shell_window.cc View 1 2 3 4 5 6 7 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/ui/gtk/browser_window_gtk.h View 1 2 4 chunks +13 lines, -5 lines 0 comments Download
M chrome/browser/ui/gtk/browser_window_gtk.cc View 1 2 3 4 5 6 7 8 4 chunks +16 lines, -4 lines 0 comments Download
M chrome/browser/ui/gtk/extensions/extension_keybinding_registry_gtk.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/gtk/extensions/extension_keybinding_registry_gtk.cc View 1 2 3 chunks +4 lines, -8 lines 0 comments Download
M chrome/browser/ui/gtk/extensions/shell_window_gtk.cc View 1 2 3 4 5 6 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/browser_actions_container.h View 1 2 6 chunks +16 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/browser_actions_container.cc View 1 2 5 chunks +18 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/extensions/extension_keybinding_registry_views.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/extensions/extension_keybinding_registry_views.cc View 1 2 3 4 5 6 7 8 9 3 chunks +4 lines, -7 lines 0 comments Download
M chrome/browser/ui/views/extensions/shell_window_views.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/test/data/extensions/api_test/keybinding/basics/manifest.json View 1 2 1 chunk +1 line, -3 lines 0 comments Download
M chrome/test/data/extensions/api_test/keybinding/conflicting/manifest.json View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -3 lines 0 comments Download

Messages

Total messages: 31 (0 generated)
not at google - send to devlin
Hi Finnur, This only works on GTK at the moment so not ready for proper ...
8 years, 3 months ago (2012-08-27 07:48:02 UTC) #1
not at google - send to devlin
P.P.S. I renamed ActiveTabPermissionManager to ActiveTabPermissionGranter too, sorry for the noise. I hated the Manager ...
8 years, 3 months ago (2012-08-27 07:48:50 UTC) #2
Finnur
I'm fine with this. But as it stands this CL only implements this feature for ...
8 years, 3 months ago (2012-08-27 11:12:41 UTC) #3
not at google - send to devlin
On 2012/08/27 11:12:41, Finnur wrote: > I'm fine with this. But as it stands this ...
8 years, 3 months ago (2012-08-28 02:44:16 UTC) #4
Aaron Boodman
On 2012/08/28 02:44:16, kalman wrote: > On 2012/08/27 11:12:41, Finnur wrote: > > Not sure ...
8 years, 3 months ago (2012-08-28 03:36:05 UTC) #5
not at google - send to devlin
<news> Views implemented (just cocoa to go) but I'm getting this test failure: d:\src\cygwin\home\kalman\chromium\src\chrome\browser\extensions\extension_keybinding_apitest.cc(71): error: ...
8 years, 3 months ago (2012-08-28 08:39:26 UTC) #6
Finnur
Hmm, that's weird. I would have expected 1 or even 0 if one or both ...
8 years, 3 months ago (2012-08-28 09:39:49 UTC) #7
not at google - send to devlin
On 2012/08/28 09:39:49, Finnur wrote: > Hmm, that's weird. I would have expected 1 or ...
8 years, 3 months ago (2012-08-28 11:43:24 UTC) #8
Finnur
What's the status on this?
8 years, 3 months ago (2012-09-03 11:09:22 UTC) #9
not at google - send to devlin
I am back from vacation now. Probably won't have time to finish it today (Friday); ...
8 years, 3 months ago (2012-09-06 22:17:59 UTC) #10
Finnur
Welcome back! :) I took the liberty of extracting (just) the Views changes (and common ...
8 years, 3 months ago (2012-09-07 10:01:47 UTC) #11
not at google - send to devlin
On 2012/09/07 10:01:47, Finnur wrote: > Welcome back! :) > > I took the liberty ...
8 years, 3 months ago (2012-09-10 00:41:31 UTC) #12
Finnur
That is correct. I just wanted to see if I could help you figure out ...
8 years, 3 months ago (2012-09-10 11:23:59 UTC) #13
not at google - send to devlin
(still trying to get my windows build to work again so I can pick this ...
8 years, 3 months ago (2012-09-11 11:25:04 UTC) #14
not at google - send to devlin
Done! Please review. finnur: extensions estade: gtk sail: cocoa sky: views aa: ui/extensions
8 years, 3 months ago (2012-09-21 01:01:02 UTC) #15
sail
cocoa/* LGTM https://codereview.chromium.org/10880064/diff/26005/chrome/browser/ui/cocoa/browser_window_controller.mm File chrome/browser/ui/cocoa/browser_window_controller.mm (right): https://codereview.chromium.org/10880064/diff/26005/chrome/browser/ui/cocoa/browser_window_controller.mm#newcode421 chrome/browser/ui/cocoa/browser_window_controller.mm:421: windowShim_.get())); Do you need the .get here?
8 years, 3 months ago (2012-09-21 01:27:23 UTC) #16
not at google - send to devlin
https://codereview.chromium.org/10880064/diff/26005/chrome/browser/ui/cocoa/browser_window_controller.mm File chrome/browser/ui/cocoa/browser_window_controller.mm (right): https://codereview.chromium.org/10880064/diff/26005/chrome/browser/ui/cocoa/browser_window_controller.mm#newcode421 chrome/browser/ui/cocoa/browser_window_controller.mm:421: windowShim_.get())); On 2012/09/21 01:27:23, sail wrote: > Do you ...
8 years, 3 months ago (2012-09-21 01:48:11 UTC) #17
Aaron Boodman
I know everyone loves naming, but I prefered the old name. https://codereview.chromium.org/10880064/diff/26005/chrome/browser/extensions/active_tab_permission_granter.h File chrome/browser/extensions/active_tab_permission_granter.h (right): ...
8 years, 3 months ago (2012-09-21 01:54:43 UTC) #18
not at google - send to devlin
https://codereview.chromium.org/10880064/diff/26005/chrome/browser/extensions/active_tab_permission_granter.h File chrome/browser/extensions/active_tab_permission_granter.h (right): https://codereview.chromium.org/10880064/diff/26005/chrome/browser/extensions/active_tab_permission_granter.h#newcode29 chrome/browser/extensions/active_tab_permission_granter.h:29: class ActiveTabPermissionGranter : public content::WebContentsObserver, On 2012/09/21 01:54:43, Aaron ...
8 years, 3 months ago (2012-09-21 01:59:10 UTC) #19
not at google - send to devlin
https://codereview.chromium.org/10880064/diff/26005/chrome/browser/ui/extensions/shell_window.cc File chrome/browser/ui/extensions/shell_window.cc (right): https://codereview.chromium.org/10880064/diff/26005/chrome/browser/ui/extensions/shell_window.cc#newcode436 chrome/browser/ui/extensions/shell_window.cc:436: return extensions::TabHelper::FromWebContents(web_contents_)-> On 2012/09/21 01:59:10, kalman wrote: > On ...
8 years, 3 months ago (2012-09-21 02:03:26 UTC) #20
Aaron Boodman
On Thu, Sep 20, 2012 at 7:03 PM, <kalman@chromium.org> wrote: > > https://codereview.chromium.org/10880064/diff/26005/chrome/browser/ui/extensions/shell_window.cc > File ...
8 years, 3 months ago (2012-09-21 02:29:15 UTC) #21
not at google - send to devlin
On 2012/09/21 02:29:15, Aaron Boodman wrote: > On Thu, Sep 20, 2012 at 7:03 PM, ...
8 years, 3 months ago (2012-09-21 02:34:16 UTC) #22
Aaron Boodman
https://codereview.chromium.org/10880064/diff/26005/chrome/browser/ui/extensions/shell_window.cc File chrome/browser/ui/extensions/shell_window.cc (right): https://codereview.chromium.org/10880064/diff/26005/chrome/browser/ui/extensions/shell_window.cc#newcode436 chrome/browser/ui/extensions/shell_window.cc:436: return extensions::TabHelper::FromWebContents(web_contents_)-> On 2012/09/21 02:03:26, kalman wrote: > On ...
8 years, 3 months ago (2012-09-21 02:45:39 UTC) #23
not at google - send to devlin
> Does TabHelper::FromWebContents() return non-NULL for shell windows? I wouldn't > have thought shell windows ...
8 years, 3 months ago (2012-09-21 03:34:20 UTC) #24
Aaron Boodman
lgtm
8 years, 3 months ago (2012-09-21 05:13:53 UTC) #25
Finnur
LGTM, with the following addressed: https://codereview.chromium.org/10880064/diff/26011/chrome/browser/extensions/extension_keybinding_apitest.cc File chrome/browser/extensions/extension_keybinding_apitest.cc (right): https://codereview.chromium.org/10880064/diff/26011/chrome/browser/extensions/extension_keybinding_apitest.cc#newcode86 chrome/browser/extensions/extension_keybinding_apitest.cc:86: // Active tab should ...
8 years, 3 months ago (2012-09-21 10:07:00 UTC) #26
Evan Stade
gtk (rubbery) lgtm
8 years, 3 months ago (2012-09-21 13:52:22 UTC) #27
sky
views LGTM
8 years, 3 months ago (2012-09-21 16:20:38 UTC) #28
not at google - send to devlin
http://codereview.chromium.org/10880064/diff/26011/chrome/browser/extensions/extension_keybinding_apitest.cc File chrome/browser/extensions/extension_keybinding_apitest.cc (right): http://codereview.chromium.org/10880064/diff/26011/chrome/browser/extensions/extension_keybinding_apitest.cc#newcode86 chrome/browser/extensions/extension_keybinding_apitest.cc:86: // Active tab should now be granted. On 2012/09/21 ...
8 years, 3 months ago (2012-09-23 23:53:18 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kalman@chromium.org/10880064/25042
8 years, 3 months ago (2012-09-23 23:55:34 UTC) #30
commit-bot: I haz the power
8 years, 3 months ago (2012-09-24 01:48:51 UTC) #31
Change committed as 158224

Powered by Google App Engine
This is Rietveld 408576698