Chromium Code Reviews| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 116 const base::TimeDelta& lifetime); | 116 const base::TimeDelta& lifetime); |
| 117 | 117 |
| 118 // Shuts down |host_| on the network thread and posts ShutdownOnUiThread() | 118 // Shuts down |host_| on the network thread and posts ShutdownOnUiThread() |
| 119 // to shut down UI thread resources. | 119 // to shut down UI thread resources. |
| 120 void ShutdownOnNetworkThread(); | 120 void ShutdownOnNetworkThread(); |
| 121 | 121 |
| 122 // Shuts down |desktop_environment_factory_| and |policy_watcher_| on | 122 // Shuts down |desktop_environment_factory_| and |policy_watcher_| on |
| 123 // the UI thread. | 123 // the UI thread. |
| 124 void ShutdownOnUiThread(); | 124 void ShutdownOnUiThread(); |
| 125 | 125 |
| 126 // Called when |policy_watcher_| has stopped listening for changes and it is | |
| 127 // safe to delete the |policy_watcher_| object. | |
|
Wez
2014/10/17 17:58:01
nit: ... safe to delete it.
kelvinp
2014/10/20 00:21:17
Done.
| |
| 128 void OnPolicyWatcherShutdown(); | |
| 129 | |
| 126 // Called when initial policies are read, and when they change. | 130 // Called when initial policies are read, and when they change. |
| 127 void OnPolicyUpdate(scoped_ptr<base::DictionaryValue> policies); | 131 void OnPolicyUpdate(scoped_ptr<base::DictionaryValue> policies); |
| 128 | 132 |
| 129 // Handlers for NAT traversal and host domain policies. | 133 // Handlers for NAT traversal and host domain policies. |
| 130 void UpdateNatPolicy(bool nat_traversal_enabled); | 134 void UpdateNatPolicy(bool nat_traversal_enabled); |
| 131 void UpdateHostDomainPolicy(const std::string& host_domain); | 135 void UpdateHostDomainPolicy(const std::string& host_domain); |
| 132 | 136 |
| 133 // Caller supplied fields. | 137 // Caller supplied fields. |
| 134 | 138 |
| 135 // The creator of the It2MeHost object owns the the host context and is | 139 // The creator of the It2MeHost object owns the the host context and is |
| 136 // responsible for keeping it alive throughout the liftime of the host. | 140 // responsible for keeping it alive throughout the liftime of the host. |
| 137 ChromotingHostContext* host_context_; | 141 ChromotingHostContext* host_context_; |
|
Wez
2014/10/17 17:58:01
That doesn't make sense; the It2Me object is ref-c
kelvinp
2014/10/20 00:21:17
We can but this would mean that it2meHost would ne
| |
| 142 | |
| 138 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 143 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
|
Wez
2014/10/17 17:58:01
Add a comment, or better still rename this to ui_t
kelvinp
2014/10/20 00:21:17
I have removed network_task_runner.
| |
| 144 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; | |
|
Wez
2014/10/17 17:58:01
Why have you pulled this out of the host context?
kelvinp
2014/10/20 00:21:18
Because It2MeHost outlives the host context and we
| |
| 145 | |
| 139 base::WeakPtr<It2MeHost::Observer> observer_; | 146 base::WeakPtr<It2MeHost::Observer> observer_; |
| 140 XmppSignalStrategy::XmppServerConfig xmpp_server_config_; | 147 XmppSignalStrategy::XmppServerConfig xmpp_server_config_; |
| 141 std::string directory_bot_jid_; | 148 std::string directory_bot_jid_; |
| 142 | 149 |
| 143 It2MeHostState state_; | 150 It2MeHostState state_; |
| 144 | 151 |
| 145 scoped_refptr<RsaKeyPair> host_key_pair_; | 152 scoped_refptr<RsaKeyPair> host_key_pair_; |
| 146 scoped_ptr<SignalStrategy> signal_strategy_; | 153 scoped_ptr<SignalStrategy> signal_strategy_; |
| 147 scoped_ptr<RegisterSupportHostRequest> register_request_; | 154 scoped_ptr<RegisterSupportHostRequest> register_request_; |
| 148 scoped_ptr<HostStatusLogger> host_status_logger_; | 155 scoped_ptr<HostStatusLogger> host_status_logger_; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 188 const XmppSignalStrategy::XmppServerConfig& xmpp_server_config, | 195 const XmppSignalStrategy::XmppServerConfig& xmpp_server_config, |
| 189 const std::string& directory_bot_jid); | 196 const std::string& directory_bot_jid); |
| 190 | 197 |
| 191 private: | 198 private: |
| 192 DISALLOW_COPY_AND_ASSIGN(It2MeHostFactory); | 199 DISALLOW_COPY_AND_ASSIGN(It2MeHostFactory); |
| 193 }; | 200 }; |
| 194 | 201 |
| 195 } // namespace remoting | 202 } // namespace remoting |
| 196 | 203 |
| 197 #endif // REMOTING_HOST_IT2ME_IT2ME_HOST_H_ | 204 #endif // REMOTING_HOST_IT2ME_IT2ME_HOST_H_ |
| OLD | NEW |