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/services/ui/views/interfaces/view_associates.mojom"; | 8 import "mojo/services/ui/views/interfaces/view_associates.mojom"; |
9 import "mojo/services/ui/views/interfaces/view_trees.mojom"; | 9 import "mojo/services/ui/views/interfaces/view_trees.mojom"; |
10 import "mojo/services/ui/views/interfaces/views.mojom"; | 10 import "mojo/services/ui/views/interfaces/views.mojom"; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
60 // | 60 // |
61 // The |label| is an optional name to associate with the view tree for | 61 // The |label| is an optional name to associate with the view tree for |
62 // diagnostic purposes. The label will be truncated if it is longer | 62 // diagnostic purposes. The label will be truncated if it is longer |
63 // than |kLabelMaxLength|. | 63 // than |kLabelMaxLength|. |
64 // | 64 // |
65 // To destroy the view tree simply close the |view_tree| or | 65 // To destroy the view tree simply close the |view_tree| or |
66 // |view_tree_listener| message pipes. | 66 // |view_tree_listener| message pipes. |
67 CreateViewTree(mojo.ui.ViewTree& view_tree, | 67 CreateViewTree(mojo.ui.ViewTree& view_tree, |
68 mojo.ui.ViewTreeListener view_tree_listener, | 68 mojo.ui.ViewTreeListener view_tree_listener, |
69 string? label); | 69 string? label); |
70 | |
71 // Registers a view associate with the view manager. | |
72 // | |
73 // The services provided by |view_associate| will be made available to views. | |
74 // TODO(mikejurka): This method should only be made accessible to trusted | |
75 // services, once we have a security story | |
76 RegisterViewAssociate(mojo.ui.ViewAssociate view_associate, string? label); | |
77 | |
78 // Registers a ViewAssociateWatcher with the view manager. We use this to | |
79 // notify methods when a view associate's connection has closed. | |
80 RegisterViewAssociateWatcher(mojo.ui.ViewAssociateWatcher view_associate_watch er); | |
70 }; | 81 }; |
82 | |
83 // Used to monitor whether a ViewAssociate's connection has closed. | |
84 interface ViewAssociateWatcher { | |
85 // Called when a ViewAssociate's connection has an error. |label| is the | |
86 // that was passing in when the ViewAssociate was registered using RegisterVie wAssociate | |
87 OnViewAssociateConnectionError(string? label) => (); | |
jeffbrown
2016/05/17 00:44:49
Returning the label is useful for diagnostics but
| |
88 }; | |
OLD | NEW |