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

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

Issue 7069005: Revert 86573 - Add separate nonce version of connect calls to ChromotingScriptableObject. (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 // // When using the sandboxed versions, sendIq must be set and responses to 77 // // Either use connect() or connectSandboxed(), not both. If using
78 // // calls on sendIq must be piped back into onIq(). 78 // // connectSandboxed(), sendIq must be set, and responses to calls on
79 // void connect(string host_jid, string client_jid, 79 // // sendIq must be piped back into onIq().
80 // optional string access_code); 80 // void connect(string username, string host_jid, string auth_token,
81 // // Non-sandboxed version used for debugging/testing. 81 // string nonce);
82 // // TODO(garykac): Remove this version once we no longer need it. 82 // void connectSandboxed(string your_jid, string host_jid, string nonce);
83 // void connectUnsandboxed(string host_jid, string username,
84 // string xmpp_token, optional string access_code);
85 //
86 // // Terminating a Chromoting connection.
87 // void disconnect(); 83 // void disconnect();
88 // 84 //
89 // // Method for submitting login information. 85 // // Method for submitting login information.
90 // void submitLoginInfo(string username, string password); 86 // void submitLoginInfo(string username, string password);
91 // 87 //
92 // // Method for setting scale-to-fit. 88 // // Method for setting scale-to-fit.
93 // void setScaleToFit(bool scale_to_fit); 89 // void setScaleToFit(bool scale_to_fit);
94 // } 90 // }
95 91
96 #ifndef REMOTING_CLIENT_PLUGIN_CHROMOTING_SCRIPTABLE_OBJECT_H_ 92 #ifndef REMOTING_CLIENT_PLUGIN_CHROMOTING_SCRIPTABLE_OBJECT_H_
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 void AddMethod(const std::string& name, MethodHandler handler); 186 void AddMethod(const std::string& name, MethodHandler handler);
191 187
192 // This should be called to signal the JS code that the connection status has 188 // This should be called to signal the JS code that the connection status has
193 // changed. 189 // changed.
194 void SignalConnectionInfoChange(); 190 void SignalConnectionInfoChange();
195 191
196 // Signal the JS code that the desktop size has changed. 192 // Signal the JS code that the desktop size has changed.
197 void SignalDesktopSizeChange(); 193 void SignalDesktopSizeChange();
198 194
199 pp::Var DoConnect(const std::vector<pp::Var>& args, pp::Var* exception); 195 pp::Var DoConnect(const std::vector<pp::Var>& args, pp::Var* exception);
200 pp::Var DoConnectUnsandboxed(const std::vector<pp::Var>& args, 196 pp::Var DoConnectSandboxed(const std::vector<pp::Var>& args,
201 pp::Var* exception); 197 pp::Var* exception);
202 pp::Var DoDisconnect(const std::vector<pp::Var>& args, pp::Var* exception); 198 pp::Var DoDisconnect(const std::vector<pp::Var>& args, pp::Var* exception);
203 199
204 // This method is called by JS to provide login information. 200 // This method is called by JS to provide login information.
205 pp::Var DoSubmitLogin(const std::vector<pp::Var>& args, pp::Var* exception); 201 pp::Var DoSubmitLogin(const std::vector<pp::Var>& args, pp::Var* exception);
206 202
207 // This method is called by JS to set scale-to-fit. 203 // This method is called by JS to set scale-to-fit.
208 pp::Var DoSetScaleToFit(const std::vector<pp::Var>& args, pp::Var* exception); 204 pp::Var DoSetScaleToFit(const std::vector<pp::Var>& args, pp::Var* exception);
209 205
210 // This method is caleld by Javascript to provide responses to sendIq() 206 // This method is caleld by Javascript to provide responses to sendIq()
211 // requests when establishing a sandboxed Chromoting connection. 207 // requests when establishing a sandboxed Chromoting connection.
212 pp::Var DoOnIq(const std::vector<pp::Var>& args, pp::Var* exception); 208 pp::Var DoOnIq(const std::vector<pp::Var>& args, pp::Var* exception);
213 209
214 PropertyNameMap property_names_; 210 PropertyNameMap property_names_;
215 std::vector<PropertyDescriptor> properties_; 211 std::vector<PropertyDescriptor> properties_;
216 scoped_refptr<PepperXmppProxy> xmpp_proxy_; 212 scoped_refptr<PepperXmppProxy> xmpp_proxy_;
217 213
218 ChromotingInstance* instance_; 214 ChromotingInstance* instance_;
219 }; 215 };
220 216
221 } // namespace remoting 217 } // namespace remoting
222 218
223 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_SCRIPTABLE_OBJECT_H_ 219 #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