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

Unified Diff: services/ui/input_manager/input_associate.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/input_manager/input_associate.h ('k') | services/ui/view_manager/view_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/input_manager/input_associate.cc
diff --git a/services/ui/input_manager/input_associate.cc b/services/ui/input_manager/input_associate.cc
index c97f7056647dee59a122ded1222b0095cabdbed0..72dd59674d7070576e88bf1b8c8b83deefbd7e08 100644
--- a/services/ui/input_manager/input_associate.cc
+++ b/services/ui/input_manager/input_associate.cc
@@ -4,6 +4,8 @@
#include "services/ui/input_manager/input_associate.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/logging.h"
#include "mojo/public/cpp/bindings/interface_request.h"
@@ -14,8 +16,9 @@ InputAssociate::InputAssociate() {}
InputAssociate::~InputAssociate() {}
-void InputAssociate::Connect(mojo::ui::ViewInspectorPtr inspector,
- const ConnectCallback& callback) {
+void InputAssociate::Connect(
+ mojo::InterfaceHandle<mojo::ui::ViewInspector> inspector,
+ const ConnectCallback& callback) {
DCHECK(inspector); // checked by mojom
auto info = mojo::ui::ViewAssociateInfo::New();
@@ -50,12 +53,13 @@ void InputAssociate::ConnectToViewTreeService(
}
}
-void InputAssociate::SetListener(mojo::ui::ViewToken* view_token,
- mojo::ui::InputListenerPtr listener) {
+void InputAssociate::SetListener(
+ mojo::ui::ViewToken* view_token,
+ mojo::InterfaceHandle<mojo::ui::InputListener> listener) {
// TODO(jeffbrown): This simple hack just hooks up the first listener
// ever seen.
if (!listener_)
- listener_ = listener.Pass();
+ listener_ = mojo::ui::InputListenerPtr::Create(std::move(listener));
}
void InputAssociate::DispatchEvent(mojo::ui::ViewTreeToken* view_tree_token,
@@ -81,8 +85,8 @@ InputAssociate::InputConnectionImpl::InputConnectionImpl(
InputAssociate::InputConnectionImpl::~InputConnectionImpl() {}
void InputAssociate::InputConnectionImpl::SetListener(
- mojo::ui::InputListenerPtr listener) {
- associate_->SetListener(view_token_.get(), listener.Pass());
+ mojo::InterfaceHandle<mojo::ui::InputListener> listener) {
+ associate_->SetListener(view_token_.get(), std::move(listener));
}
InputAssociate::InputDispatcherImpl::InputDispatcherImpl(
« no previous file with comments | « services/ui/input_manager/input_associate.h ('k') | services/ui/view_manager/view_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698