|
[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}
Total comments: 15
Total comments: 8
Total comments: 6
|
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
|
Total messages: 47 (37 generated)
|