| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_IT2ME_IT2ME_HOST_H_ | 5 #ifndef REMOTING_HOST_IT2ME_IT2ME_HOST_H_ |
| 6 #define REMOTING_HOST_IT2ME_IT2ME_HOST_H_ | 6 #define REMOTING_HOST_IT2ME_IT2ME_HOST_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 const base::TimeDelta& lifetime); | 128 const base::TimeDelta& lifetime); |
| 129 | 129 |
| 130 // Shuts down |host_| on the network thread and posts ShutdownOnUiThread() | 130 // Shuts down |host_| on the network thread and posts ShutdownOnUiThread() |
| 131 // to shut down UI thread resources. | 131 // to shut down UI thread resources. |
| 132 void ShutdownOnNetworkThread(); | 132 void ShutdownOnNetworkThread(); |
| 133 | 133 |
| 134 // Shuts down |desktop_environment_factory_| and |policy_watcher_| on | 134 // Shuts down |desktop_environment_factory_| and |policy_watcher_| on |
| 135 // the UI thread. | 135 // the UI thread. |
| 136 void ShutdownOnUiThread(); | 136 void ShutdownOnUiThread(); |
| 137 | 137 |
| 138 // Called when |policy_watcher_| has stopped listening for changes and it is | |
| 139 // safe to delete it. | |
| 140 void OnPolicyWatcherShutdown(); | |
| 141 | |
| 142 // Called when initial policies are read, and when they change. | 138 // Called when initial policies are read, and when they change. |
| 143 void OnPolicyUpdate(scoped_ptr<base::DictionaryValue> policies); | 139 void OnPolicyUpdate(scoped_ptr<base::DictionaryValue> policies); |
| 144 | 140 |
| 145 // Called when malformed policies are detected. | 141 // Called when malformed policies are detected. |
| 146 void OnPolicyError(); | 142 void OnPolicyError(); |
| 147 | 143 |
| 148 // Handlers for NAT traversal and host domain policies. | 144 // Handlers for NAT traversal and host domain policies. |
| 149 void UpdateNatPolicy(bool nat_traversal_enabled); | 145 void UpdateNatPolicy(bool nat_traversal_enabled); |
| 150 void UpdateHostDomainPolicy(const std::string& host_domain); | 146 void UpdateHostDomainPolicy(const std::string& host_domain); |
| 151 | 147 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 const std::string& directory_bot_jid); | 209 const std::string& directory_bot_jid); |
| 214 | 210 |
| 215 private: | 211 private: |
| 216 policy::PolicyService* policy_service_; | 212 policy::PolicyService* policy_service_; |
| 217 DISALLOW_COPY_AND_ASSIGN(It2MeHostFactory); | 213 DISALLOW_COPY_AND_ASSIGN(It2MeHostFactory); |
| 218 }; | 214 }; |
| 219 | 215 |
| 220 } // namespace remoting | 216 } // namespace remoting |
| 221 | 217 |
| 222 #endif // REMOTING_HOST_IT2ME_IT2ME_HOST_H_ | 218 #endif // REMOTING_HOST_IT2ME_IT2ME_HOST_H_ |
| OLD | NEW |