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

Unified Diff: services/ui/view_manager/view_manager_impl.cc

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 | « services/ui/view_manager/view_manager_impl.h ('k') | services/ui/view_manager/view_registry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/view_manager/view_manager_impl.cc
diff --git a/services/ui/view_manager/view_manager_impl.cc b/services/ui/view_manager/view_manager_impl.cc
index 7e443b211c1bb1050e4b85d8cc391b135b057bb3..975bc4070f30e21c7e08f82f32f39711129e9b8f 100644
--- a/services/ui/view_manager/view_manager_impl.cc
+++ b/services/ui/view_manager/view_manager_impl.cc
@@ -6,6 +6,7 @@
#include <utility>
+#include "base/bind.h"
#include "services/ui/view_manager/view_impl.h"
#include "services/ui/view_manager/view_tree_impl.h"
@@ -36,4 +37,19 @@ void ViewManagerImpl::CreateViewTree(
label);
}
+// TODO(mikejurka): This should only be called by trusted code (ie launcher),
+// once we have a security story.
+void ViewManagerImpl::RegisterViewAssociate(
+ mojo::InterfaceHandle<mojo::ui::ViewAssociate> view_associate,
+ mojo::InterfaceRequest<mojo::ui::ViewAssociateOwner> view_associate_owner,
+ const mojo::String& label) {
+ registry_->RegisterViewAssociate(
+ registry_, mojo::ui::ViewAssociatePtr::Create(std::move(view_associate)),
+ view_associate_owner.Pass(), label);
+}
+
+void ViewManagerImpl::FinishedRegisteringViewAssociates() {
+ registry_->FinishedRegisteringViewAssociates();
+}
+
} // namespace view_manager
« no previous file with comments | « services/ui/view_manager/view_manager_impl.h ('k') | services/ui/view_manager/view_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698