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

Side by Side Diff: services/js/test/echo.js

Issue 821403003: Changes magic sequence to '!#mojo ' and strips 'mojo ' when building url (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: two more Created 5 years, 11 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
« no previous file with comments | « mojo/public/mojo_application.gni ('k') | services/js/test/network_test.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!mojo:js_content_handler 1 #!mojo mojo:js_content_handler
2 2
3 define("main", [ 3 define("main", [
4 "mojo/services/public/js/application", 4 "mojo/services/public/js/application",
5 "services/js/test/echo_service.mojom" 5 "services/js/test/echo_service.mojom"
6 ], function(application, echoServiceMojom) { 6 ], function(application, echoServiceMojom) {
7 7
8 const Application = application.Application; 8 const Application = application.Application;
9 const EchoService = echoServiceMojom.EchoService; 9 const EchoService = echoServiceMojom.EchoService;
10 10
11 class Echo extends Application { 11 class Echo extends Application {
12 acceptConnection(url, serviceProvider) { 12 acceptConnection(url, serviceProvider) {
13 var app = this; 13 var app = this;
14 function EchoServiceImpl(client) { 14 function EchoServiceImpl(client) {
15 this.echoString = function(s) { 15 this.echoString = function(s) {
16 if (s == "quit") 16 if (s == "quit")
17 app.quit(); 17 app.quit();
18 return Promise.resolve({value: s}); 18 return Promise.resolve({value: s});
19 }; 19 };
20 } 20 }
21 serviceProvider.provideService(EchoService, EchoServiceImpl); 21 serviceProvider.provideService(EchoService, EchoServiceImpl);
22 } 22 }
23 } 23 }
24 24
25 return Echo; 25 return Echo;
26 }); 26 });
OLDNEW
« no previous file with comments | « mojo/public/mojo_application.gni ('k') | services/js/test/network_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698