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