| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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.shell.test.mojom; | 5 module mojo.shell.test.mojom; |
| 6 | 6 |
| 7 interface ConnectTestService { | 7 interface ConnectTestService { |
| 8 GetTitle() => (string title); | 8 GetTitle() => (string title); |
| 9 GetInstance() => (string instance); | 9 GetInstance() => (string instance); |
| 10 }; | 10 }; |
| 11 | 11 |
| 12 // Interface implemented by a standalone (non-package) app. | 12 interface ClassInterface { |
| 13 Ping() => (string response); |
| 14 }; |
| 15 |
| 16 // Interface implemented by a standalone (non-package) app, |
| 17 // mojo:connect_test_app. |
| 13 interface StandaloneApp { | 18 interface StandaloneApp { |
| 14 // Attempts to connect to an application whose name is explicitly allowed by | 19 // Attempts to connect to an application whose name is explicitly allowed by |
| 15 // the standalone app's CapabilityFilter, but whose enclosing package is not. | 20 // the standalone app's CapabilitySpec, but whose enclosing package is not. |
| 16 // The connection should be blocked and title should be "uninitialized". | 21 // The connection should be blocked and title should be "uninitialized". |
| 17 ConnectToAllowedAppInBlockedPackage() => (string title); | 22 ConnectToAllowedAppInBlockedPackage() => (string title); |
| 23 |
| 24 // Connects to mojo:connect_test_class_app & requests ClassInterface from it. |
| 25 // This should be permitted because mojo:connect_test_app requests class |
| 26 // "class" from mojo:connect_test_class_app, which mojo:connect_test_class_app |
| 27 // defines as including ClassInterface. |
| 28 // The response contains the response from ClassInterface::Ping() and |
| 29 // ConnectTestService::GetTitle(). |
| 30 ConnectToClassInterface() => (string class_interface_response, string title); |
| 18 }; | 31 }; |
| 19 | 32 |
| 20 struct ConnectionState { | 33 struct ConnectionState { |
| 21 string connection_local_name; | 34 string connection_local_name; |
| 22 string connection_remote_name; | 35 string connection_remote_name; |
| 23 string connection_remote_userid; | 36 string connection_remote_userid; |
| 24 uint32 connection_remote_id; | 37 uint32 connection_remote_id; |
| 25 string initialize_local_name; | 38 string initialize_local_name; |
| 26 string initialize_userid; | 39 string initialize_userid; |
| 27 uint32 initialize_id; | 40 uint32 initialize_id; |
| 28 }; | 41 }; |
| 29 | 42 |
| 30 interface ExposedInterface { | 43 interface ExposedInterface { |
| 31 ConnectionAccepted(ConnectionState state); | 44 ConnectionAccepted(ConnectionState state); |
| 32 }; | 45 }; |
| 33 | 46 |
| 34 interface BlockedInterface { | 47 interface BlockedInterface { |
| 35 GetTitleBlocked() => (string blocked_title); | 48 GetTitleBlocked() => (string blocked_title); |
| 36 }; | 49 }; |
| OLD | NEW |