Mojo C++ bindings: Generate InterfaceHandle<> instead of InterfacePtr<>.
This includes replacing all consumers of InterfacePtr<> (which were
previously generated; mostly they are implementations of interfaces)
with InterfaceHandle<>.
This was a fairly mechanical process of replacing InterfacePtr with
InterfaceHandle<>, and I've transformed one from the other at the
earliest occurance. There are places where I could've delayed
converting InterfaceHandle->InterfacePtr to a later point, but
this entire job was very arduous.
This CL needs to follow up with another doing the same thing, but in
Flutter engine's services.
BUG=#662
R=viettrungluu@chromium.org, jamesr@chromium.org
Review URL: https://codereview.chromium.org/1682113003 .
diff --git a/services/gles2/command_buffer_impl.cc b/services/gles2/command_buffer_impl.cc
index f999c8e..db1f677 100644
--- a/services/gles2/command_buffer_impl.cc
+++ b/services/gles2/command_buffer_impl.cc
@@ -4,6 +4,8 @@
#include "services/gles2/command_buffer_impl.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "gpu/command_buffer/service/sync_point_manager.h"
@@ -42,7 +44,7 @@
base::WeakPtr<CommandBufferImpl> command_buffer_;
scoped_refptr<base::SingleThreadTaskRunner> control_task_runner_;
};
-}
+} // namespace
CommandBufferImpl::CommandBufferImpl(
mojo::InterfaceRequest<mojo::CommandBuffer> request,
@@ -72,11 +74,12 @@
}
void CommandBufferImpl::Initialize(
- mojo::CommandBufferSyncClientPtr sync_client,
- mojo::CommandBufferSyncPointClientPtr sync_point_client,
- mojo::CommandBufferLostContextObserverPtr loss_observer,
+ mojo::InterfaceHandle<mojo::CommandBufferSyncClient> sync_client,
+ mojo::InterfaceHandle<mojo::CommandBufferSyncPointClient> sync_point_client,
+ mojo::InterfaceHandle<mojo::CommandBufferLostContextObserver> loss_observer,
mojo::ScopedSharedBufferHandle shared_state) {
- sync_point_client_ = sync_point_client.Pass();
+ sync_point_client_ = mojo::CommandBufferSyncPointClientPtr::Create(
+ std::move(sync_point_client));
driver_task_runner_->PostTask(
FROM_HERE,
base::Bind(&CommandBufferDriver::Initialize,