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

Issue 11547033: Implement declarativeContent API. (Closed)

Created:
8 years ago by Jeffrey Yasskin
Modified:
7 years, 11 months ago
CC:
chromium-reviews, pam+watch_chromium.org, jam, joi+watch-content_chromium.org, Aaron Boodman, darin-cc_chromium.org, chromium-apps-reviews_chromium.org, erikwright+watch_chromium.org
Visibility:
Public.

Description

Implement the basic declarativeContent API. This CL includes the top_url and css conditions and the ShowPageAction action. CSS matching is implemented inefficiently using a MutationObserver, but I plan to push that into WebKit before releasing this to stable. BUG=172011 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=179051

Patch Set 1 #

Total comments: 14

Patch Set 2 : mpcomplete's comments + sync #

Patch Set 3 : Take out ParseJson and DeclarativeRule template #

Total comments: 34

Patch Set 4 : Sync past refactoring and fix build+tests #

Patch Set 5 : Fix Dominic's comments #

Total comments: 30

Patch Set 6 : Fix Dominic's round of comments #

Patch Set 7 : Sync #

Total comments: 16

Patch Set 8 : Fix vabr's comments; make GetMatches const; fix NULL dereference in test #

Total comments: 8

Patch Set 9 : Fix Matt's comments and two tests #

Patch Set 10 : Remove non-const reference #

Patch Set 11 : Fix a test on Windows by initializing Ole #

Patch Set 12 : Remove url_matches parameter from IsFulfilled methods to match r178882 #

