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

Issue 9192029: Bindings layer for declarative events API (Closed)

Created:
8 years, 11 months ago by battre
Modified:
8 years, 10 months ago
CC:
chromium-reviews, Aaron Boodman, darin-cc_chromium.org, mihaip+watch_chromium.org, brettw-cc_chromium.org, calamity
Visibility:
Public.

Description

Bindings layer for declarative events API BUG=112155 TEST=no Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=120962

Patch Set 1 #

Total comments: 15

Patch Set 2 : Addressed comments #

Patch Set 3 : Merge with ToT #

Patch Set 4 : Continued #

Total comments: 23

Patch Set 5 : Addressed comments #

Patch Set 6 : Addressed comments #

Patch Set 7 : Addressed comments and merged with ToT #

Patch Set 8 : another attempt to upload this to riedvield #

Patch Set 9 : Copied sendRequest and GetExtensionAPIDefinition into chromeHidden #

Patch Set 10 : Renamed rules_registry_dispatcher.* to declarative_api.* #

Total comments: 3

Patch Set 11 : Store apiDefinitions directly in chromeHidden #

Total comments: 5

Patch Set 12 : Moved validation and send logic into schema_generated_bindings.js #

Patch Set 13 : Moved validation and send logic into schema_generated_bindings.js #

Patch Set 14 : Fix some stuff that apitests in followup CL discovered #

Total comments: 37

Patch Set 15 : Addressed comments #

Total comments: 8

Patch Set 16 : Addressed comments #

Patch Set 17 : Made ruleIdentifiers parameters optional in API #

Patch Set 18 : Merged with ToT #

Total comments: 1

Patch Set 19 : Check whether eventName may be optional #

