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_DELEGATE_H_ |
| 6 #define WEBKIT_CHILD_WEBSOCKET_HANDLE_DELEGATE_H_ |
| 7 |
| 8 #include <string> |
| 9 #include <vector> |
| 10 |
| 11 #include "base/basictypes.h" |
| 12 #include "base/memory/ref_counted.h" |
| 13 #include "webkit/child/websocket_handle_bridge.h" |
| 14 |
| 15 class GURL; |
| 16 |
| 17 namespace webkit_glue { |
| 18 |
| 19 class WebSocketHandleDelegate { |
| 20 public: |
| 21 virtual void DidConnect(bool succeed, |
| 22 const std::string& protocol, |
| 23 const std::string& extensions) = 0; |
| 24 virtual void DidReceiveData(WebSocketHandleBridge::MessageType type, |
| 25 const char* data, |
| 26 size_t size, |
| 27 bool fin) = 0; |
| 28 virtual void DidReceiveFlowControl(int64_t quota) = 0; |
| 29 virtual void DidClose(unsigned short code, const std::string& reason) = 0; |
| 30 |
| 31 protected: |
| 32 WebSocketHandleDelegate() {} |
| 33 virtual ~WebSocketHandleDelegate() {} |
| 34 }; |
| 35 |
| 36 } // namespace webkit_glue |
| 37 |
| 38 #endif // WEBKIT_CHILD_WEBSOCKET_HANDLE_DELEGATE_H_ |
OLD | NEW |