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

Unified Diff: mojo/services/public/js/application.js

Issue 799113004: Update mojo sdk to rev 59145288bae55b0fce4276b017df6a1117bcf00f (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add mojo's ply to checklicenses whitelist Created 6 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 side-by-side diff with in-line comments
Download patch
Index: mojo/services/public/js/application.js
diff --git a/mojo/services/public/js/application.js b/mojo/services/public/js/application.js
index 58934241994b85e5494aba9ddbc0a7119b808b2d..60e20d9fc2a1dc048a2e8026f9b273d0cb0a31e6 100644
--- a/mojo/services/public/js/application.js
+++ b/mojo/services/public/js/application.js
@@ -4,22 +4,28 @@
define("mojo/services/public/js/application", [
"services/js/app_bridge",
+ "mojo/public/interfaces/application/service_provider.mojom",
"mojo/services/public/js/service_provider",
"mojo/services/public/js/shell",
-], function(appBridgeModule, spModule, shellModule) {
+], function(appBridgeModule, spInterfaceModule, spModule, shellModule) {
class Application {
- constructor(appShell, url) {
- this.shell = new shellModule.Shell(appShell);
+ constructor(shellHandle, url) {
this.url = url;
this.serviceProviders = [];
+ this.shellHandle_ = shellHandle;
+ this.shell = new shellModule.Shell(shellHandle, {
+ initialize: this.initialize.bind(this),
+ acceptConnection: this.doAcceptConnection.bind(this),
+ });
}
initialize(args) {
}
- acceptConnection_(url, spHandle) {
- var serviceProvider = new spModule.ServiceProvider(spHandle);
+ doAcceptConnection(url, spHandle) {
+ var service = new spInterfaceModule.ServiceProvider.proxyClass(spHandle);
+ var serviceProvider = new spModule.ServiceProvider(service);
this.serviceProviders.push(serviceProvider);
this.acceptConnection(url, serviceProvider);
}
@@ -28,10 +34,10 @@ define("mojo/services/public/js/application", [
}
quit() {
- this.shell.close();
this.serviceProviders.forEach(function(sp) {
sp.close();
});
+ this.shell.close();
appBridgeModule.quit();
}
}
« no previous file with comments | « mojo/services/public/interfaces/window_manager2/window_manager2.mojom ('k') | mojo/services/public/js/service_provider.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698