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

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

Issue 7730002: Call SendIq() from plugin asynchronously. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update comments Created 9 years, 4 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_scriptable_object.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // This implements the JavaScript class entrypoint for the plugin instance. 5 // This implements the JavaScript class entrypoint for the plugin instance.
6 // The Javascript API is defined as follows. 6 // The Javascript API is defined as follows.
7 // 7 //
8 // interface ChromotingScriptableObject { 8 // interface ChromotingScriptableObject {
9 // 9 //
10 // // Chromoting session API version (for this plugin). 10 // // Chromoting session API version (for this plugin).
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 MethodHandler method; 207 MethodHandler method;
208 }; 208 };
209 209
210 // Routines to add new attribute, method properties. 210 // Routines to add new attribute, method properties.
211 void AddAttribute(const std::string& name, pp::Var attribute); 211 void AddAttribute(const std::string& name, pp::Var attribute);
212 void AddMethod(const std::string& name, MethodHandler handler); 212 void AddMethod(const std::string& name, MethodHandler handler);
213 213
214 void SignalConnectionInfoChange(); 214 void SignalConnectionInfoChange();
215 void SignalDesktopSizeChange(); 215 void SignalDesktopSizeChange();
216 216
217 // Calls to these methods are posted to the plugin thread from 217 // Calls to these methods are posted to the plugin thread so that we
218 // corresponding Signal*() methods. They actually call JavaScript 218 // call JavaScript with clean stack. This is necessary because
219 // code. This is necessary becase JavaScript needs to be called with 219 // JavaScript event handlers may destroy the plugin.
220 // clean stack - JavaScript event handlers may destroy the plugin.
221 void DoSignalConnectionInfoChange(); 220 void DoSignalConnectionInfoChange();
222 void DoSignalDesktopSizeChange(); 221 void DoSignalDesktopSizeChange();
223 void DoSignalLoginChallenge(); 222 void DoSignalLoginChallenge();
223 void DoSendIq(const std::string& message_xml);
224 224
225 pp::Var DoConnect(const std::vector<pp::Var>& args, pp::Var* exception); 225 pp::Var DoConnect(const std::vector<pp::Var>& args, pp::Var* exception);
226 pp::Var DoDisconnect(const std::vector<pp::Var>& args, pp::Var* exception); 226 pp::Var DoDisconnect(const std::vector<pp::Var>& args, pp::Var* exception);
227 227
228 // This method is called by JS to provide login information. 228 // This method is called by JS to provide login information.
229 pp::Var DoSubmitLogin(const std::vector<pp::Var>& args, pp::Var* exception); 229 pp::Var DoSubmitLogin(const std::vector<pp::Var>& args, pp::Var* exception);
230 230
231 // This method is called by JS to set scale-to-fit. 231 // This method is called by JS to set scale-to-fit.
232 pp::Var DoSetScaleToFit(const std::vector<pp::Var>& args, pp::Var* exception); 232 pp::Var DoSetScaleToFit(const std::vector<pp::Var>& args, pp::Var* exception);
233 233
(...skipping 14 matching lines...) Expand all
248 248
249 scoped_refptr<base::MessageLoopProxy> plugin_message_loop_; 249 scoped_refptr<base::MessageLoopProxy> plugin_message_loop_;
250 ScopedRunnableMethodFactory<ChromotingScriptableObject> task_factory_; 250 ScopedRunnableMethodFactory<ChromotingScriptableObject> task_factory_;
251 251
252 DISALLOW_COPY_AND_ASSIGN(ChromotingScriptableObject); 252 DISALLOW_COPY_AND_ASSIGN(ChromotingScriptableObject);
253 }; 253 };
254 254
255 } // namespace remoting 255 } // namespace remoting
256 256
257 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_SCRIPTABLE_OBJECT_H_ 257 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_SCRIPTABLE_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/client/plugin/chromoting_scriptable_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698