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

Unified Diff: net/websockets/websocket_job.h

Issue 6961007: WebSocket over SPDY. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebased Created 9 years, 6 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | net/websockets/websocket_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_job.h
diff --git a/net/websockets/websocket_job.h b/net/websockets/websocket_job.h
index 369ef56d1c837bf2a9eaccc42f0a0a11d7b2e302..6f9916312c1cbef964872845c0d7d86b6e91a7a2 100644
--- a/net/websockets/websocket_job.h
+++ b/net/websockets/websocket_job.h
@@ -13,6 +13,7 @@
#include "net/base/address_list.h"
#include "net/base/completion_callback.h"
#include "net/socket_stream/socket_stream_job.h"
+#include "net/spdy/spdy_websocket_stream.h"
class GURL;
@@ -31,7 +32,8 @@ class WebSocketHandshakeResponseHandler;
// TODO(ukai): refactor websocket.cc to use this.
class NET_API WebSocketJob
: public SocketStreamJob,
- public SocketStream::Delegate {
+ public SocketStream::Delegate,
+ public SpdyWebSocketStream::Delegate {
public:
// This is state of WebSocket, not SocketStream.
enum State {
@@ -70,6 +72,15 @@ class NET_API WebSocketJob
SocketStream* socket, AuthChallengeInfo* auth_info);
virtual void OnError(const SocketStream* socket, int error);
+ // SpdyWebSocketStream::Delegate methods.
+ virtual void OnCreatedSpdyStream(int status);
+ virtual void OnSentSpdyHeaders(int status);
+ virtual int OnReceivedSpdyResponseHeader(
+ const spdy::SpdyHeaderBlock& headers, int status);
+ virtual void OnSentSpdyData(int amount_sent);
+ virtual void OnReceivedSpdyData(const char* data, int length);
+ virtual void OnCloseSpdyStream();
+
private:
friend class WebSocketThrottle;
friend class WebSocketJobTest;
@@ -118,6 +129,9 @@ class NET_API WebSocketJob
scoped_refptr<DrainableIOBuffer> current_buffer_;
scoped_ptr<WebSocketFrameHandler> receive_frame_handler_;
+ scoped_ptr<SpdyWebSocketStream> spdy_websocket_stream_;
+ std::string challenge_;
+
DISALLOW_COPY_AND_ASSIGN(WebSocketJob);
};
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | net/websockets/websocket_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698