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

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

Issue 1679023006: Reify view ownership as a message pipe. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 10 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 fa668689b46fbc2f304e04554c4b1f7239bbfadb..22e94834bf9f8b7bcec6decb5640e5baabc57e72 100644
--- a/services/ui/view_manager/view_manager_impl.cc
+++ b/services/ui/view_manager/view_manager_impl.cc
@@ -17,21 +17,18 @@ ViewManagerImpl::~ViewManagerImpl() {}
void ViewManagerImpl::RegisterView(
mojo::ui::ViewPtr view,
mojo::InterfaceRequest<mojo::ui::ViewHost> view_host_request,
- const mojo::String& label,
- const RegisterViewCallback& callback) {
- mojo::ui::ViewTokenPtr view_token =
- registry_->RegisterView(view.Pass(), view_host_request.Pass(), label);
- callback.Run(view_token.Pass());
+ mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request,
+ const mojo::String& label) {
+ registry_->RegisterView(view.Pass(), view_host_request.Pass(),
+ view_owner_request.Pass(), label);
}
void ViewManagerImpl::RegisterViewTree(
mojo::ui::ViewTreePtr view_tree,
mojo::InterfaceRequest<mojo::ui::ViewTreeHost> view_tree_host_request,
- const mojo::String& label,
- const RegisterViewTreeCallback& callback) {
- mojo::ui::ViewTreeTokenPtr view_tree_token = registry_->RegisterViewTree(
- view_tree.Pass(), view_tree_host_request.Pass(), label);
- callback.Run(view_tree_token.Pass());
+ const mojo::String& label) {
+ registry_->RegisterViewTree(view_tree.Pass(), view_tree_host_request.Pass(),
+ label);
}
} // 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