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 16 matching lines...) Expand all Loading... |
27 public: | 27 public: |
28 WebSocketBridge(); | 28 WebSocketBridge(); |
29 | 29 |
30 // Handles an IPC message from the browser process. | 30 // Handles an IPC message from the browser process. |
31 bool OnMessageReceived(const IPC::Message& message); | 31 bool OnMessageReceived(const IPC::Message& message); |
32 | 32 |
33 // WebSocketHandle functions. | 33 // WebSocketHandle functions. |
34 virtual void connect(const blink::WebURL& url, | 34 virtual void connect(const blink::WebURL& url, |
35 const blink::WebVector<blink::WebString>& protocols, | 35 const blink::WebVector<blink::WebString>& protocols, |
36 const blink::WebSerializedOrigin& origin, | 36 const blink::WebSerializedOrigin& origin, |
37 blink::WebSocketHandleClient* client) OVERRIDE; | 37 blink::WebSocketHandleClient* client) override; |
38 virtual void send(bool fin, | 38 virtual void send(bool fin, |
39 WebSocketHandle::MessageType type, | 39 WebSocketHandle::MessageType type, |
40 const char* data, | 40 const char* data, |
41 size_t size) OVERRIDE; | 41 size_t size) override; |
42 virtual void flowControl(int64_t quota) OVERRIDE; | 42 virtual void flowControl(int64_t quota) override; |
43 virtual void close(unsigned short code, | 43 virtual void close(unsigned short code, |
44 const blink::WebString& reason) OVERRIDE; | 44 const blink::WebString& reason) override; |
45 | 45 |
46 virtual void Disconnect(); | 46 virtual void Disconnect(); |
47 | 47 |
48 void set_render_frame_id(int id) { | 48 void set_render_frame_id(int id) { |
49 render_frame_id_ = id; | 49 render_frame_id_ = id; |
50 } | 50 } |
51 | 51 |
52 private: | 52 private: |
53 virtual ~WebSocketBridge(); | 53 virtual ~WebSocketBridge(); |
54 | 54 |
(...skipping 13 matching lines...) Expand all Loading... |
68 int channel_id_; | 68 int channel_id_; |
69 int render_frame_id_; | 69 int render_frame_id_; |
70 blink::WebSocketHandleClient* client_; | 70 blink::WebSocketHandleClient* client_; |
71 | 71 |
72 static const int kInvalidChannelId = -1; | 72 static const int kInvalidChannelId = -1; |
73 }; | 73 }; |
74 | 74 |
75 } // namespace content | 75 } // namespace content |
76 | 76 |
77 #endif // CONTENT_CHILD_WEBSOCKET_BRIDGE_H_ | 77 #endif // CONTENT_CHILD_WEBSOCKET_BRIDGE_H_ |
OLD | NEW |