| OLD | NEW |
| 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 #ifndef REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ | 5 #ifndef REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ |
| 6 #define REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ | 6 #define REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 string16* result); | 205 string16* result); |
| 206 | 206 |
| 207 // If the web-app has registered a callback to be notified of changes to the | 207 // If the web-app has registered a callback to be notified of changes to the |
| 208 // NAT traversal policy, notify it. | 208 // NAT traversal policy, notify it. |
| 209 void UpdateWebappNatPolicy(bool nat_traversal_enabled); | 209 void UpdateWebappNatPolicy(bool nat_traversal_enabled); |
| 210 | 210 |
| 211 ////////////////////////////////////////////////////////// | 211 ////////////////////////////////////////////////////////// |
| 212 // Helper methods for Me2Me host. | 212 // Helper methods for Me2Me host. |
| 213 | 213 |
| 214 // Helpers for GenerateKeyPair(). | 214 // Helpers for GenerateKeyPair(). |
| 215 void DoGenerateKeyPair(NPObject* callback); | 215 void DoGenerateKeyPair(const ScopedRefNPObject& callback); |
| 216 void InvokeGenerateKeyPairCallback(NPObject* callback, | 216 void InvokeGenerateKeyPairCallback(const ScopedRefNPObject& callback, |
| 217 const std::string& private_key, | 217 const std::string& private_key, |
| 218 const std::string& public_key); | 218 const std::string& public_key); |
| 219 | 219 |
| 220 | 220 |
| 221 // Callback handler for SetConfigAndStart(), Stop() and SetPin() in | 221 // Callback handler for SetConfigAndStart(), Stop() and SetPin() in |
| 222 // DaemonController. | 222 // DaemonController. |
| 223 void InvokeAsyncResultCallback(NPObject* callback, | 223 void InvokeAsyncResultCallback(const ScopedRefNPObject& callback, |
| 224 DaemonController::AsyncResult result); | 224 DaemonController::AsyncResult result); |
| 225 | 225 |
| 226 // Callback handler for DaemonController::GetConfig(). | 226 // Callback handler for DaemonController::GetConfig(). |
| 227 void InvokeGetDaemonConfigCallback(NPObject* callback, | 227 void InvokeGetDaemonConfigCallback(const ScopedRefNPObject& callback, |
| 228 scoped_ptr<base::DictionaryValue> config); | 228 scoped_ptr<base::DictionaryValue> config); |
| 229 | 229 |
| 230 ////////////////////////////////////////////////////////// | 230 ////////////////////////////////////////////////////////// |
| 231 // Basic helper methods used for both It2Me and Me2me. | 231 // Basic helper methods used for both It2Me and Me2me. |
| 232 | 232 |
| 233 // Call LogDebugInfo handler if there is one. | 233 // Call LogDebugInfo handler if there is one. |
| 234 // This must be called on the correct thread. | 234 // This must be called on the correct thread. |
| 235 void LogDebugInfo(const std::string& message); | 235 void LogDebugInfo(const std::string& message); |
| 236 | 236 |
| 237 // Helper function for executing InvokeDefault on an NPObject, and ignoring | 237 // Helper function for executing InvokeDefault on an NPObject, and ignoring |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 // SequencedWorkerPool. Problem is that SequencedWorkerPool relies | 308 // SequencedWorkerPool. Problem is that SequencedWorkerPool relies |
| 309 // on MessageLoopProxy::current(). | 309 // on MessageLoopProxy::current(). |
| 310 base::Thread worker_thread_; | 310 base::Thread worker_thread_; |
| 311 | 311 |
| 312 DISALLOW_COPY_AND_ASSIGN(HostNPScriptObject); | 312 DISALLOW_COPY_AND_ASSIGN(HostNPScriptObject); |
| 313 }; | 313 }; |
| 314 | 314 |
| 315 } // namespace remoting | 315 } // namespace remoting |
| 316 | 316 |
| 317 #endif // REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ | 317 #endif // REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ |
| OLD | NEW |