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

Issue 2405093003: [WIP] Mojo native bindings interface.

Created:
4 years, 2 months ago by alokp
Modified:
3 years, 9 months ago
Reviewers:
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, nasko+codewatch_chromium.org, jam, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, dglazkov+blink, darin-cc_chromium.org, blink-reviews, blink-reviews-api_chromium.org, darin (slow to review), kinuko+watch
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[WIP] Mojo native bindings interface. BUG=647036

Patch Set 1 #

Patch Set 2 : message pipe #

Patch Set 3 : updates js #

Patch Set 4 : write message #

Patch Set 5 : watch callback #

Patch Set 6 : read message #

Patch Set 7 : restores MojoInterfaceProvider #

Patch Set 8 : fixes gn-check #

Patch Set 9 : implements MojoHandleWatcher #

Patch Set 10 : implements MojoHandle #

Patch Set 11 : serialize handles #

Patch Set 12 : rebase #

Patch Set 13 : deletes MojoInterfaceProvider.idl #

Patch Set 14 : fixes watcher #

Patch Set 15 : implements createMessagePipe #

Patch Set 16 : cleaup API #

Patch Set 17 : fixes link errors #

Patch Set 18 : fixes mojo-helpers #

Patch Set 19 : removed MojoMessagePipeHandle type #

Patch Set 20 : fixes watcher #

Patch Set 21 : defines MojoWatcher interface #

Patch Set 22 : cleanup #

Patch Set 23 : cleanup 2 #

Total comments: 1

Patch Set 24 : custom visitDomWrapper #

Total comments: 2

Patch Set 25 : rebase #

Patch Set 26 : uses ExecutionContext TaskRunner #

Patch Set 27 : rebase #

Patch Set 28 : rebase #

Patch Set 29 : rebase #

Patch Set 30 : rebase #

Patch Set 31 : rebase #

Patch Set 32 : addressed comments #

Patch Set 33 : addressed comments #

Patch Set 34 : rebase #

Patch Set 35 : rebase #

Patch Set 36 : shared buffer #

Patch Set 37 : updates shared buffer tests #

Patch Set 38 : fixes webui tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -124 lines) Patch
M chrome/browser/pdf/pdf_extension_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/webui/web_ui_mojo_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 2 chunks +7 lines, -0 lines 0 comments Download
M content/renderer/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 chunk +0 lines, -1 line 0 comments Download
M content/renderer/mojo/interface_provider_js_wrapper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +11 lines, -1 line 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 3 chunks +2 lines, -8 lines 0 comments Download
M content/shell/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 chunk +0 lines, -1 line 0 comments Download
M content/shell/renderer/layout_test/interface_registry_js_wrapper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +11 lines, -1 line 0 comments Download
M extensions/renderer/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 2 chunks +0 lines, -2 lines 0 comments Download
M extensions/renderer/api_test_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 2 chunks +11 lines, -11 lines 0 comments Download
M extensions/renderer/resources/keep_alive.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 2 chunks +3 lines, -4 lines 0 comments Download
M extensions/test/data/api_test_base_unittest.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 1 chunk +1 line, -4 lines 0 comments Download
M mojo/public/js/bindings.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 3 chunks +4 lines, -5 lines 0 comments Download
M mojo/public/js/connector.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 4 chunks +14 lines, -19 lines 0 comments Download
M mojo/public/js/interface_types.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 3 chunks +5 lines, -6 lines 0 comments Download
M mojo/public/js/router.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 2 chunks +3 lines, -3 lines 0 comments Download
M mojo/public/tools/bindings/generators/js_templates/module.amd.tmpl View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 2 chunks +1 line, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/geolocation-api/resources/geolocation-mock.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/harness-tests/mojo-helpers.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 3 chunks +3 lines, -7 lines 0 comments Download
M third_party/WebKit/LayoutTests/harness-tests/resources/mojo-helpers-inner.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 1 chunk +4 lines, -7 lines 0 comments Download
M third_party/WebKit/LayoutTests/resources/mojo-helpers.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 3 chunks +7 lines, -11 lines 0 comments Download
M third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 5 chunks +7 lines, -17 lines 0 comments Download
M third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 3 chunks +2 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/shapedetection/resources/mock-facedetection.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 3 chunks +2 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/shapedetection/resources/mock-textdetection.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 3 chunks +2 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/Source/web/WebMojoBindings.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 1 chunk +17 lines, -0 lines 0 comments Download
M third_party/WebKit/public/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/public/web/WebMojoBindings.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 1 chunk +24 lines, -0 lines 0 comments Download

Messages

Total messages: 100 (95 generated)
alokp
bashi@: Could you please review the usage of MojoWatchCallback in MojoWatcher? I suspect I am ...
4 years, 2 months ago (2016-10-20 18:18:58 UTC) #47
alokp
https://chromiumcodereview.appspot.com/2405093003/diff/430001/third_party/WebKit/Source/core/mojo/MojoWatcher.cpp File third_party/WebKit/Source/core/mojo/MojoWatcher.cpp (right): https://chromiumcodereview.appspot.com/2405093003/diff/430001/third_party/WebKit/Source/core/mojo/MojoWatcher.cpp#newcode56 third_party/WebKit/Source/core/mojo/MojoWatcher.cpp:56: m_callback(callback), Do I need to do anything else to ...
4 years, 2 months ago (2016-10-20 18:21:38 UTC) #48
bashi
On 2016/10/20 18:18:58, alokp wrote: > bashi@: Could you please review the usage of MojoWatchCallback ...
4 years, 2 months ago (2016-10-20 23:18:15 UTC) #49
alokp
Thanks for the prompt response. This seems to have fixed the GC issue. Can you ...
4 years, 2 months ago (2016-10-21 05:59:00 UTC) #54
bashi
4 years, 2 months ago (2016-10-21 06:12:32 UTC) #57
I'm not familiar with Mojo-stuff but callback usage looks good to me.

https://codereview.chromium.org/2405093003/diff/450001/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/mojo/MojoWatcher.cpp (right):

https://codereview.chromium.org/2405093003/diff/450001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/mojo/MojoWatcher.cpp:102:
m_callback->call(m_scriptState.get(), nullptr, result);
On 2016/10/21 05:58:59, alokp wrote:
> Is it OK to pass nullptr for ScriptWrappable here? If not, which
ScriptWrappable
> needs to be passed?

If you don't need to set |this| in JavaScript's callback, you can pass nullptr.
If you pass nullptr, |this| refers the global object. I'm not sure what the
global object in this context though...

Powered by Google App Engine
This is Rietveld 408576698