Patch Set 13 : Sync #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1965 lines, -14 lines) Patch
M chrome/browser/extensions/api/declarative/rules_registry_service.h View 3 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/declarative/rules_registry_service.cc View 1 2 3 4 5 6 7 8 2 chunks +17 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/declarative/rules_registry_storage_delegate.cc View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
A chrome/browser/extensions/api/declarative_content/OWNERS View 1 chunk +2 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/declarative_content/content_action.h View 1 2 3 4 1 chunk +70 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/declarative_content/content_action.cc View 1 2 3 4 5 1 chunk +148 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/declarative_content/content_action_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +155 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/declarative_content/content_condition.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +110 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/declarative_content/content_condition.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +140 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/declarative_content/content_condition_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +97 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/declarative_content/content_constants.h View 1 1 chunk +28 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/declarative_content/content_constants.cc View 1 1 chunk +23 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/declarative_content/content_rules_registry.h View 1 2 3 4 5 6 7 1 chunk +145 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/declarative_content/content_rules_registry.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +276 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/declarative_content/declarative_content_apitest.cc View 1 2 3 1 chunk +72 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_action.h View 1 2 3 4 5 3 chunks +53 lines, -7 lines 0 comments Download
M chrome/browser/extensions/extension_action.cc View 1 2 3 4 2 chunks +16 lines, -0 lines 0 comments Download
M chrome/browser/extensions/tab_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/extensions/tab_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +26 lines, -0 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/chrome_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/_permission_features.json View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
A chrome/common/extensions/api/declarative_content.json View 1 2 3 4 5 1 chunk +73 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/extension_api.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension_messages.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +21 lines, -0 lines 0 comments Download
M chrome/common/extensions/permissions/api_permission.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/permissions/api_permission.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/permissions/permission_set_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions_api_resources.grd View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A chrome/renderer/extensions/content_watcher.h View 1 chunk +86 lines, -0 lines 0 comments Download
A chrome/renderer/extensions/content_watcher.cc View 1 2 3 4 5 6 7 8 1 chunk +209 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/dispatcher.h View 3 chunks +6 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/dispatcher.cc View 1 2 3 7 chunks +12 lines, -1 line 0 comments Download
M chrome/renderer/extensions/module_system.h View 1 2 3 4 5 6 7 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/module_system.cc View 2 chunks +14 lines, -3 lines 0 comments Download
A chrome/renderer/resources/extensions/content_watcher.js View 1 chunk +32 lines, -0 lines 0 comments Download
A chrome/renderer/resources/extensions/declarative_content_custom_bindings.js View 1 chunk +43 lines, -0 lines 0 comments Download
M chrome/renderer/resources/renderer_resources.grd View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/declarative_content/overview/background.js View 1 1 chunk +23 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/declarative_content/overview/manifest.json View 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
Jeffrey Yasskin
This is too big, but I figured I'd send the whole thing out for overall ...
8 years ago (2012-12-13 01:39:04 UTC) #1
Matt Perry
https://codereview.chromium.org/11547033/diff/1/chrome/browser/extensions/api/declarative/declarative_rule.h File chrome/browser/extensions/api/declarative/declarative_rule.h (right): https://codereview.chromium.org/11547033/diff/1/chrome/browser/extensions/api/declarative/declarative_rule.h#newcode30 chrome/browser/extensions/api/declarative/declarative_rule.h:30: template<typename ConditionT> Did you consider defining Condition and Action ...
8 years ago (2012-12-13 20:27:48 UTC) #2
Jeffrey Yasskin
https://codereview.chromium.org/11547033/diff/1/chrome/browser/extensions/api/declarative/declarative_rule.h File chrome/browser/extensions/api/declarative/declarative_rule.h (right): https://codereview.chromium.org/11547033/diff/1/chrome/browser/extensions/api/declarative/declarative_rule.h#newcode30 chrome/browser/extensions/api/declarative/declarative_rule.h:30: template<typename ConditionT> On 2012/12/13 20:27:48, Matt Perry wrote: > ...
8 years ago (2012-12-14 00:38:20 UTC) #3
Matt Perry
lgtm https://codereview.chromium.org/11547033/diff/1/chrome/browser/extensions/api/declarative/declarative_rule.h File chrome/browser/extensions/api/declarative/declarative_rule.h (right): https://codereview.chromium.org/11547033/diff/1/chrome/browser/extensions/api/declarative/declarative_rule.h#newcode30 chrome/browser/extensions/api/declarative/declarative_rule.h:30: template<typename ConditionT> On 2012/12/14 00:38:20, Jeffrey Yasskin wrote: ...
8 years ago (2012-12-14 19:49:32 UTC) #4
battre
I had a first look at chrome/browser/extensions/api/declarative*. I have learned some cool new stuff! Thank ...
8 years ago (2012-12-15 11:54:10 UTC) #5
battre
arg. I just noticed that I spent 2 hours reviewing the wrong CL. :-(
8 years ago (2012-12-15 11:57:25 UTC) #6
Jeffrey Yasskin
On Sat, Dec 15, 2012 at 3:57 AM, <battre@chromium.org> wrote: > arg. I just noticed ...
8 years ago (2012-12-15 19:21:38 UTC) #7
Jeffrey Yasskin
I believe this is now ready for a look. If you can see any way ...
7 years, 11 months ago (2013-01-17 09:22:56 UTC) #8
battre
Reviewed chrome/browser/extensions/api/ so far (will continue after an on-site interview). Looking good so far. I ...
7 years, 11 months ago (2013-01-18 10:37:28 UTC) #9
battre
If would be good if somebody else (Matt?) could review the content_watcher parts as well. ...
7 years, 11 months ago (2013-01-18 16:13:40 UTC) #10
Jeffrey Yasskin
Thanks for slogging through this CL. Matt, could you also review when you get a ...
7 years, 11 months ago (2013-01-22 08:01:22 UTC) #11
battre
https://codereview.chromium.org/11547033/diff/24001/chrome/browser/extensions/api/declarative_content/content_action.cc File chrome/browser/extensions/api/declarative_content/content_action.cc (right): https://codereview.chromium.org/11547033/diff/24001/chrome/browser/extensions/api/declarative_content/content_action.cc#newcode100 chrome/browser/extensions/api/declarative_content/content_action.cc:100: std::map<std::string, FactoryMethod> factory_methods; On 2013/01/22 08:01:22, Jeffrey Yasskin wrote: ...
7 years, 11 months ago (2013-01-22 12:54:52 UTC) #12
vabr (Chromium)
Hi Jeffrey, I read this CL through, and did not find anything to comment on, ...
7 years, 11 months ago (2013-01-23 12:32:56 UTC) #13
Jeffrey Yasskin
https://codereview.chromium.org/11547033/diff/43001/chrome/browser/extensions/api/declarative_content/content_action_unittest.cc File chrome/browser/extensions/api/declarative_content/content_action_unittest.cc (right): https://codereview.chromium.org/11547033/diff/43001/chrome/browser/extensions/api/declarative_content/content_action_unittest.cc#newcode49 chrome/browser/extensions/api/declarative_content/content_action_unittest.cc:49: scoped_refptr<Extension> MakeExtension(DictionaryBuilder& manifest_extra) { On 2013/01/23 12:32:56, vabr (Chromium) ...
7 years, 11 months ago (2013-01-23 22:13:17 UTC) #14
Matt Perry
Still LGTM. Minor comments on content_watcher.cc. https://codereview.chromium.org/11547033/diff/38045/chrome/browser/extensions/extension_action.h File chrome/browser/extensions/extension_action.h (right): https://codereview.chromium.org/11547033/diff/38045/chrome/browser/extensions/extension_action.h#newcode305 chrome/browser/extensions/extension_action.h:305: // leak information ...
7 years, 11 months ago (2013-01-24 01:55:16 UTC) #15
Jeffrey Yasskin
https://codereview.chromium.org/11547033/diff/38045/chrome/browser/extensions/extension_action.h File chrome/browser/extensions/extension_action.h (right): https://codereview.chromium.org/11547033/diff/38045/chrome/browser/extensions/extension_action.h#newcode305 chrome/browser/extensions/extension_action.h:305: // leak information about hosts the extension doesn't have ...
7 years, 11 months ago (2013-01-24 03:10:22 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jyasskin@chromium.org/11547033/48049
7 years, 11 months ago (2013-01-24 03:11:43 UTC) #17
commit-bot: I haz the power
Presubmit check for 11547033-48049 failed and returned exit status 1. Running presubmit commit checks ...
7 years, 11 months ago (2013-01-24 03:11:58 UTC) #18
Jeffrey Yasskin
+tsepez for extension_messages.h +thakis for *.gypi, but I'll TBR if tsepez lgtms first.
7 years, 11 months ago (2013-01-24 03:14:32 UTC) #19
vabr (Chromium)
https://codereview.chromium.org/11547033/diff/43001/chrome/browser/extensions/api/declarative_content/content_action_unittest.cc File chrome/browser/extensions/api/declarative_content/content_action_unittest.cc (right): https://codereview.chromium.org/11547033/diff/43001/chrome/browser/extensions/api/declarative_content/content_action_unittest.cc#newcode49 chrome/browser/extensions/api/declarative_content/content_action_unittest.cc:49: scoped_refptr<Extension> MakeExtension(DictionaryBuilder& manifest_extra) { On 2013/01/23 22:13:17, Jeffrey Yasskin ...
7 years, 11 months ago (2013-01-24 08:21:00 UTC) #20
Nico
1. Since this is a bigger feature, it should have a tracking bug that describes ...
7 years, 11 months ago (2013-01-24 18:08:43 UTC) #21
Tom Sepez
Messages LGTM.
7 years, 11 months ago (2013-01-24 18:16:24 UTC) #22
Jeffrey Yasskin
On 2013/01/24 18:08:43, Nico wrote: > 1. Since this is a bigger feature, it should ...
7 years, 11 months ago (2013-01-25 00:08:29 UTC) #23
Nico
> Done: http://crbug.com/172011 Thanks! gyp changes lgtm. I'm assuming that the extension OWNERS have checked ...
7 years, 11 months ago (2013-01-25 00:16:06 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jyasskin@chromium.org/11547033/38097
7 years, 11 months ago (2013-01-25 16:53:42 UTC) #25
Jeffrey Yasskin
On 2013/01/25 00:16:06, Nico wrote: > > Done: http://crbug.com/172011 > > Thanks! > > > ...
7 years, 11 months ago (2013-01-25 16:55:09 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jyasskin@chromium.org/11547033/59001
7 years, 11 months ago (2013-01-25 22:40:06 UTC) #27
commit-bot: I haz the power
Failed to apply patch for chrome/browser/extensions/tab_helper.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 11 months ago (2013-01-26 01:57:22 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jyasskin@chromium.org/11547033/66002
7 years, 11 months ago (2013-01-26 02:39:55 UTC) #29
commit-bot: I haz the power
7 years, 11 months ago (2013-01-26 06:33:15 UTC) #30
Message was sent while issue was closed.
Change committed as 179051

Powered by Google App Engine
This is Rietveld 408576698