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 2575173002: [Extensions Bindings] Add a bridge to use current custom bindings (Closed)

Created:
4 years ago by Devlin
Modified:
4 years ago
Reviewers:
lazyboy, jbroman
CC:
chromium-apps-reviews_chromium.org, chromium-reviews, extensions-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Extensions Bindings] Add a bridge to use current custom bindings Even though, long-term, we want to move entirely away from our current JS-style custom bindings, we need to support them in the short-term (so that we aren't blocked on converting >100 files before moving to native bindings as the default). This adds a bridge to be able to use current custom bindings with the native bindings system. The main step here is adding a bridge object. This is a gin::Wrappable object that can be passed to the custom bindings instead of using binding.generate() and allows custom bindings to register various hooks. Also add an end-to-end test using custom bindings and the chrome.test API. The chrome.test API is itself an extension API which relies on custom bindings, so it's in many ways a good litmus test that this works (on the downside - we needed the system in order to test the system). In addition, add a more local test for custom bindings. BUG=653596 Committed: https://crrev.com/7bf5512f524d82d6bb0a4e3dc6e56e2be9f0d2d8 Cr-Commit-Position: refs/heads/master@{#440310}

Patch Set 1 : . #

Total comments: 15

Patch Set 2 : jbroman's #

Patch Set 3 : d'oh #

Patch Set 4 : update test #

Total comments: 8

Patch Set 5 : jbroman II #

Total comments: 6

Patch Set 6 : lazyboy's #

Patch Set 7 : fix #

Patch Set 8 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+475 lines, -54 lines) Patch
A chrome/browser/extensions/native_bindings_apitest.cc View 1 chunk +33 lines, -0 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/native_bindings/background.html View 1 chunk +2 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/native_bindings/background.js View 1 2 3 1 chunk +40 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/native_bindings/manifest.json View 1 chunk +11 lines, -0 lines 0 comments Download
M extensions/renderer/BUILD.gn View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M extensions/renderer/api_binding.h View 1 2 3 4 5 2 chunks +5 lines, -2 lines 0 comments Download
M extensions/renderer/api_binding.cc View 1 2 3 4 2 chunks +7 lines, -4 lines 0 comments Download
A extensions/renderer/api_binding_bridge.h View 1 2 3 4 1 chunk +62 lines, -0 lines 0 comments Download
A extensions/renderer/api_binding_bridge.cc View 1 2 3 4 1 chunk +99 lines, -0 lines 0 comments Download
M extensions/renderer/api_binding_hooks.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M extensions/renderer/api_binding_hooks.cc View 1 2 3 4 3 chunks +30 lines, -29 lines 0 comments Download
M extensions/renderer/api_binding_test.h View 1 chunk +4 lines, -0 lines 0 comments Download
M extensions/renderer/api_binding_test.cc View 2 chunks +6 lines, -1 line 0 comments Download
M extensions/renderer/api_binding_unittest.cc View 1 2 3 4 5 6 5 chunks +5 lines, -5 lines 0 comments Download
M extensions/renderer/api_bindings_system.h View 1 chunk +2 lines, -1 line 0 comments Download
M extensions/renderer/api_bindings_system.cc View 1 2 chunks +10 lines, -2 lines 0 comments Download
M extensions/renderer/api_bindings_system_unittest.cc View 1 2 3 4 3 chunks +5 lines, -4 lines 0 comments Download
M extensions/renderer/api_request_handler.cc View 1 chunk +1 line, -0 lines 0 comments Download
M extensions/renderer/module_system.h View 2 chunks +10 lines, -0 lines 0 comments Download
M extensions/renderer/module_system.cc View 1 2 3 4 5 4 chunks +19 lines, -1 line 0 comments Download
M extensions/renderer/native_extension_bindings_system.cc View 1 3 chunks +23 lines, -3 lines 0 comments Download
M extensions/renderer/native_extension_bindings_system_unittest.cc View 1 2 3 4 5 6 7 7 chunks +91 lines, -0 lines 0 comments Download
M extensions/renderer/resources/test_custom_bindings.js View 2 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 47 (37 generated)
Devlin
Heya folks, mind taking a look? I think this CL is the one that proves ...
4 years ago (2016-12-16 01:55:49 UTC) #8
jbroman
https://codereview.chromium.org/2575173002/diff/100001/extensions/renderer/BUILD.gn File extensions/renderer/BUILD.gn (right): https://codereview.chromium.org/2575173002/diff/100001/extensions/renderer/BUILD.gn#newcode187 extensions/renderer/BUILD.gn:187: "string_source_map.cc", Shouldn't these be in the unit_tests target? It ...
4 years ago (2016-12-16 19:00:50 UTC) #9
Devlin
https://codereview.chromium.org/2575173002/diff/100001/extensions/renderer/BUILD.gn File extensions/renderer/BUILD.gn (right): https://codereview.chromium.org/2575173002/diff/100001/extensions/renderer/BUILD.gn#newcode187 extensions/renderer/BUILD.gn:187: "string_source_map.cc", On 2016/12/16 19:00:49, jbroman wrote: > Shouldn't these ...
4 years ago (2016-12-16 20:31:17 UTC) #11
jbroman
lgtm; the lifetime now looks simpler to me Please rebase to remove the changes that ...
4 years ago (2016-12-20 20:51:35 UTC) #23
Devlin
lazyboy@, wanna take a look? https://codereview.chromium.org/2575173002/diff/160001/extensions/renderer/api_binding_bridge.cc File extensions/renderer/api_binding_bridge.cc (right): https://codereview.chromium.org/2575173002/diff/160001/extensions/renderer/api_binding_bridge.cc#newcode64 extensions/renderer/api_binding_bridge.cc:64: v8::Local<v8::Value> hook_interface; On 2016/12/20 ...
4 years ago (2016-12-20 22:20:20 UTC) #25
lazyboy
lgtm https://codereview.chromium.org/2575173002/diff/180001/extensions/renderer/api_binding.h File extensions/renderer/api_binding.h (right): https://codereview.chromium.org/2575173002/diff/180001/extensions/renderer/api_binding.h#newcode101 extensions/renderer/api_binding.h:101: // The registered hooks for this API. Null ...
4 years ago (2016-12-21 19:49:58 UTC) #26
Devlin
https://codereview.chromium.org/2575173002/diff/180001/extensions/renderer/api_binding.h File extensions/renderer/api_binding.h (right): https://codereview.chromium.org/2575173002/diff/180001/extensions/renderer/api_binding.h#newcode101 extensions/renderer/api_binding.h:101: // The registered hooks for this API. Null if ...
4 years ago (2016-12-22 01:49:10 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2575173002/240001
4 years ago (2016-12-22 01:49:32 UTC) #42
commit-bot: I haz the power
Committed patchset #8 (id:240001)
4 years ago (2016-12-22 01:56:19 UTC) #45
commit-bot: I haz the power
4 years ago (2016-12-22 02:00:17 UTC) #47
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/7bf5512f524d82d6bb0a4e3dc6e56e2be9f0d2d8
Cr-Commit-Position: refs/heads/master@{#440310}

Powered by Google App Engine
This is Rietveld 408576698