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

Side by Side Diff: mojo/public/interfaces/application/application.mojom

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 module mojo; 5 module mojo;
6 6
7 import "mojo/public/interfaces/application/service_provider.mojom"; 7 import "mojo/public/interfaces/application/service_provider.mojom";
8 import "mojo/public/interfaces/application/shell.mojom"; 8 import "mojo/public/interfaces/application/shell.mojom";
9 9
10 // This is the primary interface implemented by every Mojo application. It 10 // This is the primary interface implemented by every Mojo application. It
11 // allows the application to receive its startup arguments from the shell, and 11 // allows the application to receive its startup arguments from the shell, and
12 // to be notified of events that occur during its execution. 12 // to be notified of events that occur during its execution.
13 //
14 // TODO(aa): It would be good to reorder the parameters once we have interface
15 // versioning.
13 interface Application { 16 interface Application {
14 // Initializes the application with the specified arguments. This method is 17 // Initializes the application with the specified arguments. This method is
15 // guaranteed to be called before any other method is called, and will only be 18 // guaranteed to be called before any other method is called, and will only be
16 // called once. The |url| parameter is the final url the application was found 19 // called once. The |url| parameter is the final url the application was found
17 // at, after all redirects and resolutions. 20 // at, after all redirects and resolutions.
18 Initialize(Shell shell, array<string>? args, string url); 21 Initialize(Shell shell, array<string>? args, string url);
19 22
20 // Called when another application (identified by |requestor_url|) attempts to 23 // Called when another application (identified by |requestor_url|) attempts to
21 // open a connection to this application. 24 // open a connection to this application.
22 // 25 //
23 // If the other application wants to request services from this application, 26 // If the other application wants to request services from this application,
24 // it will have passed a valid interface request through the |services| 27 // it will have passed a valid interface request through the |services|
25 // parameter (i.e. one containing a valid message pipe endpoint). This 28 // parameter (i.e. one containing a valid message pipe endpoint). This
26 // application may then bind an implementation of |ServiceProvider| to that 29 // application may then bind an implementation of |ServiceProvider| to that
27 // request in order to make services available to the other application. 30 // request in order to make services available to the other application.
28 // 31 //
29 // If the other application wants to offer services to this application, it 32 // If the other application wants to offer services to this application, it
30 // will have passed a bound interface through the |exposed_services| 33 // will have passed a bound interface through the |exposed_services|
31 // parameter. This application may then request services through that 34 // parameter. This application may then request services through that
32 // interface. 35 // interface.
33 // 36 //
34 // It is possible that both parameters will be valid/bound if the other 37 // It is possible that both parameters will be valid/bound if the other
35 // application wants to both request services from and offer services to this 38 // application wants to both request services from and offer services to this
36 // application. 39 // application.
37 // 40 //
38 // This application is free to ignore the |services| or |exposed_services| 41 // This application is free to ignore the |services| or |exposed_services|
39 // parameters if it does not wish to offer or request services. 42 // parameters if it does not wish to offer or request services.
43 //
44 // resolved_url is the URL that was requested after all resolutions and
45 // redirects. This can be different than the URL this application was actually
46 // found at, if the application is handling multiple URLs.
qsr 2015/02/27 17:15:58 Did you try putting resolved_url first, then annot
Aaron Boodman 2015/02/28 19:08:23 I tried, it doesn't seem to be fully implemented.
40 AcceptConnection(string requestor_url, 47 AcceptConnection(string requestor_url,
41 ServiceProvider&? services, 48 ServiceProvider&? services,
42 ServiceProvider? exposed_services); 49 ServiceProvider? exposed_services,
50 string resolved_url);
43 51
44 // Called to request the application shut itself down gracefully. 52 // Called to request the application shut itself down gracefully.
45 RequestQuit(); 53 RequestQuit();
46 }; 54 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698