Chromium Code Reviews| 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_CHROMOTING_HOST_H_ | 5 #ifndef REMOTING_HOST_CHROMOTING_HOST_H_ |
| 6 #define REMOTING_HOST_CHROMOTING_HOST_H_ | 6 #define REMOTING_HOST_CHROMOTING_HOST_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/memory/ref_counted.h" | |
|
Wez
2014/05/28 01:05:59
Did you mean to add this dependency?
dcaiafa
2014/05/28 22:44:58
It was already there. I just fixed the sort order
| |
| 11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/memory/ref_counted.h" | 13 #include "base/memory/scoped_vector.h" |
| 13 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 14 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
| 15 #include "base/threading/non_thread_safe.h" | 16 #include "base/threading/non_thread_safe.h" |
| 16 #include "base/threading/thread.h" | 17 #include "base/threading/thread.h" |
| 17 #include "net/base/backoff_entry.h" | 18 #include "net/base/backoff_entry.h" |
| 18 #include "remoting/host/client_session.h" | 19 #include "remoting/host/client_session.h" |
| 20 #include "remoting/host/extension.h" | |
| 19 #include "remoting/host/host_status_monitor.h" | 21 #include "remoting/host/host_status_monitor.h" |
| 20 #include "remoting/host/host_status_observer.h" | 22 #include "remoting/host/host_status_observer.h" |
| 21 #include "remoting/protocol/authenticator.h" | 23 #include "remoting/protocol/authenticator.h" |
| 22 #include "remoting/protocol/connection_to_client.h" | 24 #include "remoting/protocol/connection_to_client.h" |
| 23 #include "remoting/protocol/pairing_registry.h" | 25 #include "remoting/protocol/pairing_registry.h" |
| 24 #include "remoting/protocol/session_manager.h" | 26 #include "remoting/protocol/session_manager.h" |
| 25 | 27 |
| 26 namespace base { | 28 namespace base { |
| 27 class SingleThreadTaskRunner; | 29 class SingleThreadTaskRunner; |
| 28 } // namespace base | 30 } // namespace base |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 84 // After this is invoked, the host process will connect to the talk | 86 // After this is invoked, the host process will connect to the talk |
| 85 // network and start listening for incoming connections. | 87 // network and start listening for incoming connections. |
| 86 // | 88 // |
| 87 // This method can only be called once during the lifetime of this object. | 89 // This method can only be called once during the lifetime of this object. |
| 88 void Start(const std::string& host_owner); | 90 void Start(const std::string& host_owner); |
| 89 | 91 |
| 90 // HostStatusMonitor interface. | 92 // HostStatusMonitor interface. |
| 91 virtual void AddStatusObserver(HostStatusObserver* observer) OVERRIDE; | 93 virtual void AddStatusObserver(HostStatusObserver* observer) OVERRIDE; |
| 92 virtual void RemoveStatusObserver(HostStatusObserver* observer) OVERRIDE; | 94 virtual void RemoveStatusObserver(HostStatusObserver* observer) OVERRIDE; |
| 93 | 95 |
| 96 // Registers a host extension. | |
| 97 void AddExtension(scoped_ptr<Extension> extension); | |
| 98 | |
| 94 // This method may be called only from | 99 // This method may be called only from |
| 95 // HostStatusObserver::OnClientAuthenticated() to reject the new | 100 // HostStatusObserver::OnClientAuthenticated() to reject the new |
| 96 // client. | 101 // client. |
| 97 void RejectAuthenticatingClient(); | 102 void RejectAuthenticatingClient(); |
| 98 | 103 |
| 99 // Sets the authenticator factory to use for incoming | 104 // Sets the authenticator factory to use for incoming |
| 100 // connections. Incoming connections are rejected until | 105 // connections. Incoming connections are rejected until |
| 101 // authenticator factory is set. Must be called on the network | 106 // authenticator factory is set. Must be called on the network |
| 102 // thread after the host is started. Must not be called more than | 107 // thread after the host is started. Must not be called more than |
| 103 // once per host instance because it may not be safe to delete | 108 // once per host instance because it may not be safe to delete |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 197 | 202 |
| 198 // True if the curtain mode is enabled. | 203 // True if the curtain mode is enabled. |
| 199 bool enable_curtaining_; | 204 bool enable_curtaining_; |
| 200 | 205 |
| 201 // The maximum duration of any session. | 206 // The maximum duration of any session. |
| 202 base::TimeDelta max_session_duration_; | 207 base::TimeDelta max_session_duration_; |
| 203 | 208 |
| 204 // The pairing registry for PIN-less authentication. | 209 // The pairing registry for PIN-less authentication. |
| 205 scoped_refptr<protocol::PairingRegistry> pairing_registry_; | 210 scoped_refptr<protocol::PairingRegistry> pairing_registry_; |
| 206 | 211 |
| 212 // List of host extensions. | |
| 213 ScopedVector<Extension> extensions_; | |
| 214 | |
| 207 base::WeakPtrFactory<ChromotingHost> weak_factory_; | 215 base::WeakPtrFactory<ChromotingHost> weak_factory_; |
| 208 | 216 |
| 209 DISALLOW_COPY_AND_ASSIGN(ChromotingHost); | 217 DISALLOW_COPY_AND_ASSIGN(ChromotingHost); |
| 210 }; | 218 }; |
| 211 | 219 |
| 212 } // namespace remoting | 220 } // namespace remoting |
| 213 | 221 |
| 214 #endif // REMOTING_HOST_CHROMOTING_HOST_H_ | 222 #endif // REMOTING_HOST_CHROMOTING_HOST_H_ |
| OLD | NEW |