| OLD | NEW |
| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 // Calls to these methods are posted to the plugin thread so that we | 208 // Calls to these methods are posted to the plugin thread so that we |
| 209 // call JavaScript with clean stack. This is necessary because | 209 // call JavaScript with clean stack. This is necessary because |
| 210 // JavaScript event handlers may destroy the plugin. | 210 // JavaScript event handlers may destroy the plugin. |
| 211 void DoSignalConnectionInfoChange(int status, int error); | 211 void DoSignalConnectionInfoChange(int status, int error); |
| 212 void DoSignalDesktopSizeChange(); | 212 void DoSignalDesktopSizeChange(); |
| 213 void DoSendIq(const std::string& message_xml); | 213 void DoSendIq(const std::string& message_xml); |
| 214 | 214 |
| 215 pp::Var DoConnect(const std::vector<pp::Var>& args, pp::Var* exception); | 215 pp::Var DoConnect(const std::vector<pp::Var>& args, pp::Var* exception); |
| 216 pp::Var DoDisconnect(const std::vector<pp::Var>& args, pp::Var* exception); | 216 pp::Var DoDisconnect(const std::vector<pp::Var>& args, pp::Var* exception); |
| 217 | 217 |
| 218 // This method is called by JS to set scale-to-fit. | 218 // This method is used for legacy script APIs such as setScaleToFit. |
| 219 pp::Var DoSetScaleToFit(const std::vector<pp::Var>& args, pp::Var* exception); | 219 pp::Var DoNothing(const std::vector<pp::Var>& args, pp::Var* exception); |
| 220 | 220 |
| 221 // This method is called by Javascript to provide responses to sendIq() | 221 // This method is called by Javascript to provide responses to sendIq() |
| 222 // requests. | 222 // requests. |
| 223 pp::Var DoOnIq(const std::vector<pp::Var>& args, pp::Var* exception); | 223 pp::Var DoOnIq(const std::vector<pp::Var>& args, pp::Var* exception); |
| 224 | 224 |
| 225 // This method is called by Javascript when the plugin loses input focus to | 225 // This method is called by Javascript when the plugin loses input focus to |
| 226 // release all pressed keys. | 226 // release all pressed keys. |
| 227 pp::Var DoReleaseAllKeys(const std::vector<pp::Var>& args, | 227 pp::Var DoReleaseAllKeys(const std::vector<pp::Var>& args, |
| 228 pp::Var* exception); | 228 pp::Var* exception); |
| 229 | 229 |
| 230 PropertyNameMap property_names_; | 230 PropertyNameMap property_names_; |
| 231 std::vector<PropertyDescriptor> properties_; | 231 std::vector<PropertyDescriptor> properties_; |
| 232 scoped_refptr<PepperXmppProxy> xmpp_proxy_; | 232 scoped_refptr<PepperXmppProxy> xmpp_proxy_; |
| 233 | 233 |
| 234 ChromotingInstance* instance_; | 234 ChromotingInstance* instance_; |
| 235 | 235 |
| 236 scoped_refptr<base::MessageLoopProxy> plugin_message_loop_; | 236 scoped_refptr<base::MessageLoopProxy> plugin_message_loop_; |
| 237 | 237 |
| 238 DISALLOW_COPY_AND_ASSIGN(ChromotingScriptableObject); | 238 DISALLOW_COPY_AND_ASSIGN(ChromotingScriptableObject); |
| 239 }; | 239 }; |
| 240 | 240 |
| 241 } // namespace remoting | 241 } // namespace remoting |
| 242 | 242 |
| 243 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_SCRIPTABLE_OBJECT_H_ | 243 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_SCRIPTABLE_OBJECT_H_ |
| OLD | NEW |