Unified diffs Side-by-side diffs Delta from patch set Stats (+437 lines, -16 lines) Patch
A chrome/browser/extensions/api/declarative/declarative_api.h View 1 2 3 4 5 6 7 8 9 1 chunk +33 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/declarative/declarative_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +34 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_function_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/common_resources.grd View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
A chrome/common/extensions/api/experimental.declarative.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +128 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/extension_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/api/webRequest.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +42 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/samples.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -1 line 0 comments Download
M chrome/common/extensions/docs/template/api_template.html View 1 2 3 4 5 6 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/renderer/extensions/custom_bindings_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/renderer/renderer_resources.grd View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M chrome/renderer/resources/extensions/event.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 7 chunks +59 lines, -8 lines 0 comments Download
A chrome/renderer/resources/extensions/experimental.declarative_custom_bindings.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +83 lines, -0 lines 0 comments Download
M chrome/renderer/resources/extensions/schema_generated_bindings.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -2 lines 0 comments Download
chrome/renderer/resources/extensions/web_request_custom_bindings.js View 1 2 3 4 5 6 7 8 5 chunks +36 lines, -3 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
battre
Hi. this is a new CL that adds "addRules", "removeRules", ... functions into the event ...
8 years, 11 months ago (2012-01-19 22:11:10 UTC) #1
Aaron Boodman
https://chromiumcodereview.appspot.com/9192029/diff/1/chrome/renderer/resources/extensions/event.js File chrome/renderer/resources/extensions/event.js (right): https://chromiumcodereview.appspot.com/9192029/diff/1/chrome/renderer/resources/extensions/event.js#newcode71 chrome/renderer/resources/extensions/event.js:71: {'supports_listeners': true, 'supports_rules': false}; Nit: don't need the single ...
8 years, 11 months ago (2012-01-19 23:09:46 UTC) #2
battre
https://chromiumcodereview.appspot.com/9192029/diff/1/chrome/renderer/resources/extensions/event.js File chrome/renderer/resources/extensions/event.js (right): https://chromiumcodereview.appspot.com/9192029/diff/1/chrome/renderer/resources/extensions/event.js#newcode283 chrome/renderer/resources/extensions/event.js:283: this.getFunctionDefinition_("experimental.declarative", "addRules"); On 2012/01/19 23:09:46, Aaron Boodman wrote: > ...
8 years, 11 months ago (2012-01-19 23:45:47 UTC) #3
Aaron Boodman
On Thu, Jan 19, 2012 at 3:45 PM, <battre@chromium.org> wrote: > > https://chromiumcodereview.appspot.com/9192029/diff/1/chrome/renderer/resources/extensions/event.js > File ...
8 years, 11 months ago (2012-01-19 23:57:36 UTC) #4
Matt Perry
https://chromiumcodereview.appspot.com/9192029/diff/1/chrome/renderer/resources/extensions/event.js File chrome/renderer/resources/extensions/event.js (right): https://chromiumcodereview.appspot.com/9192029/diff/1/chrome/renderer/resources/extensions/event.js#newcode71 chrome/renderer/resources/extensions/event.js:71: {'supports_listeners': true, 'supports_rules': false}; On 2012/01/19 23:09:46, Aaron Boodman ...
8 years, 11 months ago (2012-01-20 00:07:55 UTC) #5
battre
I think this is a sensible size for the first CL to be reviewed (and ...
8 years, 11 months ago (2012-01-24 20:36:15 UTC) #6
Matt Perry
https://chromiumcodereview.appspot.com/9192029/diff/9005/chrome/browser/extensions/api/declarative/rules_registry_dispatcher.cc File chrome/browser/extensions/api/declarative/rules_registry_dispatcher.cc (right): https://chromiumcodereview.appspot.com/9192029/diff/9005/chrome/browser/extensions/api/declarative/rules_registry_dispatcher.cc#newcode16 chrome/browser/extensions/api/declarative/rules_registry_dispatcher.cc:16: result_.reset(new ListValue()); Why do you even need to return ...
8 years, 11 months ago (2012-01-24 22:39:10 UTC) #7
battre
Thanks for the review. It took me a year to get from camelCase to leet_hacker_style. ...
8 years, 11 months ago (2012-01-25 19:25:08 UTC) #8
Matt Perry
http://codereview.chromium.org/9192029/diff/9005/chrome/renderer/resources/extensions/schema_generated_bindings.js File chrome/renderer/resources/extensions/schema_generated_bindings.js (right): http://codereview.chromium.org/9192029/diff/9005/chrome/renderer/resources/extensions/schema_generated_bindings.js#newcode461 chrome/renderer/resources/extensions/schema_generated_bindings.js:461: }; On 2012/01/25 19:25:08, battre wrote: > On 2012/01/24 ...
8 years, 11 months ago (2012-01-25 22:29:35 UTC) #9
battre
On 2012/01/25 22:29:35, Matt Perry wrote: > http://codereview.chromium.org/9192029/diff/9005/chrome/renderer/resources/extensions/schema_generated_bindings.js > File chrome/renderer/resources/extensions/schema_generated_bindings.js (right): > > http://codereview.chromium.org/9192029/diff/9005/chrome/renderer/resources/extensions/schema_generated_bindings.js#newcode461 ...
8 years, 11 months ago (2012-01-27 16:49:32 UTC) #10
Matt Perry
http://codereview.chromium.org/9192029/diff/21001/chrome/renderer/resources/extensions/schema_generated_bindings.js File chrome/renderer/resources/extensions/schema_generated_bindings.js (right): http://codereview.chromium.org/9192029/diff/21001/chrome/renderer/resources/extensions/schema_generated_bindings.js#newcode361 chrome/renderer/resources/extensions/schema_generated_bindings.js:361: var apiDefinitions = GetExtensionAPIDefinition(); Just put the result from ...
8 years, 11 months ago (2012-01-27 19:27:14 UTC) #11
battre
http://codereview.chromium.org/9192029/diff/21001/chrome/renderer/resources/extensions/schema_generated_bindings.js File chrome/renderer/resources/extensions/schema_generated_bindings.js (right): http://codereview.chromium.org/9192029/diff/21001/chrome/renderer/resources/extensions/schema_generated_bindings.js#newcode361 chrome/renderer/resources/extensions/schema_generated_bindings.js:361: var apiDefinitions = GetExtensionAPIDefinition(); On 2012/01/27 19:27:15, Matt Perry ...
8 years, 11 months ago (2012-01-27 19:42:18 UTC) #12
Matt Perry
lgtm
8 years, 11 months ago (2012-01-27 19:44:36 UTC) #13
Aaron Boodman
Sorry for the late review here. I'm adding Ben and James here. Since they've been ...
8 years, 10 months ago (2012-01-31 00:11:17 UTC) #14
not at google - send to devlin
Sorry I didn't get time to look at this today, but I'd like to tomorrow ...
8 years, 10 months ago (2012-01-31 11:43:43 UTC) #15
battre
On 2012/01/31 11:43:43, kalman wrote: > Sorry I didn't get time to look at this ...
8 years, 10 months ago (2012-01-31 11:46:07 UTC) #16
battre
http://codereview.chromium.org/9192029/diff/9005/chrome/renderer/resources/extensions/schema_generated_bindings.js File chrome/renderer/resources/extensions/schema_generated_bindings.js (right): http://codereview.chromium.org/9192029/diff/9005/chrome/renderer/resources/extensions/schema_generated_bindings.js#newcode461 chrome/renderer/resources/extensions/schema_generated_bindings.js:461: }; On 2012/01/31 00:11:17, Aaron Boodman wrote: > On ...
8 years, 10 months ago (2012-01-31 12:28:50 UTC) #17
Aaron Boodman
http://codereview.chromium.org/9192029/diff/19018/chrome/browser/extensions/api/declarative/declarative_api.cc File chrome/browser/extensions/api/declarative/declarative_api.cc (right): http://codereview.chromium.org/9192029/diff/19018/chrome/browser/extensions/api/declarative/declarative_api.cc#newcode16 chrome/browser/extensions/api/declarative/declarative_api.cc:16: result_.reset(new ListValue()); On 2012/01/31 12:28:50, battre wrote: > On ...
8 years, 10 months ago (2012-02-01 00:27:25 UTC) #18
not at google - send to devlin
http://codereview.chromium.org/9192029/diff/33001/chrome/renderer/resources/extensions/schema_generated_bindings.js File chrome/renderer/resources/extensions/schema_generated_bindings.js (right): http://codereview.chromium.org/9192029/diff/33001/chrome/renderer/resources/extensions/schema_generated_bindings.js#newcode196 chrome/renderer/resources/extensions/schema_generated_bindings.js:196: chromeHidden.validatingSendRequest = function(qualifiedFunctionName, args) { On 2012/02/01 00:27:25, Aaron ...
8 years, 10 months ago (2012-02-01 00:47:57 UTC) #19
not at google - send to devlin
Hm, that's a pretty epic code review there. Sorry :( A couple of other questions: ...
8 years, 10 months ago (2012-02-01 07:23:12 UTC) #20
not at google - send to devlin
http://codereview.chromium.org/9192029/diff/33001/chrome/renderer/resources/extensions/event.js File chrome/renderer/resources/extensions/event.js (right): http://codereview.chromium.org/9192029/diff/33001/chrome/renderer/resources/extensions/event.js#newcode260 chrome/renderer/resources/extensions/event.js:260: "choices": typesList.forEach(function(el) {return {"$ref": el};}) What does this do? ...
8 years, 10 months ago (2012-02-01 08:15:57 UTC) #21
battre
Thanks for the review. I think this CL got significantly cleaner. The browser tests require ...
8 years, 10 months ago (2012-02-01 17:35:38 UTC) #22
not at google - send to devlin
LGTM (after those last comments have been addressed) Looks really nice, thanks for clarifying those ...
8 years, 10 months ago (2012-02-01 23:07:23 UTC) #23
battre
Thanks again for the review. I will wait for a final approval by Matt and ...
8 years, 10 months ago (2012-02-02 13:49:59 UTC) #24
Matt Perry
lgtm with 1 potential fix http://codereview.chromium.org/9192029/diff/43001/chrome/renderer/resources/extensions/event.js File chrome/renderer/resources/extensions/event.js (right): http://codereview.chromium.org/9192029/diff/43001/chrome/renderer/resources/extensions/event.js#newcode65 chrome/renderer/resources/extensions/event.js:65: this.eventName_ = opt_eventName; It ...
8 years, 10 months ago (2012-02-06 21:07:13 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/battre@chromium.org/9192029/50002
8 years, 10 months ago (2012-02-07 20:07:32 UTC) #26
commit-bot: I haz the power
8 years, 10 months ago (2012-02-07 20:07:37 UTC) #27
Can't process patch for file
chrome/renderer/resources/extensions/web_request_custom_bindings.js.
File's status is None, patchset upload is incomplete.

Powered by Google App Engine
This is Rietveld 408576698