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

Side by Side Diff: mojo/public/dart/src/application.dart

Issue 922083002: Add initializeFromShellProxy to application.dart (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | sky/examples/dart-mojo.sky » ('j') | sky/examples/dart-mojo.sky » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 part of application; 5 part of application;
6 6
7 class _ApplicationImpl extends application_mojom.Application { 7 class _ApplicationImpl extends application_mojom.Application {
8 shell_mojom.ShellProxy shell; 8 shell_mojom.ShellProxy shell;
9 Application _application; 9 Application _application;
10 10
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 81 }
82 82
83 Application.fromHandle(core.MojoHandle appHandle) { 83 Application.fromHandle(core.MojoHandle appHandle) {
84 _applicationConnections = []; 84 _applicationConnections = [];
85 _serviceProviders = []; 85 _serviceProviders = [];
86 _applicationImpl = new _ApplicationImpl.fromHandle(this, appHandle); 86 _applicationImpl = new _ApplicationImpl.fromHandle(this, appHandle);
87 } 87 }
88 88
89 void initialize(List<String> args, String url) {} 89 void initialize(List<String> args, String url) {}
90 90
91 // TODO(skydart): This is a temporary fix to allow sky application to consume
92 // mojo services. Do not use for any other purpose.
zra 2015/02/13 07:14:23 thanks for adding this.
93 void initializeFromShellProxy(shell_mojom.ShellProxy shellProxy,
94 List<String> args, String url) {
95 _applicationImpl.initialize(shellProxy, args, url);
96 }
97
91 // Establishes a connection to the app at |url|. 98 // Establishes a connection to the app at |url|.
92 ApplicationConnection connectToApplication(String url) { 99 ApplicationConnection connectToApplication(String url) {
93 var serviceProviderProxy = 100 var serviceProviderProxy =
94 new service_provider.ServiceProviderProxy.unbound(); 101 new service_provider.ServiceProviderProxy.unbound();
95 // TODO: Need to expose ServiceProvider for local services. 102 // TODO: Need to expose ServiceProvider for local services.
96 _applicationImpl.shell.connectToApplication( 103 _applicationImpl.shell.connectToApplication(
97 url, serviceProviderProxy, null); 104 url, serviceProviderProxy, null);
98 var applicationConnection = new ApplicationConnection(serviceProviderProxy); 105 var applicationConnection = new ApplicationConnection(serviceProviderProxy);
99 _applicationConnections.add(applicationConnection); 106 _applicationConnections.add(applicationConnection);
100 return applicationConnection; 107 return applicationConnection;
(...skipping 28 matching lines...) Expand all
129 var serviceProvider = new ServiceProvider(services, exposedServices); 136 var serviceProvider = new ServiceProvider(services, exposedServices);
130 _serviceProviders.add(serviceProvider); 137 _serviceProviders.add(serviceProvider);
131 acceptConnection(requestorUrl, serviceProvider); 138 acceptConnection(requestorUrl, serviceProvider);
132 } 139 }
133 140
134 // Override to register the necessary set of interface on |serviceProvider|. 141 // Override to register the necessary set of interface on |serviceProvider|.
135 // If you register at least one interface (or set the fallback), then you 142 // If you register at least one interface (or set the fallback), then you
136 // must invoke serviceProvider.listen(). 143 // must invoke serviceProvider.listen().
137 void acceptConnection(String requestorUrl, ServiceProvider serviceProvider) {} 144 void acceptConnection(String requestorUrl, ServiceProvider serviceProvider) {}
138 } 145 }
OLDNEW
« no previous file with comments | « no previous file | sky/examples/dart-mojo.sky » ('j') | sky/examples/dart-mojo.sky » ('J')

Powered by Google App Engine
This is Rietveld 408576698