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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
248 // Callback handler for DaemonController::GetVersion(). | 248 // Callback handler for DaemonController::GetVersion(). |
249 void InvokeGetDaemonVersionCallback(const ScopedRefNPObject& callback, | 249 void InvokeGetDaemonVersionCallback(const ScopedRefNPObject& callback, |
250 const std::string& version); | 250 const std::string& version); |
251 | 251 |
252 // Callback handler for GetPairedClients(). | 252 // Callback handler for GetPairedClients(). |
253 void InvokeGetPairedClientsCallback( | 253 void InvokeGetPairedClientsCallback( |
254 const ScopedRefNPObject& callback, | 254 const ScopedRefNPObject& callback, |
255 scoped_ptr<base::ListValue> paired_clients); | 255 scoped_ptr<base::ListValue> paired_clients); |
256 | 256 |
257 // Callback handler for DaemonController::GetUsageStatsConsent(). | 257 // Callback handler for DaemonController::GetUsageStatsConsent(). |
258 void InvokeGetUsageStatsConsentCallback(const ScopedRefNPObject& callback, | 258 void InvokeGetUsageStatsConsentCallback( |
259 bool supported, | 259 const ScopedRefNPObject& callback, |
Wez
2013/09/10 09:05:37
nit: This, and any other methods that get bound to
alexeypa (please no reviews)
2013/09/10 16:59:22
Done.
| |
260 bool allowed, | 260 const DaemonController::UsageStatsConsent& consent); |
261 bool set_by_policy); | |
262 | 261 |
263 ////////////////////////////////////////////////////////// | 262 ////////////////////////////////////////////////////////// |
264 // Basic helper methods used for both It2Me and Me2me. | 263 // Basic helper methods used for both It2Me and Me2me. |
265 | 264 |
266 // Call LogDebugInfo handler if there is one. | 265 // Call LogDebugInfo handler if there is one. |
267 // This must be called on the correct thread. | 266 // This must be called on the correct thread. |
268 void LogDebugInfo(const std::string& message); | 267 void LogDebugInfo(const std::string& message); |
269 | 268 |
270 // Helper function for executing InvokeDefault on an NPObject, and ignoring | 269 // Helper function for executing InvokeDefault on an NPObject, and ignoring |
271 // the return value. | 270 // the return value. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
308 std::string directory_bot_jid_; | 307 std::string directory_bot_jid_; |
309 | 308 |
310 // Callbacks to notify in response to |it2me_impl_| events. | 309 // Callbacks to notify in response to |it2me_impl_| events. |
311 ScopedRefNPObject on_nat_traversal_policy_changed_func_; | 310 ScopedRefNPObject on_nat_traversal_policy_changed_func_; |
312 ScopedRefNPObject on_state_changed_func_; | 311 ScopedRefNPObject on_state_changed_func_; |
313 | 312 |
314 ////////////////////////////////////////////////////////// | 313 ////////////////////////////////////////////////////////// |
315 // Me2Me host state. | 314 // Me2Me host state. |
316 | 315 |
317 // Platform-specific installation & configuration implementation. | 316 // Platform-specific installation & configuration implementation. |
318 scoped_ptr<DaemonController> daemon_controller_; | 317 scoped_refptr<DaemonController> daemon_controller_; |
319 | 318 |
320 // TODO(sergeyu): Replace this thread with | 319 // TODO(sergeyu): Replace this thread with |
321 // SequencedWorkerPool. Problem is that SequencedWorkerPool relies | 320 // SequencedWorkerPool. Problem is that SequencedWorkerPool relies |
322 // on MessageLoopProxy::current(). | 321 // on MessageLoopProxy::current(). |
323 scoped_refptr<AutoThreadTaskRunner> worker_thread_; | 322 scoped_refptr<AutoThreadTaskRunner> worker_thread_; |
324 | 323 |
325 // Used to load and update the paired clients for this host. | 324 // Used to load and update the paired clients for this host. |
326 scoped_refptr<protocol::PairingRegistry> pairing_registry_; | 325 scoped_refptr<protocol::PairingRegistry> pairing_registry_; |
327 | 326 |
328 ////////////////////////////////////////////////////////// | 327 ////////////////////////////////////////////////////////// |
329 // Plugin state used for both Ir2Me and Me2Me. | 328 // Plugin state used for both Ir2Me and Me2Me. |
330 | 329 |
331 // Used to cancel pending tasks for this object when it is destroyed. | 330 // Used to cancel pending tasks for this object when it is destroyed. |
332 base::WeakPtrFactory<HostNPScriptObject> weak_factory_; | 331 base::WeakPtrFactory<HostNPScriptObject> weak_factory_; |
333 base::WeakPtr<HostNPScriptObject> weak_ptr_; | 332 base::WeakPtr<HostNPScriptObject> weak_ptr_; |
334 | 333 |
335 DISALLOW_COPY_AND_ASSIGN(HostNPScriptObject); | 334 DISALLOW_COPY_AND_ASSIGN(HostNPScriptObject); |
336 }; | 335 }; |
337 | 336 |
338 } // namespace remoting | 337 } // namespace remoting |
339 | 338 |
340 #endif // REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ | 339 #endif // REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ |
OLD | NEW |