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

Side by Side Diff: remoting/client/plugin/chromoting_instance.h

Issue 9968030: Add an injectKeyEvent API to the Chromoting client plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/client/plugin/chromoting_instance.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // TODO(ajwong): We need to come up with a better description of the 5 // TODO(ajwong): We need to come up with a better description of the
6 // responsibilities for each thread. 6 // responsibilities for each thread.
7 7
8 #ifndef REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ 8 #ifndef REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_
9 #define REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ 9 #define REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_
10 10
(...skipping 10 matching lines...) Expand all
21 // Windows defines 'PostMessage', so we have to undef it before we 21 // Windows defines 'PostMessage', so we have to undef it before we
22 // include instance_private.h 22 // include instance_private.h
23 #if defined(PostMessage) 23 #if defined(PostMessage)
24 #undef PostMessage 24 #undef PostMessage
25 #endif 25 #endif
26 26
27 #include "ppapi/cpp/private/instance_private.h" 27 #include "ppapi/cpp/private/instance_private.h"
28 #include "remoting/base/scoped_thread_proxy.h" 28 #include "remoting/base/scoped_thread_proxy.h"
29 #include "remoting/client/client_context.h" 29 #include "remoting/client/client_context.h"
30 #include "remoting/client/plugin/pepper_plugin_thread_delegate.h" 30 #include "remoting/client/plugin/pepper_plugin_thread_delegate.h"
31 #include "remoting/proto/event.pb.h"
31 #include "remoting/protocol/connection_to_host.h" 32 #include "remoting/protocol/connection_to_host.h"
32 33
33 namespace base { 34 namespace base {
34 class DictionaryValue; 35 class DictionaryValue;
35 } // namespace base 36 } // namespace base
36 37
37 namespace pp { 38 namespace pp {
38 class InputEvent; 39 class InputEvent;
39 class Module; 40 class Module;
40 } // namespace pp 41 } // namespace pp
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 123
123 // Convenience wrapper to get the ChromotingScriptableObject. 124 // Convenience wrapper to get the ChromotingScriptableObject.
124 ChromotingScriptableObject* GetScriptableObject(); 125 ChromotingScriptableObject* GetScriptableObject();
125 126
126 // Message handlers for messages that come from JavaScript. Called 127 // Message handlers for messages that come from JavaScript. Called
127 // from HandleMessage() and ChromotingScriptableObject. 128 // from HandleMessage() and ChromotingScriptableObject.
128 void Connect(const ClientConfig& config); 129 void Connect(const ClientConfig& config);
129 void Disconnect(); 130 void Disconnect();
130 void OnIncomingIq(const std::string& iq); 131 void OnIncomingIq(const std::string& iq);
131 void ReleaseAllKeys(); 132 void ReleaseAllKeys();
133 void InjectKeyEvent(const protocol::KeyEvent& event);
132 void SendClipboardItem(const std::string& mime_type, const std::string& item); 134 void SendClipboardItem(const std::string& mime_type, const std::string& item);
133 135
134 // Return statistics record by ChromotingClient. 136 // Return statistics record by ChromotingClient.
135 // If no connection is currently active then NULL will be returned. 137 // If no connection is currently active then NULL will be returned.
136 ChromotingStats* GetStats(); 138 ChromotingStats* GetStats();
137 139
138 // Registers a global log message handler that redirects the log output to 140 // Registers a global log message handler that redirects the log output to
139 // our plugin instance. 141 // our plugin instance.
140 // This is called by the plugin's PPP_InitializeModule. 142 // This is called by the plugin's PPP_InitializeModule.
141 // Note that no logging will be processed unless a ChromotingInstance has been 143 // Note that no logging will be processed unless a ChromotingInstance has been
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 pp::Var instance_object_; 198 pp::Var instance_object_;
197 199
198 scoped_ptr<ScopedThreadProxy> thread_proxy_; 200 scoped_ptr<ScopedThreadProxy> thread_proxy_;
199 201
200 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); 202 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance);
201 }; 203 };
202 204
203 } // namespace remoting 205 } // namespace remoting
204 206
205 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ 207 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/client/plugin/chromoting_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698