|
|
Implement an infrastructure of Blink-in-JS
* Design doc is here: https://docs.google.com/a/google.com/document/d/13cT9Klgvt_ciAR3ONGvzKvw6fz9-f6E0FrqYFqfoc8Y/edit
* Developers can use Blink-in-JS in the following steps:
(1) Implement a DOM feature in XXX.js.
installClass("XXX", function() {
function func1(int value) { ... }
function func2(Node node) { ... }
return {func1: func1, func2: func2};
});
(2) Add XXX.idl that defines an interface from C++ to the JS functions.
[BlinkInJSInterface] interface XXX {
void func1(int value);
DOMString func2(Node node);
};
(3) Then developers can use V8XXX::func1(int) and V8XXX::func2(Node*) in C++.
* For more details, see what BlinkInJSTest.js, BlinkInJSTest.idl and BlinkInJSTest.cpp are doing.
* Important files in this CL are as follows:
- BlinkInJSTest.js, BlinkInJSTest.idl and BlinkInJSTest.cpp: Test cases for Blink-in-JS.
- v8_blink_in_js.py, blink_in_js_interface.{h,cpp}: The code generator for Blink-in-JS' IDL files. You can see the generated code in V8TestBlinkInJSInterface.{h,cpp}.
- make_blink_in_js.py: Converts the contents of Blink-in-JS' JS files into byte stream. The byte stream is generated to BlinkInJSSources.h.
- BlinkInJSController.{h,cpp}: Compiles the byte stream and invokes the JS code.
BUG= 341031
TEST=BlinkInJSTest
Total comments: 17
Total comments: 35
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+965 lines, -43 lines) |
Patch |
 |
M |
Source/bindings/IDLExtendedAttributes.txt
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/core/idl.gypi
|
View
|
1
2
3
4
5
6
|
2 chunks |
+8 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/bindings/scripts/code_generator_v8.py
|
View
|
1
2
3
4
5
6
|
3 chunks |
+9 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/bindings/scripts/scripts.gypi
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/scripts/v8_callback_interface.py
|
View
|
1
2
3
4
|
2 chunks |
+5 lines, -9 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/scripts/v8_interface.py
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/bindings/scripts/v8_methods.py
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
A |
Source/bindings/scripts/v8_private_script_interface.py
|
View
|
1
2
3
4
|
1 chunk |
+83 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/scripts/v8_types.py
|
View
|
1
2
3
4
|
6 chunks |
+31 lines, -24 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/templates/callback_interface.cpp
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
A |
Source/bindings/templates/private_script_interface.h
|
View
|
1
2
3
|
1 chunk |
+28 lines, -0 lines |
0 comments
|
Download
|
 |
A |
Source/bindings/templates/private_script_interface.cpp
|
View
|
1
2
3
4
5
|
1 chunk |
+60 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/templates/templates.gypi
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
A |
Source/bindings/tests/idls/TestPrivateScriptInterface.idl
|
View
|
1
2
3
4
|
1 chunk |
+15 lines, -0 lines |
0 comments
|
Download
|
 |
A |
Source/bindings/tests/results/V8TestPrivateScriptInterface.h
|
View
|
1
2
3
4
|
1 chunk |
+29 lines, -0 lines |
0 comments
|
Download
|
 |
A |
Source/bindings/tests/results/V8TestPrivateScriptInterface.cpp
|
View
|
1
2
3
4
5
|
1 chunk |
+178 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/DOMWrapperWorld.h
|
View
|
1
2
3
|
4 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/DOMWrapperWorld.cpp
|
View
|
1
2
3
|
1 chunk |
+13 lines, -0 lines |
0 comments
|
Download
|
 |
A |
Source/bindings/v8/PrivateScriptController.h
|
View
|
1
2
3
4
5
|
1 chunk |
+22 lines, -0 lines |
0 comments
|
Download
|
 |
A |
Source/bindings/v8/PrivateScriptController.cpp
|
View
|
1
2
3
4
5
|
1 chunk |
+60 lines, -0 lines |
0 comments
|
Download
|
 |
A |
Source/bindings/v8/PrivateScriptController.js
|
View
|
1
2
3
|
1 chunk |
+15 lines, -0 lines |
0 comments
|
Download
|
 |
A |
Source/bindings/v8/PrivateScriptTest.cpp
|
View
|
1
2
3
|
1 chunk |
+189 lines, -0 lines |
0 comments
|
Download
|
 |
A |
Source/bindings/v8/PrivateScriptTest.idl
|
View
|
1
2
3
|
1 chunk |
+26 lines, -0 lines |
0 comments
|
Download
|
 |
A |
Source/bindings/v8/PrivateScriptTest.js
|
View
|
1
2
3
|
1 chunk |
+80 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/ScriptController.cpp
|
View
|
1
2
3
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/V8EventListener.cpp
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/V8PerContextData.h
|
View
|
1
2
3
4
5
|
3 chunks |
+7 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/V8PerContextData.cpp
|
View
|
1
2
3
4
5
|
2 chunks |
+15 lines, -4 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/V8PerIsolateData.h
|
View
|
1
2
3
4
5
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/V8WindowShell.cpp
|
View
|
1
2
3
4
5
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/v8.gypi
|
View
|
1
2
3
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
A |
Source/build/scripts/make_private_script_source.py
|
View
|
1
2
3
4
|
1 chunk |
+46 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/core/core_generated.gyp
|
View
|
1
2
3
4
|
1 chunk |
+23 lines, -0 lines |
0 comments
|
Download
|
Total messages: 18 (0 generated)
|