OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 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 WEBKIT_CHILD_WEBSOCKET_HANDLE_IMPL_H_ |
| 6 #define WEBKIT_CHILD_WEBSOCKET_HANDLE_IMPL_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/supports_user_data.h" |
| 11 #include "third_party/WebKit/public/platform/WebSocketHandle.h" |
| 12 |
| 13 namespace webkit_glue { |
| 14 |
| 15 class WebKitPlatformSupportImpl; |
| 16 |
| 17 class WebSocketHandleImpl : public WebKit::WebSocketHandle { |
| 18 public: |
| 19 explicit WebSocketHandleImpl(WebKitPlatformSupportImpl* platform); |
| 20 virtual ~WebSocketHandleImpl(); |
| 21 |
| 22 // WebSocketHandle functions. |
| 23 virtual void connect(const WebKit::WebURL& url, |
| 24 const WebKit::WebVector<WebKit::WebString>& protocols, |
| 25 const WebKit::WebString& origin, |
| 26 WebKit::WebSocketHandleClient* client) OVERRIDE {} |
| 27 virtual void send(bool fin, |
| 28 WebKit::WebSocketHandle::MessageType type, |
| 29 const char* data, |
| 30 size_t size) OVERRIDE {} |
| 31 virtual void flowControl(int64 quota) OVERRIDE {} |
| 32 virtual void close(unsigned short code, |
| 33 const WebKit::WebString& reason) OVERRIDE {} |
| 34 |
| 35 private: |
| 36 class Context; |
| 37 scoped_refptr<Context> context_; |
| 38 WebKitPlatformSupportImpl* platform_; |
| 39 |
| 40 DISALLOW_COPY_AND_ASSIGN(WebSocketHandleImpl); |
| 41 }; |
| 42 |
| 43 } // namespace webkit_glue |
| 44 |
| 45 #endif // WEBKIT_CHILD_WEBSOCKET_HANDLE_IMPL_H_ |
OLD | NEW |