Chromium Code Reviews| 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 | |
| 10 #include "base/basictypes.h" | |
| 11 #include "webkit/child/websocket_handle_bridge.h" | |
| 12 | |
| 13 class GURL; | |
| 14 | |
| 15 namespace webkit_glue { | |
| 16 | |
| 17 class WebSocketHandleDelegate { | |
|
piman
2013/09/12 07:30:21
We're trying to avoid adding new code to webkit/ a
yhirano
2013/09/13 12:32:29
Done.
| |
| 18 public: | |
| 19 virtual void DidConnect(bool fail, | |
| 20 const std::string& protocol, | |
| 21 const std::string& extensions) = 0; | |
| 22 virtual void DidReceiveData(bool fin, | |
| 23 WebSocketHandleBridge::MessageType type, | |
| 24 const char* data, | |
| 25 size_t size) = 0; | |
| 26 virtual void DidReceiveFlowControl(int64_t quota) = 0; | |
| 27 virtual void DidClose(unsigned short code, const std::string& reason) = 0; | |
| 28 | |
| 29 protected: | |
| 30 WebSocketHandleDelegate() {} | |
| 31 virtual ~WebSocketHandleDelegate() {} | |
| 32 }; | |
| 33 | |
| 34 } // namespace webkit_glue | |
| 35 | |
| 36 #endif // WEBKIT_CHILD_WEBSOCKET_HANDLE_DELEGATE_H_ | |
| OLD | NEW |