diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-19 07:11:52 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-19 07:11:52 +0000 |
commit | 1d8a3d1fe0e07d5aaf1f0a5527097b9e313d23b6 (patch) | |
tree | b298f570c373f95b55cdfb8334ab7b510b5942c4 /chrome/browser/renderer_host/socket_stream_host.h | |
parent | 3e45d8f9c4c6eabec2458cc5e0b481e73f2705ab (diff) | |
download | chromium_src-1d8a3d1fe0e07d5aaf1f0a5527097b9e313d23b6.zip chromium_src-1d8a3d1fe0e07d5aaf1f0a5527097b9e313d23b6.tar.gz chromium_src-1d8a3d1fe0e07d5aaf1f0a5527097b9e313d23b6.tar.bz2 |
Move core pieces of browser\renderer_host to src\content.
TBR=avi
Review URL: http://codereview.chromium.org/6532073
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75489 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/socket_stream_host.h')
-rw-r--r-- | chrome/browser/renderer_host/socket_stream_host.h | 53 |
1 files changed, 2 insertions, 51 deletions
diff --git a/chrome/browser/renderer_host/socket_stream_host.h b/chrome/browser/renderer_host/socket_stream_host.h index 50afad2..f8ecab2 100644 --- a/chrome/browser/renderer_host/socket_stream_host.h +++ b/chrome/browser/renderer_host/socket_stream_host.h @@ -6,56 +6,7 @@ #define CHROME_BROWSER_RENDERER_HOST_SOCKET_STREAM_HOST_H_ #pragma once -#include <vector> - -#include "base/ref_counted.h" -#include "net/socket_stream/socket_stream.h" - -class GURL; - -namespace net { -class SocketStreamJob; -class URLRequestContext; -} // namespace net - -// Host of SocketStreamHandle. -// Each SocketStreamHandle will have an unique socket_id assigned by -// SocketStreamHost constructor. If socket id is chrome_common_net::kNoSocketId, -// there is no SocketStreamHost. -// Each SocketStreamHost has SocketStream to manage bi-directional -// communication over socket stream. -// The lifetime of an instance of this class is completely controlled by the -// SocketStreamDispatcherHost. -class SocketStreamHost { - public: - SocketStreamHost(net::SocketStream::Delegate* delegate, int socket_id); - ~SocketStreamHost(); - - // Gets socket_id associated with |socket|. - static int SocketIdFromSocketStream(net::SocketStream* socket); - - int socket_id() const { return socket_id_; } - - // Starts to open connection to |url|. - void Connect(const GURL& url, net::URLRequestContext* request_context); - - // Sends |data| over the socket stream. - // socket stream must be open to send data. - // Returns true if the data is put in transmit buffer in socket stream. - // Returns false otherwise (transmit buffer exceeds limit, or socket - // stream is closed). - bool SendData(const std::vector<char>& data); - - // Closes the socket stream. - void Close(); - - private: - net::SocketStream::Delegate* delegate_; - int socket_id_; - - scoped_refptr<net::SocketStreamJob> socket_; - - DISALLOW_COPY_AND_ASSIGN(SocketStreamHost); -}; +// TODO(jam): remove this file when all files have been converted. +#include "content/browser/renderer_host/socket_stream_host.h" #endif // CHROME_BROWSER_RENDERER_HOST_SOCKET_STREAM_HOST_H_ |