Chromium Code Reviews
Description[ios Mojo] Enabled Mojo WebUI by default.
On all platforms except iOS Mojo API is implemented natively. On iOS
Chrome is not allowed to use Blink and uses WKWebView. So the only way
to implement Mojo API is hybrid approach:
- API frontend is implemented in JS;
- frontend packs function name and arguments into JSON and sends to
the native code;
- window.prompt is used as communication channel, because this is the
only way to send synchronous message from WKWebView;
- native code will pass JSON to facade;
- facade will respond with JSON;
- native code will send JSON back to JS via window.prompt result;
- JS frontend will unpack JSON and will return the result to the caller;
This CL introduces a facade class which takes JSON as in input, passes
it to Mojo and then returns the result as JSON.
Design doc:
https://docs.google.com/document/d/1iUJXX_zoY2BbnecpfxjznOeasf29KUzl_9S_LG08Bes/edit#heading=h.yjqp5garsqf9
BUG=567809
Committed: https://crrev.com/b0bdc55356ab6ad213553ddd32ca82dc2bebd1b7
Cr-Commit-Position: refs/heads/master@{#403864}
Patch Set 1 #
Messages
Total messages: 17 (8 generated)
|
|||||||||||||||||||||||||||||||||||||