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 so that it | |
Jamie
2014/10/14 01:18:42
s/so that/and/
kelvinp
2014/10/15 23:03:10
Done.
| |
127 // safe to delete the |policy_watcher_| object. | |
Jamie
2014/10/14 01:18:42
s/safe/is safe/
kelvinp
2014/10/15 23:03:10
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_; |
138 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 142 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
143 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; | |
Jamie
2014/10/14 01:18:42
It's not clear to me why this new member is needed
kelvinp
2014/10/15 23:03:10
The ChromotingHostContext is owned by the It2meNat
| |
139 base::WeakPtr<It2MeHost::Observer> observer_; | 144 base::WeakPtr<It2MeHost::Observer> observer_; |
140 XmppSignalStrategy::XmppServerConfig xmpp_server_config_; | 145 XmppSignalStrategy::XmppServerConfig xmpp_server_config_; |
141 std::string directory_bot_jid_; | 146 std::string directory_bot_jid_; |
142 | 147 |
143 It2MeHostState state_; | 148 It2MeHostState state_; |
144 | 149 |
145 scoped_refptr<RsaKeyPair> host_key_pair_; | 150 scoped_refptr<RsaKeyPair> host_key_pair_; |
146 scoped_ptr<SignalStrategy> signal_strategy_; | 151 scoped_ptr<SignalStrategy> signal_strategy_; |
147 scoped_ptr<RegisterSupportHostRequest> register_request_; | 152 scoped_ptr<RegisterSupportHostRequest> register_request_; |
148 scoped_ptr<HostStatusLogger> host_status_logger_; | 153 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, | 193 const XmppSignalStrategy::XmppServerConfig& xmpp_server_config, |
189 const std::string& directory_bot_jid); | 194 const std::string& directory_bot_jid); |
190 | 195 |
191 private: | 196 private: |
192 DISALLOW_COPY_AND_ASSIGN(It2MeHostFactory); | 197 DISALLOW_COPY_AND_ASSIGN(It2MeHostFactory); |
193 }; | 198 }; |
194 | 199 |
195 } // namespace remoting | 200 } // namespace remoting |
196 | 201 |
197 #endif // REMOTING_HOST_IT2ME_IT2ME_HOST_H_ | 202 #endif // REMOTING_HOST_IT2ME_IT2ME_HOST_H_ |
OLD | NEW |