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

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

Issue 7068006: Revert 86575 - Revert 86573 - Add separate nonce version of connect calls to ChromotingScriptable... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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
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 // // Dimension of the desktop area. 10 // // Dimension of the desktop area.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // // User of this object should respond with calling submitLoginInfo() when 67 // // User of this object should respond with calling submitLoginInfo() when
68 // // username and password is available. 68 // // username and password is available.
69 // // 69 // //
70 // // This function will be called multiple times until login was successful 70 // // This function will be called multiple times until login was successful
71 // // or the maximum number of login attempts has been reached. In the 71 // // or the maximum number of login attempts has been reached. In the
72 // // later case |connection_status| is changed to STATUS_FAILED. 72 // // later case |connection_status| is changed to STATUS_FAILED.
73 // attribute Function loginChallenge; 73 // attribute Function loginChallenge;
74 // 74 //
75 // // Methods for establishing a Chromoting connection. 75 // // Methods for establishing a Chromoting connection.
76 // // 76 // //
77 // // Either use connect() or connectSandboxed(), not both. If using 77 // // When using the sandboxed versions, sendIq must be set and responses to
78 // // connectSandboxed(), sendIq must be set, and responses to calls on 78 // // calls on sendIq must be piped back into onIq().
79 // // sendIq must be piped back into onIq(). 79 // void connect(string host_jid, string client_jid,
80 // void connect(string username, string host_jid, string auth_token, 80 // optional string access_code);
81 // string nonce); 81 // // Non-sandboxed version used for debugging/testing.
82 // void connectSandboxed(string your_jid, string host_jid, string nonce); 82 // // TODO(garykac): Remove this version once we no longer need it.
83 // void connectUnsandboxed(string host_jid, string username,
84 // string xmpp_token, optional string access_code);
85 //
86 // // Terminating a Chromoting connection.
83 // void disconnect(); 87 // void disconnect();
84 // 88 //
85 // // Method for submitting login information. 89 // // Method for submitting login information.
86 // void submitLoginInfo(string username, string password); 90 // void submitLoginInfo(string username, string password);
87 // 91 //
88 // // Method for setting scale-to-fit. 92 // // Method for setting scale-to-fit.
89 // void setScaleToFit(bool scale_to_fit); 93 // void setScaleToFit(bool scale_to_fit);
90 // } 94 // }
91 95
92 #ifndef REMOTING_CLIENT_PLUGIN_CHROMOTING_SCRIPTABLE_OBJECT_H_ 96 #ifndef REMOTING_CLIENT_PLUGIN_CHROMOTING_SCRIPTABLE_OBJECT_H_
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 void AddMethod(const std::string& name, MethodHandler handler); 190 void AddMethod(const std::string& name, MethodHandler handler);
187 191
188 // This should be called to signal the JS code that the connection status has 192 // This should be called to signal the JS code that the connection status has
189 // changed. 193 // changed.
190 void SignalConnectionInfoChange(); 194 void SignalConnectionInfoChange();
191 195
192 // Signal the JS code that the desktop size has changed. 196 // Signal the JS code that the desktop size has changed.
193 void SignalDesktopSizeChange(); 197 void SignalDesktopSizeChange();
194 198
195 pp::Var DoConnect(const std::vector<pp::Var>& args, pp::Var* exception); 199 pp::Var DoConnect(const std::vector<pp::Var>& args, pp::Var* exception);
196 pp::Var DoConnectSandboxed(const std::vector<pp::Var>& args, 200 pp::Var DoConnectUnsandboxed(const std::vector<pp::Var>& args,
197 pp::Var* exception); 201 pp::Var* exception);
198 pp::Var DoDisconnect(const std::vector<pp::Var>& args, pp::Var* exception); 202 pp::Var DoDisconnect(const std::vector<pp::Var>& args, pp::Var* exception);
199 203
200 // This method is called by JS to provide login information. 204 // This method is called by JS to provide login information.
201 pp::Var DoSubmitLogin(const std::vector<pp::Var>& args, pp::Var* exception); 205 pp::Var DoSubmitLogin(const std::vector<pp::Var>& args, pp::Var* exception);
202 206
203 // This method is called by JS to set scale-to-fit. 207 // This method is called by JS to set scale-to-fit.
204 pp::Var DoSetScaleToFit(const std::vector<pp::Var>& args, pp::Var* exception); 208 pp::Var DoSetScaleToFit(const std::vector<pp::Var>& args, pp::Var* exception);
205 209
206 // This method is caleld by Javascript to provide responses to sendIq() 210 // This method is caleld by Javascript to provide responses to sendIq()
207 // requests when establishing a sandboxed Chromoting connection. 211 // requests when establishing a sandboxed Chromoting connection.
208 pp::Var DoOnIq(const std::vector<pp::Var>& args, pp::Var* exception); 212 pp::Var DoOnIq(const std::vector<pp::Var>& args, pp::Var* exception);
209 213
210 PropertyNameMap property_names_; 214 PropertyNameMap property_names_;
211 std::vector<PropertyDescriptor> properties_; 215 std::vector<PropertyDescriptor> properties_;
212 scoped_refptr<PepperXmppProxy> xmpp_proxy_; 216 scoped_refptr<PepperXmppProxy> xmpp_proxy_;
213 217
214 ChromotingInstance* instance_; 218 ChromotingInstance* instance_;
215 }; 219 };
216 220
217 } // namespace remoting 221 } // namespace remoting
218 222
219 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_SCRIPTABLE_OBJECT_H_ 223 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_SCRIPTABLE_OBJECT_H_
OLDNEW
« no previous file with comments | « remoting/client/appengine/static_files/chromoting_session.js ('k') | remoting/client/plugin/chromoting_scriptable_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698