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

Unified Diff: mojo/services/ui/views/interfaces/view_manager.mojom

Issue 1949233002: Create a RegisterViewAssociate method in ViewManager (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: add tests to mojo tests Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/services/ui/views/interfaces/view_associates.mojom ('k') | mojo/tools/data/apptests » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/ui/views/interfaces/view_manager.mojom
diff --git a/mojo/services/ui/views/interfaces/view_manager.mojom b/mojo/services/ui/views/interfaces/view_manager.mojom
index 6592ea9119d0c4de1cece5eb2a507535f9bced46..68487bcf56c082add5de347f7ce008b026e787fe 100644
--- a/mojo/services/ui/views/interfaces/view_manager.mojom
+++ b/mojo/services/ui/views/interfaces/view_manager.mojom
@@ -67,4 +67,30 @@ interface ViewManager {
CreateViewTree(mojo.ui.ViewTree& view_tree,
mojo.ui.ViewTreeListener view_tree_listener,
string? label);
+
+ // Registers a view associate with the view manager.
+ //
+ // The services provided by |view_associate| will be made available to views.
+ //
+ // You receive a |view_associate_owner| which will receive a connection error
+ // callback if |view_associate| is closed. Conversely, the service for
+ // |view_associate| will be destroyed if |view_associate_owner| is destroyed.
+ //
+ // |label| is used to identify the ViewAssociate for debug purposes.
+ //
+ // TODO(mikejurka): This method should only be made accessible to trusted
+ // services, once we have a security story
+ RegisterViewAssociate(mojo.ui.ViewAssociate view_associate,
+ mojo.ui.ViewAssociateOwner& view_associate_owner, string? label);
+
+ // Tells the view manager we've registered all our view associates.
+ //
+ // This allows it to prevent views from requesting services from ViewAssociate
+ // before all the ViewAssociates have been registered.
+ //
+ // TODO(mikejurka): This method should only be made accessible to trusted
+ // services, once we have a security story
+ // TODO(mikejurka): We should remove this method once we have a way of
+ // dynamically registering and unregistering ViewAssociates
+ FinishedRegisteringViewAssociates();
};
« no previous file with comments | « mojo/services/ui/views/interfaces/view_associates.mojom ('k') | mojo/tools/data/apptests » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698