Chromium Code Reviews

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

Issue 919883002: Allow sky apps to be consumers of mojo services (Closed) Base URL: https://github.com/eseidel/skydart.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « no previous file | sky/engine/bindings2/BUILD.gn » ('j') | sky/engine/bindings2/BUILD.gn » ('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 50 matching lines...)
61 _serviceProviders = []; 61 _serviceProviders = [];
62 _applicationImpl = new _ApplicationImpl(this, endpoint); 62 _applicationImpl = new _ApplicationImpl(this, endpoint);
63 } 63 }
64 64
65 Application.fromHandle(core.MojoHandle appHandle) { 65 Application.fromHandle(core.MojoHandle appHandle) {
66 _proxies = []; 66 _proxies = [];
67 _serviceProviders = []; 67 _serviceProviders = [];
68 _applicationImpl = new _ApplicationImpl.fromHandle(this, appHandle); 68 _applicationImpl = new _ApplicationImpl.fromHandle(this, appHandle);
69 } 69 }
70 70
71 void initializeFromShellProxy(shell_mojom.ShellProxy shellProxy, List<String> args) {
rafaelw 2015/02/12 00:58:00 Zach: This was necessary because we need to do som
zra 2015/02/12 04:01:45 Please fix the long line. 80 char max for Dart cod
rafaelw 2015/02/12 18:54:55 Done.
72 _applicationImpl.initialize(shellProxy, args);
73 }
74
71 void initialize(List<String> args) {} 75 void initialize(List<String> args) {}
72 76
73 void connectToService(String url, bindings.Proxy proxy) { 77 void connectToService(String url, bindings.Proxy proxy) {
74 assert(!proxy.isBound); 78 assert(!proxy.isBound);
75 var endpoint = _connectToServiceHelper(url, proxy.name); 79 var endpoint = _connectToServiceHelper(url, proxy.name);
76 proxy.bind(endpoint); 80 proxy.bind(endpoint);
77 } 81 }
78 82
79 void requestQuit() {} 83 void requestQuit() {}
80 84
(...skipping 31 matching lines...)
112 var applicationEndpoint = applicationPipe.endpoints[1]; 116 var applicationEndpoint = applicationPipe.endpoints[1];
113 var serviceProviderProxy = 117 var serviceProviderProxy =
114 new service_provider.ServiceProviderProxy.unbound(); 118 new service_provider.ServiceProviderProxy.unbound();
115 _applicationImpl.shell.connectToApplication( 119 _applicationImpl.shell.connectToApplication(
116 url, serviceProviderProxy, null); 120 url, serviceProviderProxy, null);
117 serviceProviderProxy.connectToService(service, applicationEndpoint); 121 serviceProviderProxy.connectToService(service, applicationEndpoint);
118 _proxies.add(serviceProviderProxy); 122 _proxies.add(serviceProviderProxy);
119 return proxyEndpoint; 123 return proxyEndpoint;
120 } 124 }
121 } 125 }
OLDNEW
« no previous file with comments | « no previous file | sky/engine/bindings2/BUILD.gn » ('j') | sky/engine/bindings2/BUILD.gn » ('J')

Powered by Google App Engine