OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_CHILD_WEBSOCKET_BRIDGE_H_ | 5 #ifndef CONTENT_CHILD_WEBSOCKET_BRIDGE_H_ |
6 #define CONTENT_CHILD_WEBSOCKET_BRIDGE_H_ | 6 #define CONTENT_CHILD_WEBSOCKET_BRIDGE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 29 matching lines...) Expand all Loading... |
40 const WebKit::WebString& reason) OVERRIDE; | 40 const WebKit::WebString& reason) OVERRIDE; |
41 | 41 |
42 virtual void Disconnect(); | 42 virtual void Disconnect(); |
43 | 43 |
44 private: | 44 private: |
45 virtual ~WebSocketBridge(); | 45 virtual ~WebSocketBridge(); |
46 | 46 |
47 void DidConnect(bool fail, | 47 void DidConnect(bool fail, |
48 const std::string& selected_protocol, | 48 const std::string& selected_protocol, |
49 const std::string& extensions); | 49 const std::string& extensions); |
| 50 void DidFail(const std::string& message); |
50 void DidReceiveData(bool fin, | 51 void DidReceiveData(bool fin, |
51 WebSocketMessageType type, | 52 WebSocketMessageType type, |
52 const std::vector<char>& data); | 53 const std::vector<char>& data); |
53 void DidReceiveFlowControl(int64_t quota); | 54 void DidReceiveFlowControl(int64_t quota); |
54 void DidClose(unsigned short code, const std::string& reason); | 55 void DidClose(bool was_clean, unsigned short code, const std::string& reason); |
55 | 56 |
56 int channel_id_; | 57 int channel_id_; |
57 WebKit::WebSocketHandleClient* client_; | 58 WebKit::WebSocketHandleClient* client_; |
58 | 59 |
59 static const int kInvalidChannelId = -1; | 60 static const int kInvalidChannelId = -1; |
60 }; | 61 }; |
61 | 62 |
62 } // namespace content | 63 } // namespace content |
63 | 64 |
64 #endif // CONTENT_CHILD_WEBSOCKET_BRIDGE_H_ | 65 #endif // CONTENT_CHILD_WEBSOCKET_BRIDGE_H_ |
OLD | NEW |