Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4466)

Unified Diff: chrome/browser/renderer_host/socket_stream_host.h

Issue 6532073: Move core pieces of browser\renderer_host to src\content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_host/socket_stream_host.h
===================================================================
--- chrome/browser/renderer_host/socket_stream_host.h (revision 75488)
+++ chrome/browser/renderer_host/socket_stream_host.h (working copy)
@@ -6,56 +6,7 @@
#define CHROME_BROWSER_RENDERER_HOST_SOCKET_STREAM_HOST_H_
#pragma once
-#include <vector>
+// TODO(jam): remove this file when all files have been converted.
+#include "content/browser/renderer_host/socket_stream_host.h"
-#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);
-};
-
#endif // CHROME_BROWSER_RENDERER_HOST_SOCKET_STREAM_HOST_H_

Powered by Google App Engine
This is Rietveld 408576698