OLD | NEW |
| (Empty) |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 module mojo.shell.test.mojom; | |
6 | |
7 import "mojo/shell/public/interfaces/connector.mojom"; | |
8 | |
9 interface ConnectTestService { | |
10 GetTitle() => (string title); | |
11 GetInstance() => (string instance); | |
12 }; | |
13 | |
14 interface ClassInterface { | |
15 Ping() => (string response); | |
16 }; | |
17 | |
18 // Interface implemented by a standalone (non-package) app, | |
19 // mojo:connect_test_app. | |
20 interface StandaloneApp { | |
21 // Attempts to connect to an application whose name is explicitly allowed by | |
22 // the standalone app's CapabilitySpec, but whose enclosing package is not. | |
23 // The connection should be blocked and title should be "uninitialized". | |
24 ConnectToAllowedAppInBlockedPackage() => (string title); | |
25 | |
26 // Connects to mojo:connect_test_class_app & requests ClassInterface from it. | |
27 // This should be permitted because mojo:connect_test_app requests class | |
28 // "class" from mojo:connect_test_class_app, which mojo:connect_test_class_app | |
29 // defines as including ClassInterface. | |
30 // The response contains the response from ClassInterface::Ping() and | |
31 // ConnectTestService::GetTitle(). | |
32 ConnectToClassInterface() => (string class_interface_response, string title); | |
33 }; | |
34 | |
35 interface UserIdTest { | |
36 // Attempts to connect to mojo:connect_test_class_app as |user_id|. | |
37 // The callback takes the connection response result, and the identity | |
38 // mojo:connect_test_class_app was run as, which should match |user_id|. | |
39 ConnectToClassAppAsDifferentUser(mojo.shell.mojom.Identity target) => | |
40 (int32 connection_result, mojo.shell.mojom.Identity target); | |
41 }; | |
42 | |
43 interface ClientProcessTest { | |
44 // Attempts to launch a bare exe and connect to it using the | |
45 // ClientProcessConnection param to Connector::Connect(). The callback takes | |
46 // the result of the connection, and the identity of the app that the caller | |
47 // can use to connect to this app as well. | |
48 LaunchAndConnectToProcess() => | |
49 (int32 connection_result, mojo.shell.mojom.Identity target); | |
50 }; | |
51 | |
52 struct ConnectionState { | |
53 string connection_local_name; | |
54 string connection_remote_name; | |
55 string connection_remote_userid; | |
56 uint32 connection_remote_id; | |
57 string initialize_local_name; | |
58 string initialize_userid; | |
59 uint32 initialize_id; | |
60 }; | |
61 | |
62 interface ExposedInterface { | |
63 ConnectionAccepted(ConnectionState state); | |
64 }; | |
65 | |
66 interface BlockedInterface { | |
67 GetTitleBlocked() => (string blocked_title); | |
68 }; | |
OLD | NEW |