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

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

Issue 858103002: Remove [Client=] annotation from ServiceProvider (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase for trybots (no code changes from ps2) 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 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 a50f84c4fe353e5147641524b22af647a2bf8826..ed41628ae3a34153a2f584c122706d07ac666589 100644
--- a/mojo/services/public/js/application.js
+++ b/mojo/services/public/js/application.js
@@ -3,11 +3,13 @@
// found in the LICENSE file.
define("mojo/services/public/js/application", [
+ "mojo/public/js/bindings",
+ "mojo/public/js/threading",
"mojo/services/public/js/service_provider",
"mojo/services/public/js/shell",
- "mojo/public/js/threading",
-], function(serviceProvider, shell, threading) {
+], function(bindings, threading, serviceProvider, shell) {
+ const ProxyBindings = bindings.ProxyBindings;
const ServiceProvider = serviceProvider.ServiceProvider;
const Shell = shell.Shell;
@@ -26,18 +28,27 @@ define("mojo/services/public/js/application", [
initialize(args) {
}
- doAcceptConnection(url, serviceProviderProxy, exposedServiceProviderProxy) {
- var serviceProvider = new ServiceProvider(serviceProviderProxy);
+ // The mojom signature of this function is:
+ // AcceptConnection(string requestor_url,
+ // ServiceProvider&? services,
+ // ServiceProvider? exposed_services);
+ //
+ // We want to bind |services| to our js implementation of ServiceProvider
+ // and store |exposed_services| so we can request services of the connecting
+ // application.
+ doAcceptConnection(requestorUrl, servicesRequest, exposedServicesProxy) {
+ // Construct a new js ServiceProvider that can make outgoing calls on
+ // exposedServicesProxy.
+ var serviceProvider = new ServiceProvider(exposedServicesProxy);
this.serviceProviders.push(serviceProvider);
- var exposedServiceProvider =
- new ServiceProvider(exposedServiceProviderProxy);
- this.exposedServiceProviders.push(exposedServiceProvider);
+ // Then associate incoming calls with the serviceProvider.
+ ProxyBindings(servicesRequest).setLocalDelegate(serviceProvider);
- this.acceptConnection(url, serviceProvider, exposedServiceProvider);
+ this.acceptConnection(requestorUrl, serviceProvider);
}
- acceptConnection(url, serviceProvider, exposedServiceProvider) {
+ acceptConnection(requestorUrl, serviceProvider) {
}
quit() {
« no previous file with comments | « mojo/public/interfaces/application/service_provider.mojom ('k') | mojo/services/public/js/service_provider.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698