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

Unified Diff: net/server/web_socket.h

Issue 1310853004: Drop Hixie76 support from WebSocketServer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | net/server/web_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/server/web_socket.h
diff --git a/net/server/web_socket.h b/net/server/web_socket.h
index 3f2c1d8759f7998a9c3a7c28d3eda4b65c496719..935798a5698f5c07a6e636748875cb105a6e2b65 100644
--- a/net/server/web_socket.h
+++ b/net/server/web_socket.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
#include "base/strings/string_piece.h"
namespace net {
@@ -15,8 +16,9 @@ namespace net {
class HttpConnection;
class HttpServer;
class HttpServerRequestInfo;
+class WebSocketEncoder;
-class WebSocket {
+class WebSocket final {
public:
enum ParseResult {
FRAME_OK,
@@ -30,18 +32,23 @@ class WebSocket {
const HttpServerRequestInfo& request,
size_t* pos);
- virtual void Accept(const HttpServerRequestInfo& request) = 0;
- virtual ParseResult Read(std::string* message) = 0;
- virtual void Send(const std::string& message) = 0;
- virtual ~WebSocket();
+ void Accept(const HttpServerRequestInfo& request);
+ ParseResult Read(std::string* message);
+ void Send(const std::string& message);
+ ~WebSocket();
- protected:
- WebSocket(HttpServer* server, HttpConnection* connection);
+ private:
+ WebSocket(HttpServer* server,
+ HttpConnection* connection,
+ const HttpServerRequestInfo& request,
+ size_t* pos);
HttpServer* const server_;
HttpConnection* const connection_;
+ scoped_ptr<WebSocketEncoder> encoder_;
+ std::string response_extensions_;
+ bool closed_;
- private:
DISALLOW_COPY_AND_ASSIGN(WebSocket);
};
« no previous file with comments | « no previous file | net/server/web_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698