| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 [DartPackage="mojo_services"] | 5 [DartPackage="mojo_services"] |
| 6 module mojo.ui; | 6 module mojo.ui; |
| 7 | 7 |
| 8 import "mojo/public/interfaces/application/service_provider.mojom"; | 8 import "mojo/public/interfaces/application/service_provider.mojom"; |
| 9 import "mojo/services/ui/views/interfaces/view_trees.mojom"; |
| 9 import "mojo/services/ui/views/interfaces/views.mojom"; | 10 import "mojo/services/ui/views/interfaces/views.mojom"; |
| 10 import "mojo/services/ui/views/interfaces/view_trees.mojom"; | |
| 11 | 11 |
| 12 // View associates are trusted components that are attached to a view manager | 12 // View associates are trusted components that are attached to a view manager |
| 13 // instance with the purpose of offering additional services to views and | 13 // instance with the purpose of offering additional services to views and |
| 14 // view trees registered beyond the basic operations performed by the | 14 // view trees registered beyond the basic operations performed by the |
| 15 // view manager itself. Associates may be used to implement input, | 15 // view manager itself. Associates may be used to implement input, |
| 16 // accessibility, editing, and other capabilities. | 16 // accessibility, editing, and other capabilities. |
| 17 // | 17 // |
| 18 // Associates are coupled to a view manager instance for the entire life | 18 // Associates are coupled to a view manager instance for the entire life |
| 19 // of that view manager. Associates cannot be dynamically added or removed | 19 // of that view manager. Associates cannot be dynamically added or removed |
| 20 // since applications rely on the services that they offer and expect them | 20 // since applications rely on the services that they offer and expect them |
| (...skipping 19 matching lines...) Expand all Loading... |
| 40 // The associate must return information about the services that it | 40 // The associate must return information about the services that it |
| 41 // offers in |info|. | 41 // offers in |info|. |
| 42 Connect(ViewInspector inspector) => (ViewAssociateInfo info); | 42 Connect(ViewInspector inspector) => (ViewAssociateInfo info); |
| 43 | 43 |
| 44 // Asks the associate to provide the view service identified by | 44 // Asks the associate to provide the view service identified by |
| 45 // |interface_name| through the message |pipe| endpoint supplied by | 45 // |interface_name| through the message |pipe| endpoint supplied by |
| 46 // the caller. If the associate is not willing or able to provide the | 46 // the caller. If the associate is not willing or able to provide the |
| 47 // requested service, it should close the |pipe|. | 47 // requested service, it should close the |pipe|. |
| 48 // | 48 // |
| 49 // The |view_token| is the token of the view which requested the service. | 49 // The |view_token| is the token of the view which requested the service. |
| 50 ConnectToViewService(ViewToken view_token, string service_name, | 50 ConnectToViewService(ViewToken view_token, string service_name, handle<message
_pipe> pipe); |
| 51 handle<message_pipe> pipe); | |
| 52 | 51 |
| 53 // Asks the associate to provide the view tree service identified by | 52 // Asks the associate to provide the view tree service identified by |
| 54 // |interface_name| through the message |pipe| endpoint supplied by | 53 // |interface_name| through the message |pipe| endpoint supplied by |
| 55 // the caller. If the associate is not willing or able to provide the | 54 // the caller. If the associate is not willing or able to provide the |
| 56 // requested service, it should close the |pipe|. | 55 // requested service, it should close the |pipe|. |
| 57 // | 56 // |
| 58 // The |view_tree_token| is the token of the view tree which requested | 57 // The |view_tree_token| is the token of the view tree which requested |
| 59 // the service. | 58 // the service. |
| 60 ConnectToViewTreeService(ViewTreeToken view_tree_token, | 59 ConnectToViewTreeService(ViewTreeToken view_tree_token, string service_name, h
andle<message_pipe> pipe); |
| 61 string service_name, handle<message_pipe> pipe); | |
| 62 }; | 60 }; |
| 63 | 61 |
| 64 // Provides information about the services offered by an associate. | 62 // Provides information about the services offered by an associate. |
| 65 struct ViewAssociateInfo { | 63 struct ViewAssociateInfo { |
| 66 // The names of view services offered by the associate. | 64 // The names of view services offered by the associate. |
| 67 // May be null if none. | 65 // May be null if none. |
| 68 array<string>? view_service_names; | 66 array<string>? view_service_names; |
| 69 | 67 |
| 70 // The names of view tree services offered by the associate. | 68 // The names of view tree services offered by the associate. |
| 71 // May be null if none. | 69 // May be null if none. |
| 72 array<string>? view_tree_service_names; | 70 array<string>? view_tree_service_names; |
| 73 }; | 71 }; |
| 74 | 72 |
| 75 // Provides a view associate with the ability to inspect and perform operations | 73 // Provides a view associate with the ability to inspect and perform operations |
| 76 // on the contents of views and view trees. | 74 // on the contents of views and view trees. |
| 77 interface ViewInspector { | 75 interface ViewInspector{}; |
| 78 | |
| 79 }; | |
| OLD | NEW |