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

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

Issue 795593004: Update mojo sdk to rev cc531b32182099a5a034a99daff35ed5d38a61c8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More workarounds for MSVC 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
« no previous file with comments | « mojo/services/public/js/service_provider.js ('k') | mojo/services/surfaces/public/interfaces/quads.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/public/js/shell.js
diff --git a/mojo/services/public/js/shell.js b/mojo/services/public/js/shell.js
index c80caa20638f789caec753c2dddae7eaa49d7f67..fdec4b1300b8514edb767212df1988ca368f852c 100644
--- a/mojo/services/public/js/shell.js
+++ b/mojo/services/public/js/shell.js
@@ -4,16 +4,27 @@
define("mojo/services/public/js/shell", [
"mojo/public/js/core",
+ "mojo/public/js/connection",
"mojo/public/interfaces/application/shell.mojom",
"mojo/public/interfaces/application/service_provider.mojom",
- "mojo/services/public/js/service_provider",
-], function(coreModule, shellInterfaceModule, spInterfaceModule, spModule) {
+ "mojo/services/public/js/service_provider"
+], function(core,
+ connection,
+ shellMojom,
+ serviceProviderMojom,
+ serviceProvider) {
+
+ const ServiceProvider = serviceProvider.ServiceProvider;
+ const ServiceProviderInterface = serviceProviderMojom.ServiceProvider;
+ const ShellInterface = shellMojom.Shell;
class Shell {
constructor(shellHandle, app) {
this.shellHandle = shellHandle;
- this.proxy = new shellInterfaceModule.Shell.proxyClass(shellHandle);
- this.proxy.client$ = app;
+ this.proxy = connection.bindProxyHandle(
+ shellHandle, ShellInterface.client, ShellInterface);
+ this.proxy.local$ = app; // The app is the shell's client.
+ // TODO: call this serviceProviders_
this.applications_ = new Map();
}
@@ -22,15 +33,15 @@ define("mojo/services/public/js/shell", [
if (application)
return application;
- var spProxy = new spInterfaceModule.ServiceProvider.proxyClass;
- this.proxy.connectToApplication(url, spProxy);
- application = new spModule.ServiceProvider(spProxy);
+ var returnValue = {};
+ this.proxy.connectToApplication(url, returnValue);
+ application = new ServiceProvider(returnValue.remote$);
this.applications_.set(url, application);
return application;
}
connectToService(url, service, client) {
- return this.connectToApplication(url).connectToService(service, client);
+ return this.connectToApplication(url).requestService(service, client);
};
close() {
@@ -38,7 +49,7 @@ define("mojo/services/public/js/shell", [
application.close();
});
this.applications_.clear();
- coreModule.close(this.shellHandle);
+ core.close(this.shellHandle);
}
}
« no previous file with comments | « mojo/services/public/js/service_provider.js ('k') | mojo/services/surfaces/public/interfaces/quads.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698