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

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

Issue 943053003: Simple multi-url support for mojo apps (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: hate Created 5 years, 9 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
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 implements application_mojom.Application { 7 class _ApplicationImpl implements application_mojom.Application {
8 application_mojom.ApplicationStub _stub; 8 application_mojom.ApplicationStub _stub;
9 shell_mojom.ShellProxy shell; 9 shell_mojom.ShellProxy shell;
10 Application _application; 10 Application _application;
(...skipping 15 matching lines...) Expand all
26 26
27 void initialize( 27 void initialize(
28 bindings.ProxyBase shellProxy, List<String> args, String url) { 28 bindings.ProxyBase shellProxy, List<String> args, String url) {
29 assert(shell == null); 29 assert(shell == null);
30 shell = shellProxy; 30 shell = shellProxy;
31 _application.initialize(args, url); 31 _application.initialize(args, url);
32 } 32 }
33 33
34 void acceptConnection(String requestorUrl, 34 void acceptConnection(String requestorUrl,
35 ServiceProviderStub services, 35 ServiceProviderStub services,
36 bindings.ProxyBase exposedServices) => 36 bindings.ProxyBase exposedServices,
37 String requested_url) =>
37 _application._acceptConnection(requestorUrl, services, exposedServices); 38 _application._acceptConnection(requestorUrl, services, exposedServices);
qsr 2015/02/27 17:15:58 Don't know if you want to solve this now, but this
Aaron Boodman 2015/02/28 19:08:22 Agree, but I will leave that to the dartisans.
38 39
39 void requestQuit() => _application._requestQuitAndClose(); 40 void requestQuit() => _application._requestQuitAndClose();
40 41
41 void close({bool nodefer: false}) => shell.close(); 42 void close({bool nodefer: false}) => shell.close();
42 } 43 }
43 44
44 // TODO(zra): Better documentation and examples. 45 // TODO(zra): Better documentation and examples.
45 // To implement, do the following: 46 // To implement, do the following:
46 // - Optionally override initialize() to process command-line args. 47 // - Optionally override initialize() to process command-line args.
47 // - Optionally override acceptConnection() if services are to be provided. 48 // - Optionally override acceptConnection() if services are to be provided.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 _applicationConnections.add(connection); 105 _applicationConnections.add(connection);
105 acceptConnection(requestorUrl, connection); 106 acceptConnection(requestorUrl, connection);
106 } 107 }
107 108
108 // Override this method to provide services on |connection|. 109 // Override this method to provide services on |connection|.
109 // If you provide at least one service or set fallbackServiceProvider, 110 // If you provide at least one service or set fallbackServiceProvider,
110 // then you must invoke connection.listen(). 111 // then you must invoke connection.listen().
111 void acceptConnection(String requestorUrl, ApplicationConnection connection) { 112 void acceptConnection(String requestorUrl, ApplicationConnection connection) {
112 } 113 }
113 } 114 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698