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

Unified Diff: remoting/client/plugin/chromoting_instance.h

Issue 10025001: Add APIs to the client plugin to re-map and trap key events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 8 years, 8 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/key_event_mapper_unittest.cc ('k') | remoting/client/plugin/chromoting_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/chromoting_instance.h
diff --git a/remoting/client/plugin/chromoting_instance.h b/remoting/client/plugin/chromoting_instance.h
index 5e36fc8d026e4267d49d562fe5fca336290980ef..7a580399f27523b363b08362f9324c359bd5d561 100644
--- a/remoting/client/plugin/chromoting_instance.h
+++ b/remoting/client/plugin/chromoting_instance.h
@@ -27,6 +27,7 @@
#include "ppapi/cpp/private/instance_private.h"
#include "remoting/base/scoped_thread_proxy.h"
#include "remoting/client/client_context.h"
+#include "remoting/client/key_event_mapper.h"
#include "remoting/client/plugin/pepper_plugin_thread_delegate.h"
#include "remoting/proto/event.pb.h"
#include "remoting/protocol/clipboard_stub.h"
@@ -141,6 +142,8 @@ class ChromotingInstance :
void OnIncomingIq(const std::string& iq);
void ReleaseAllKeys();
void InjectKeyEvent(const protocol::KeyEvent& event);
+ void RemapKey(uint32 in_usb_keycode, uint32 out_usb_keycode);
+ void TrapKey(uint32 usb_keycode, bool trap);
void SendClipboardItem(const std::string& mime_type, const std::string& item);
// Return statistics record by ChromotingClient.
@@ -176,6 +179,9 @@ class ChromotingInstance :
void PostChromotingMessage(const std::string& method,
scoped_ptr<base::DictionaryValue> data);
+ // Posts trapped keys to the web-app to handle.
+ void SendTrappedKey(uint32 usb_keycode, bool pressed);
+
// Callback for PepperXmppProxy.
void SendOutgoingIq(const std::string& iq);
@@ -194,6 +200,7 @@ class ChromotingInstance :
scoped_refptr<RectangleUpdateDecoder> rectangle_decoder_;
scoped_ptr<MouseInputFilter> mouse_input_filter_;
scoped_ptr<protocol::InputEventTracker> input_tracker_;
+ KeyEventMapper key_mapper_;
scoped_ptr<PepperInputHandler> input_handler_;
scoped_ptr<ChromotingClient> client_;
« no previous file with comments | « remoting/client/key_event_mapper_unittest.cc ('k') | remoting/client/plugin/chromoting_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698