Index: remoting/client/jni/chromoting_jni_instance.cc |
diff --git a/remoting/client/jni/chromoting_jni_instance.cc b/remoting/client/jni/chromoting_jni_instance.cc |
index 6c6f075c7f21173b11650f1af05bae6c13b47d76..fcb4db332dbba13e7549317a654f05376da11889 100644 |
--- a/remoting/client/jni/chromoting_jni_instance.cc |
+++ b/remoting/client/jni/chromoting_jni_instance.cc |
@@ -75,14 +75,41 @@ void ChromotingJniInstance::RedrawDesktop() { |
display_task_runner()->BelongsToCurrentThread()) { |
ChromotingJni::GetInstance()->display_task_runner()->PostTask( |
FROM_HERE, |
- base::Bind(&ChromotingJniInstance::RedrawDesktop, |
- this)); |
+ base::Bind(&ChromotingJniInstance::RedrawDesktop, this)); |
return; |
} |
ChromotingJni::GetInstance()->RedrawCanvas(); |
} |
+void ChromotingJniInstance::PerformMouseAction( |
+ int x, |
+ int y, |
+ protocol::MouseEvent_MouseButton button, |
+ bool buttonDown) { |
+ if(!ChromotingJni::GetInstance()-> |
+ network_task_runner()->BelongsToCurrentThread()) { |
+ ChromotingJni::GetInstance()->network_task_runner()->PostTask( |
+ FROM_HERE, |
+ base::Bind(&ChromotingJniInstance::PerformMouseAction, |
+ this, |
+ x, |
+ y, |
+ button, |
+ buttonDown)); |
+ return; |
+ } |
+ |
+ protocol::MouseEvent action; |
+ action.set_x(x); |
+ action.set_y(y); |
+ action.set_button(button); |
+ if (button != protocol::MouseEvent::BUTTON_UNDEFINED) |
+ action.set_button_down(buttonDown); |
+ |
+ connection_->input_stub()->InjectMouseEvent(action); |
+} |
+ |
void ChromotingJniInstance::OnConnectionState( |
protocol::ConnectionToHost::State state, |
protocol::ErrorCode error) { |
@@ -113,13 +140,11 @@ void ChromotingJniInstance::SetPairingResponse( |
} |
protocol::ClipboardStub* ChromotingJniInstance::GetClipboardStub() { |
- NOTIMPLEMENTED(); |
- return NULL; |
+ return this; |
} |
protocol::CursorShapeStub* ChromotingJniInstance::GetCursorShapeStub() { |
- NOTIMPLEMENTED(); |
- return NULL; |
+ return this; |
} |
scoped_ptr<protocol::ThirdPartyClientAuthenticator::TokenFetcher> |
@@ -128,6 +153,16 @@ scoped_ptr<protocol::ThirdPartyClientAuthenticator::TokenFetcher> |
return scoped_ptr<protocol::ThirdPartyClientAuthenticator::TokenFetcher>(); |
} |
+void ChromotingJniInstance::InjectClipboardEvent( |
+ const protocol::ClipboardEvent& event) { |
+ NOTIMPLEMENTED(); |
+} |
+ |
+void ChromotingJniInstance::SetCursorShape( |
+ const protocol::CursorShapeInfo& shape) { |
+ NOTIMPLEMENTED(); |
+} |
+ |
void ChromotingJniInstance::ConnectToHostOnDisplayThread() { |
DCHECK(ChromotingJni::GetInstance()-> |
display_task_runner()->BelongsToCurrentThread()); |