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

Side by Side Diff: sky/tests/services/resources/iframe-vmc.js

Issue 912183002: Adds support for embedViewManagerClient() to IFrame. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #!mojo mojo:js_content_handler
2
3 define("main", [
4 "console",
5 "mojo/public/js/bindings",
6 "mojo/services/public/js/application",
7 "mojo/services/view_manager/public/interfaces/view_manager.mojom",
8 "services/js/test/echo_service.mojom",
9 ], function(console, bindings, application, viewManagerMojom, echoServiceMojom) {
10
11 const Application = application.Application;
12 const ViewManagerClient = viewManagerMojom.ViewManagerClient;
13 const EchoService = echoServiceMojom.EchoService;
14
15 var serviceImpl;
16 var success = new Promise(function(resolve) {
17 serviceImpl = {
18 onEmbed: function() {
19 resolve({value: "success"});
20 },
21 echoString: function(s) {
22 return success;
23 },
24 }
25 });
26
27 class IFrameVMCApp extends Application {
28 acceptConnection(initiatorURL, initiatorServiceExchange) {
29 var factory = function() { return serviceImpl; }
30 initiatorServiceExchange.provideService(ViewManagerClient, factory);
31 initiatorServiceExchange.provideService(EchoService, factory);
32 }
33 }
34
35 return IFrameVMCApp;
36 });
OLDNEW
« sky/tests/services/iframe-embed-vmc.sky ('K') | « sky/tests/services/iframe-embed-vmc-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698