| Index: remoting/client/jni/jni_display_handler.cc
|
| diff --git a/remoting/client/jni/jni_display_handler.cc b/remoting/client/jni/jni_display_handler.cc
|
| index e139e7bc3ab7578af1345d9402a27e9e3a595c42..c634697bc71a07f636797ba258b956ef92ad0786 100644
|
| --- a/remoting/client/jni/jni_display_handler.cc
|
| +++ b/remoting/client/jni/jni_display_handler.cc
|
| @@ -10,6 +10,7 @@
|
| #include "base/memory/ptr_util.h"
|
| #include "base/stl_util.h"
|
| #include "jni/Display_jni.h"
|
| +#include "remoting/client/cursor_shape_stub_proxy.h"
|
| #include "remoting/client/jni/chromoting_jni_runtime.h"
|
| #include "remoting/client/jni/jni_client.h"
|
| #include "remoting/client/jni/jni_video_renderer.h"
|
| @@ -24,33 +25,6 @@ const int kBytesPerPixel = 4;
|
|
|
| namespace remoting {
|
|
|
| -// CursorShapeStub with a lifetime separated from JniDisplayHandler.
|
| -class DisplayCursorShapeStub : public protocol::CursorShapeStub {
|
| - public:
|
| - DisplayCursorShapeStub(
|
| - base::WeakPtr<JniDisplayHandler> display,
|
| - scoped_refptr<base::SingleThreadTaskRunner> task_runner);
|
| - void SetCursorShape(const protocol::CursorShapeInfo& cursor_shape) override;
|
| - private:
|
| - base::WeakPtr<JniDisplayHandler> display_handler_;
|
| - scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
|
| -};
|
| -
|
| -DisplayCursorShapeStub::DisplayCursorShapeStub(
|
| - base::WeakPtr<JniDisplayHandler> display,
|
| - scoped_refptr<base::SingleThreadTaskRunner> task_runner) :
|
| - display_handler_(display),
|
| - task_runner_(task_runner) {
|
| -}
|
| -
|
| -void DisplayCursorShapeStub::SetCursorShape(
|
| - const protocol::CursorShapeInfo& cursor_shape) {
|
| - task_runner_->PostTask(FROM_HERE,
|
| - base::Bind(&JniDisplayHandler::UpdateCursorShape,
|
| - display_handler_,
|
| - cursor_shape));
|
| -}
|
| -
|
| // JniDisplayHandler definitions.
|
| JniDisplayHandler::JniDisplayHandler(ChromotingJniRuntime* runtime)
|
| : runtime_(runtime),
|
| @@ -73,7 +47,7 @@ void JniDisplayHandler::InitializeClient(
|
| java_display_.obj(), java_client.obj());
|
| }
|
|
|
| -void JniDisplayHandler::UpdateCursorShape(
|
| +void JniDisplayHandler::SetCursorShape(
|
| const protocol::CursorShapeInfo& cursor_shape) {
|
| DCHECK(runtime_->display_task_runner()->BelongsToCurrentThread());
|
|
|
| @@ -95,8 +69,8 @@ void JniDisplayHandler::UpdateCursorShape(
|
|
|
| std::unique_ptr<protocol::CursorShapeStub>
|
| JniDisplayHandler::CreateCursorShapeStub() {
|
| - return base::WrapUnique(
|
| - new DisplayCursorShapeStub(weak_ptr_, runtime_->display_task_runner()));
|
| + return base::WrapUnique(new CursorShapeStubProxy(
|
| + weak_ptr_, runtime_->display_task_runner()));
|
| }
|
|
|
| std::unique_ptr<protocol::VideoRenderer>
|
|
|