diff options
author | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-13 11:10:29 +0000 |
---|---|---|
committer | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-13 11:10:29 +0000 |
commit | f19f09cae865c8ed71c196f0ebe9ed3df32f985b (patch) | |
tree | 0622718318ca6a29cc828fc8effa7e1fd3d1859d /remoting/host/client_session.h | |
parent | 6523b246c8ca215bbf2385666af8749d77f42e0b (diff) | |
download | chromium_src-f19f09cae865c8ed71c196f0ebe9ed3df32f985b.zip chromium_src-f19f09cae865c8ed71c196f0ebe9ed3df32f985b.tar.gz chromium_src-f19f09cae865c8ed71c196f0ebe9ed3df32f985b.tar.bz2 |
Made ClientSession a non ref-counted class.
Review URL: https://chromiumcodereview.appspot.com/12794004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187828 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/client_session.h')
-rw-r--r-- | remoting/host/client_session.h | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/remoting/host/client_session.h b/remoting/host/client_session.h index b6d3a6a..f0d1e51 100644 --- a/remoting/host/client_session.h +++ b/remoting/host/client_session.h @@ -34,7 +34,6 @@ namespace remoting { class AudioEncoder; class AudioScheduler; -struct ClientSessionTraits; class DesktopEnvironment; class DesktopEnvironmentFactory; class EventExecutor; @@ -45,8 +44,7 @@ class VideoScheduler; // A ClientSession keeps a reference to a connection to a client, and maintains // per-client state. class ClientSession - : public base::RefCountedThreadSafe<ClientSession, ClientSessionTraits>, - public protocol::HostStub, + : public protocol::HostStub, public protocol::ConnectionToClient::EventHandler, public base::NonThreadSafe { public: @@ -96,6 +94,7 @@ class ClientSession scoped_ptr<protocol::ConnectionToClient> connection, DesktopEnvironmentFactory* desktop_environment_factory, const base::TimeDelta& max_duration); + virtual ~ClientSession(); // protocol::HostStub interface. virtual void NotifyClientResolution( @@ -124,10 +123,6 @@ class ClientSession // method returns. void Disconnect(); - // Stops the ClientSession. The caller can safely release its reference to - // the client session once Stop() returns. - void Stop(); - protocol::ConnectionToClient* connection() const { return connection_.get(); } @@ -146,10 +141,6 @@ class ClientSession void SetDisableInputs(bool disable_inputs); private: - friend class base::DeleteHelper<ClientSession>; - friend struct ClientSessionTraits; - virtual ~ClientSession(); - // Creates a proxy for sending clipboard events to the client. scoped_ptr<protocol::ClipboardStub> CreateClipboardProxy(); @@ -230,11 +221,6 @@ class ClientSession DISALLOW_COPY_AND_ASSIGN(ClientSession); }; -// Destroys |ClienSession| instances on the network thread. -struct ClientSessionTraits { - static void Destruct(const ClientSession* client); -}; - } // namespace remoting #endif // REMOTING_HOST_CLIENT_SESSION_H_ |