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

Unified 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, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/apps/js/main.cc ('k') | mojo/apps/js/mojo_runner_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/apps/js/main.js
diff --git a/mojo/apps/js/main.js b/mojo/apps/js/main.js
index a04048ad4b556df6bb971f1338680c8993fa774a..2592422d5743435036aa553c835c4e9973eda58d 100644
--- a/mojo/apps/js/main.js
+++ b/mojo/apps/js/main.js
@@ -4,10 +4,10 @@
define([
"console",
- "mojo/apps/js/bootstrap",
+ "mojo/apps/js/threading",
"mojo/public/bindings/js/connector",
"mojom/hello_world_service",
-], function(console, bootstrap, connector, hello) {
+], function(console, threading, connector, hello) {
function HelloWorldClientImpl() {
}
@@ -18,12 +18,16 @@ define([
HelloWorldClientImpl.prototype.didReceiveGreeting = function(result) {
console.log("DidReceiveGreeting from pipe: " + result);
connection.close();
- bootstrap.quit();
+ threading.quit();
};
- var connection = new connector.Connection(bootstrap.initialHandle,
- HelloWorldClientImpl,
- hello.HelloWorldServiceProxy);
+ var connection = null;
- connection.remote.greeting("hello, world!");
+ return function(handle) {
+ connection = new connector.Connection(handle,
+ HelloWorldClientImpl,
+ hello.HelloWorldServiceProxy);
+
+ connection.remote.greeting("hello, world!");
+ };
});
« 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