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

Side by Side Diff: mojo/apps/js/main.js

Issue 90203002: [Mojo] Remove static "bootstrap" state in mojo_js (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CHECK, CHECK, CHECK Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « mojo/apps/js/main.cc ('k') | mojo/apps/js/mojo_runner_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 define([ 5 define([
6 "console", 6 "console",
7 "mojo/apps/js/bootstrap", 7 "mojo/apps/js/threading",
8 "mojo/public/bindings/js/connector", 8 "mojo/public/bindings/js/connector",
9 "mojom/hello_world_service", 9 "mojom/hello_world_service",
10 ], function(console, bootstrap, connector, hello) { 10 ], function(console, threading, connector, hello) {
11 11
12 function HelloWorldClientImpl() { 12 function HelloWorldClientImpl() {
13 } 13 }
14 14
15 HelloWorldClientImpl.prototype = 15 HelloWorldClientImpl.prototype =
16 Object.create(hello.HelloWorldClientStub.prototype); 16 Object.create(hello.HelloWorldClientStub.prototype);
17 17
18 HelloWorldClientImpl.prototype.didReceiveGreeting = function(result) { 18 HelloWorldClientImpl.prototype.didReceiveGreeting = function(result) {
19 console.log("DidReceiveGreeting from pipe: " + result); 19 console.log("DidReceiveGreeting from pipe: " + result);
20 connection.close(); 20 connection.close();
21 bootstrap.quit(); 21 threading.quit();
22 }; 22 };
23 23
24 var connection = new connector.Connection(bootstrap.initialHandle, 24 var connection = null;
25 HelloWorldClientImpl,
26 hello.HelloWorldServiceProxy);
27 25
28 connection.remote.greeting("hello, world!"); 26 return function(handle) {
27 connection = new connector.Connection(handle,
28 HelloWorldClientImpl,
29 hello.HelloWorldServiceProxy);
30
31 connection.remote.greeting("hello, world!");
32 };
29 }); 33 });
OLDNEW
« no previous file with comments | « mojo/apps/js/main.cc ('k') | mojo/apps/js/mojo_runner_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698