| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_WEBSOCKETS_WEBSOCKET_STREAM_BASE_H_ | 5 #ifndef NET_WEBSOCKETS_WEBSOCKET_STREAM_BASE_H_ |
| 6 #define NET_WEBSOCKETS_WEBSOCKET_STREAM_BASE_H_ | 6 #define NET_WEBSOCKETS_WEBSOCKET_STREAM_BASE_H_ |
| 7 | 7 |
| 8 // This file is included from net/http files. | 8 // This file is included from net/http files. |
| 9 // Since net/http can be built without linking net/websockets code, | 9 // Since net/http can be built without linking net/websockets code, |
| 10 // this file should not depend on net/websockets. | 10 // this file should not depend on net/websockets. |
| 11 | 11 |
| 12 #include <base/basictypes.h> | 12 #include <base/basictypes.h> |
| 13 | 13 |
| 14 namespace net { | 14 namespace net { |
| 15 | 15 |
| 16 class ClientSocketHandle; | 16 class ClientSocketHandle; |
| 17 class SpdySession; | 17 class SpdySession; |
| 18 class WebSocketStream; | 18 class WebSocketStream; |
| 19 | 19 |
| 20 // WebSocketStreamBase is the base class of WebSocketStream. | 20 // WebSocketStreamBase is the base class of WebSocketStream. |
| 21 // net/http code uses this interface to handle WebSocketStream. | 21 // net/http code uses this interface to handle WebSocketStream. |
| 22 class WebSocketStreamBase { | 22 class NET_EXPORT WebSocketStreamBase { |
| 23 public: | 23 public: |
| 24 class Factory { | 24 class Factory { |
| 25 public: | 25 public: |
| 26 virtual ~Factory() {} | 26 virtual ~Factory() {} |
| 27 | 27 |
| 28 // Create a WebSocketBasicStream. | 28 // Create a WebSocketBasicStream. |
| 29 // This function (or the returned object) takes the ownership | 29 // This function (or the returned object) takes the ownership |
| 30 // of |connection|. | 30 // of |connection|. |
| 31 virtual WebSocketStreamBase* CreateBasicStream( | 31 virtual WebSocketStreamBase* CreateBasicStream( |
| 32 ClientSocketHandle* connection, | 32 ClientSocketHandle* connection, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 46 protected: | 46 protected: |
| 47 WebSocketStreamBase() {} | 47 WebSocketStreamBase() {} |
| 48 | 48 |
| 49 private: | 49 private: |
| 50 DISALLOW_COPY_AND_ASSIGN(WebSocketStreamBase); | 50 DISALLOW_COPY_AND_ASSIGN(WebSocketStreamBase); |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 } // namespace net | 53 } // namespace net |
| 54 | 54 |
| 55 #endif // NET_WEBSOCKETS_WEBSOCKET_STREAM_BASE_H_ | 55 #endif // NET_WEBSOCKETS_WEBSOCKET_STREAM_BASE_H_ |
| OLD | NEW |