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

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

Issue 7540023: DevTools: no way to remote debug using ToT build as a client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 <string>
10
11 #include "base/basictypes.h"
12 #include "base/memory/scoped_ptr.h"
13
14 namespace net {
15
16 class HttpConnection;
17 class HttpServerRequestInfo;
18
19 class WebSocket {
20 public:
21 static WebSocket* CreateWebSocket(HttpConnection* connection,
22 const HttpServerRequestInfo& request,
23 size_t* pos);
24
25 enum ParseResult {
26 FRAME_OK,
27 FRAME_INCOMPLETE,
28 FRAME_ERROR
29 };
30
31 virtual void Accept(const HttpServerRequestInfo& request) = 0;
32 virtual ParseResult Read(std::string* message) = 0;
33 virtual void Send(const std::string& message) = 0;
34
35 protected:
36 WebSocket(HttpConnection* connection);
yurys 2011/08/01 13:42:29 "explicit" modifier is missing.
37 HttpConnection* connection_;
38
39 private:
40 DISALLOW_COPY_AND_ASSIGN(WebSocket);
41 };
42
43 } // namespace net
44
45 #endif // NET_SERVER_WEB_SOCKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698