|
|
[Extensions Bindings] Request JS execution from messaging bindings
Instead of synchronously forcing JS execution in messaging bindings, use
safer alternatives to request JS execution. Since this modifies the
ability of the called function to return a result (synchronously, at
least), change messaging bindings to query for listeners natively rather
than in JS (which is also less likely to be incorrect).
This involves introducing a way to query if a given context has a
listener for an event. Provide this functionality for both native and
JS bindings. For native bindings, simply expose a method on
APIEventHandler. For JS bindings, make the NullAttachmentStrategy
register unmanaged events with the event bindings.
Also expose a way to get the Dispatcher statically from the messaging
bindings in order to get at the ExtensionBindingsSystem, and restructure
ownership of the dispatcher in extensions/shell.
BUG= 629431
Review-Url: https://codereview.chromium.org/2909673003
Cr-Commit-Position: refs/heads/master@{#478492}
Committed: https://chromium.googlesource.com/chromium/src/+/978464a97d85014ca4414366789702be3b35fa15
Total comments: 13
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+237 lines, -47 lines) |
Patch |
 |
M |
chrome/renderer/extensions/chrome_extensions_renderer_client.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/renderer/extensions/chrome_extensions_renderer_client.cc
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/api_event_handler.h
|
View
|
1
2
3
4
|
2 chunks |
+9 lines, -3 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/api_event_handler.cc
|
View
|
1
2
3
|
1 chunk |
+16 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/dispatcher.h
|
View
|
1
2
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/event_bindings.h
|
View
|
1
2
3
4
|
2 chunks |
+8 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/event_bindings.cc
|
View
|
1
2
3
4
|
6 chunks |
+55 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/event_emitter.h
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/extension_bindings_system.h
|
View
|
1
2
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/extensions_renderer_client.h
|
View
|
1
2
|
2 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/js_extension_bindings_system.h
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/js_extension_bindings_system.cc
|
View
|
1
2
|
2 chunks |
+7 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/messaging_bindings.h
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/messaging_bindings.cc
|
View
|
1
2
3
4
|
4 chunks |
+30 lines, -23 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/native_extension_bindings_system.h
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/native_extension_bindings_system.cc
|
View
|
1
2
3
|
1 chunk |
+8 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/native_extension_bindings_system_unittest.cc
|
View
|
1
2
3
|
2 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/resources/event.js
|
View
|
1
2
|
1 chunk |
+15 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/resources/messaging.js
|
View
|
1
2
3
4
|
1 chunk |
+28 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/test_extensions_renderer_client.h
|
View
|
1
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/test_extensions_renderer_client.cc
|
View
|
1
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/shell/renderer/shell_content_renderer_client.h
|
View
|
1
2
3
|
2 chunks |
+0 lines, -4 lines |
0 comments
|
Download
|
 |
M |
extensions/shell/renderer/shell_content_renderer_client.cc
|
View
|
1
2
3
|
5 chunks |
+11 lines, -12 lines |
0 comments
|
Download
|
 |
M |
extensions/shell/renderer/shell_extensions_renderer_client.h
|
View
|
1
|
2 chunks |
+8 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/shell/renderer/shell_extensions_renderer_client.cc
|
View
|
1
|
2 chunks |
+11 lines, -2 lines |
0 comments
|
Download
|
Total messages: 32 (25 generated)
|