OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 WEBKIT_GLUE_WEBSOCKETSTREAMHANDLE_IMPL_H_ | 5 #ifndef WEBKIT_GLUE_WEBSOCKETSTREAMHANDLE_IMPL_H_ |
6 #define WEBKIT_GLUE_WEBSOCKETSTREAMHANDLE_IMPL_H_ | 6 #define WEBKIT_GLUE_WEBSOCKETSTREAMHANDLE_IMPL_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSocketStreamHandle
.h" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSocketStr
eamHandle.h" |
10 | 10 |
11 namespace webkit_glue { | 11 namespace webkit_glue { |
12 | 12 |
13 class WebKitPlatformSupportImpl; | 13 class WebKitPlatformSupportImpl; |
14 | 14 |
15 class WebSocketStreamHandleImpl : public WebKit::WebSocketStreamHandle { | 15 class WebSocketStreamHandleImpl : public WebKit::WebSocketStreamHandle { |
16 public: | 16 public: |
17 explicit WebSocketStreamHandleImpl(WebKitPlatformSupportImpl* platform); | 17 explicit WebSocketStreamHandleImpl(WebKitPlatformSupportImpl* platform); |
18 virtual ~WebSocketStreamHandleImpl(); | 18 virtual ~WebSocketStreamHandleImpl(); |
19 | 19 |
20 // WebSocketStreamHandle methods: | 20 // WebSocketStreamHandle methods: |
21 virtual void connect( | 21 virtual void connect( |
22 const WebKit::WebURL& url, | 22 const WebKit::WebURL& url, |
23 WebKit::WebSocketStreamHandleClient* client); | 23 WebKit::WebSocketStreamHandleClient* client); |
24 virtual bool send(const WebKit::WebData& data); | 24 virtual bool send(const WebKit::WebData& data); |
25 virtual void close(); | 25 virtual void close(); |
26 | 26 |
27 private: | 27 private: |
28 class Context; | 28 class Context; |
29 scoped_refptr<Context> context_; | 29 scoped_refptr<Context> context_; |
30 WebKitPlatformSupportImpl* platform_; | 30 WebKitPlatformSupportImpl* platform_; |
31 | 31 |
32 DISALLOW_COPY_AND_ASSIGN(WebSocketStreamHandleImpl); | 32 DISALLOW_COPY_AND_ASSIGN(WebSocketStreamHandleImpl); |
33 }; | 33 }; |
34 | 34 |
35 } // namespace webkit_glue | 35 } // namespace webkit_glue |
36 | 36 |
37 #endif // WEBKIT_GLUE_WEBSOCKETSTREAMHANDLE_IMPL_H_ | 37 #endif // WEBKIT_GLUE_WEBSOCKETSTREAMHANDLE_IMPL_H_ |
OLD | NEW |