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

Side by Side Diff: net/server/web_socket.h

Issue 7482041: DevTools: no way to remote debug using ToT build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: web_socket class was extracted. Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NET_SERVER_WEB_SOCKET_H_
6 #define NET_SERVER_WEB_SOCKET_H_
7 #pragma once
8
9 #include "base/basictypes.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "net/server/http_server.h"
12
13 #include <string>
14 #include <vector>
15
16 namespace net {
17
18 class HttpServerRequestInfo;
19
20 class WebSocket {
21 public:
22 static WebSocket* createWebSocket(Connection* connection,
eroman 2011/08/02 18:46:41 CreateWebSocket
23 const HttpServerRequestInfo& request,
24 size_t* pos);
25
26 enum ParseResult {
eroman 2011/08/02 18:46:41 Move this to the top of the public section.
27 FrameOK,
28 FrameIncomplete,
29 FrameError
eroman 2011/08/02 18:46:41 Chrome is using ALL_UPER_CASE_FOR_ENUMS
30 };
31
32 virtual void Accept(const HttpServerRequestInfo& request) = 0;
33 virtual ParseResult Read(std::string* message) = 0;
34 virtual void Send(const std::string& message) = 0;
eroman 2011/08/02 18:46:41 Please add a virtual destructor. I always recomme
35
36 protected:
37 WebSocket(Connection* connection);
eroman 2011/08/02 18:46:41 mark this as explicit.
38 Connection* connection_;
39 };
40
41 } // namespace net
42
43 #endif // NET_SERVER_WEB_SOCKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698