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

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

Issue 1578473002: Pass application ids via AcceptConnection & ConnectToApplication callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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 unified diff | Download patch
« no previous file with comments | « mojo/shell/public/cpp/lib/service_registry.cc ('k') | mojo/shell/public/interfaces/shell.mojom » ('j') | no next file with comments »
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 module mojo; 5 module mojo;
6 6
7 import "mojo/shell/public/interfaces/service_provider.mojom"; 7 import "mojo/shell/public/interfaces/service_provider.mojom";
8 import "mojo/shell/public/interfaces/shell.mojom"; 8 import "mojo/shell/public/interfaces/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 // 13 //
14 // TODO(aa): It would be good to reorder the parameters once we have interface 14 // TODO(aa): It would be good to reorder the parameters once we have interface
15 // versioning. 15 // versioning.
16 interface Application { 16 interface Application {
17 // Initializes the application with the specified arguments. This method is 17 // Initializes the application with the specified arguments. This method is
18 // 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
19 // called once. 19 // called once.
20 // 20 //
21 // The |url| parameter is the identity of the application as far as the shell 21 // The |url| parameter is the identity of the application as far as the shell
22 // is concerned. This will be the URL the application was found at, after all 22 // is concerned. This will be the URL the application was found at, after all
23 // mappings, resolution, and redirects. And it will not include the 23 // mappings, resolution, and redirects. And it will not include the
24 // querystring, since the querystring is not part of an application's 24 // querystring, since the querystring is not part of an application's
25 // identity. 25 // identity.
26 Initialize(Shell shell, string url); 26 Initialize(Shell shell, string url, uint32 id);
sky 2016/01/12 20:57:44 nit: document what |id| is.
27 27
28 // Called when another application (identified by |requestor_url|) attempts to 28 // Called when another application (identified by |requestor_url|) attempts to
29 // open a connection to this application. 29 // open a connection to this application.
30 // 30 //
31 // If the other application wants to request services from this application, 31 // If the other application wants to request services from this application,
32 // it will have passed a valid interface request through the |services| 32 // it will have passed a valid interface request through the |services|
33 // parameter (i.e. one containing a valid message pipe endpoint). This 33 // parameter (i.e. one containing a valid message pipe endpoint). This
34 // application may then bind an implementation of |ServiceProvider| to that 34 // application may then bind an implementation of |ServiceProvider| to that
35 // request in order to make services available to the other application. 35 // request in order to make services available to the other application.
36 // 36 //
(...skipping 14 matching lines...) Expand all
51 // application. When this parameter is empty, this application should expose 51 // application. When this parameter is empty, this application should expose
52 // no services to the connecting application. When this parameter contains 52 // no services to the connecting application. When this parameter contains
53 // only the single string value "*" the application may expose all of its 53 // only the single string value "*" the application may expose all of its
54 // services to the connecting application. 54 // services to the connecting application.
55 // 55 //
56 // |resolved_url| is the URL that was requested to create this connection, 56 // |resolved_url| is the URL that was requested to create this connection,
57 // after all mappings, resolutions, and redirects. This will include any 57 // after all mappings, resolutions, and redirects. This will include any
58 // querystring that was part of the request. 58 // querystring that was part of the request.
59 // 59 //
60 AcceptConnection(string requestor_url, 60 AcceptConnection(string requestor_url,
61 uint32 requestor_id,
61 ServiceProvider&? services, 62 ServiceProvider&? services,
62 ServiceProvider? exposed_services, 63 ServiceProvider? exposed_services,
63 array<string> allowed_interfaces, 64 array<string> allowed_interfaces,
64 string resolved_url); 65 string resolved_url);
65 66
66 // Called by the shell in response to calling Shell's QuitApplication. The 67 // Called by the shell in response to calling Shell's QuitApplication. The
67 // application should run the callback with true if shutdown can proceed. 68 // application should run the callback with true if shutdown can proceed.
68 // See Shell::QuitApplication for details about shutdown workflow. 69 // See Shell::QuitApplication for details about shutdown workflow.
69 OnQuitRequested() => (bool can_quit); 70 OnQuitRequested() => (bool can_quit);
70 }; 71 };
OLDNEW
« no previous file with comments | « mojo/shell/public/cpp/lib/service_registry.cc ('k') | mojo/shell/public/interfaces/shell.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698