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

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

Issue 1682113003: Mojo C++ bindings: Generate InterfaceHandle<> instead of InterfacePtr<>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebase ontop of master, address trung's comments 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 22e94834bf9f8b7bcec6decb5640e5baabc57e72..dbaf9add90072ba2abcd6f635aaee28df1776a35 100644
--- a/services/ui/view_manager/view_manager_impl.cc
+++ b/services/ui/view_manager/view_manager_impl.cc
@@ -4,6 +4,8 @@
#include "services/ui/view_manager/view_manager_impl.h"
+#include <utility>
+
#include "services/ui/view_manager/view_host_impl.h"
#include "services/ui/view_manager/view_tree_host_impl.h"
@@ -15,20 +17,22 @@ ViewManagerImpl::ViewManagerImpl(ViewRegistry* registry)
ViewManagerImpl::~ViewManagerImpl() {}
void ViewManagerImpl::RegisterView(
- mojo::ui::ViewPtr view,
+ mojo::InterfaceHandle<mojo::ui::View> view,
mojo::InterfaceRequest<mojo::ui::ViewHost> view_host_request,
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);
+ registry_->RegisterView(mojo::ui::ViewPtr::Create(std::move(view)),
+ view_host_request.Pass(), view_owner_request.Pass(),
+ label);
}
void ViewManagerImpl::RegisterViewTree(
- mojo::ui::ViewTreePtr view_tree,
+ mojo::InterfaceHandle<mojo::ui::ViewTree> view_tree,
mojo::InterfaceRequest<mojo::ui::ViewTreeHost> view_tree_host_request,
const mojo::String& label) {
- registry_->RegisterViewTree(view_tree.Pass(), view_tree_host_request.Pass(),
- label);
+ registry_->RegisterViewTree(
+ mojo::ui::ViewTreePtr::Create(std::move(view_tree)),
+ 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