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

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

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
Index: remoting/client/jni/chromoting_jni_instance.h
diff --git a/remoting/client/jni/chromoting_jni_instance.h b/remoting/client/jni/chromoting_jni_instance.h
index 2374e24e7d1b1ba92f1ccc001ead0df4ead5434c..1c113cfd9e08358c3a0a847cd3187af249f8f230 100644
--- a/remoting/client/jni/chromoting_jni_instance.h
+++ b/remoting/client/jni/chromoting_jni_instance.h
@@ -19,13 +19,21 @@
#include "remoting/client/jni/jni_frame_consumer.h"
#include "remoting/jingle_glue/network_settings.h"
#include "remoting/jingle_glue/xmpp_signal_strategy.h"
+#include "remoting/protocol/clipboard_stub.h"
#include "remoting/protocol/connection_to_host.h"
+#include "remoting/protocol/cursor_shape_stub.h"
namespace remoting {
+namespace protocol {
+ class ClipboardEvent;
+ class CursorShapeInfo;
+} // namespace protocol
// ClientUserInterface that indirectly makes and receives JNI calls.
class ChromotingJniInstance
: public ClientUserInterface,
+ public protocol::ClipboardStub,
+ public protocol::CursorShapeStub,
public base::RefCountedThreadSafe<ChromotingJniInstance> {
public:
// Initiates a connection with the specified host. Call from the UI thread.
@@ -48,6 +56,13 @@ class ChromotingJniInstance
// Schedules a redraw on the display thread. May be called from any thread.
void RedrawDesktop();
+ // Moves the host's cursor to the specified coordinates, optionally with some
+ // mouse button depressed. If |button| is BUTTON_UNDEFINED, no click is made.
+ void PerformMouseAction(int x,
+ int y,
+ protocol::MouseEvent_MouseButton button,
+ bool buttonDown);
+
// ClientUserInterface implementation.
virtual void OnConnectionState(
protocol::ConnectionToHost::State state,
@@ -61,6 +76,13 @@ class ChromotingJniInstance
virtual scoped_ptr<protocol::ThirdPartyClientAuthenticator::TokenFetcher>
GetTokenFetcher(const std::string& host_public_key) OVERRIDE;
+ // CursorShapeStub implementation.
+ virtual void InjectClipboardEvent(
+ const protocol::ClipboardEvent& event) OVERRIDE;
+
+ // ClipboardStub implementation.
+ virtual void SetCursorShape(const protocol::CursorShapeInfo& shape) OVERRIDE;
+
private:
// This object is ref-counted, so it cleans itself up.
virtual ~ChromotingJniInstance();

Powered by Google App Engine
This is Rietveld 408576698