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

Unified Diff: remoting/client/jni/chromoting_jni_instance.cc

Issue 19500017: Implement basic point-and-touch mouse input for Android client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Bump version number to 0.01 Created 7 years, 5 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 | « remoting/client/jni/chromoting_jni_instance.h ('k') | remoting/client/jni/jni_interface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « remoting/client/jni/chromoting_jni_instance.h ('k') | remoting/client/jni/jni_interface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698