| 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_BROWSER_RENDERER_HOST_WEBSOCKET_DISPATCHER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_WEBSOCKET_DISPATCHER_HOST_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_WEBSOCKET_DISPATCHER_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_WEBSOCKET_DISPATCHER_HOST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 WebSocketMessageType type, | 64 WebSocketMessageType type, |
| 65 const std::vector<char>& data); | 65 const std::vector<char>& data); |
| 66 | 66 |
| 67 // Sends a WebSocketMsg_FlowControl IPC. | 67 // Sends a WebSocketMsg_FlowControl IPC. |
| 68 void SendFlowControl(int routing_id, int64 quota); | 68 void SendFlowControl(int routing_id, int64 quota); |
| 69 | 69 |
| 70 // Sends a WebSocketMsg_SendClosing IPC | 70 // Sends a WebSocketMsg_SendClosing IPC |
| 71 void SendClosing(int routing_id); | 71 void SendClosing(int routing_id); |
| 72 | 72 |
| 73 // Sends a WebSocketMsg_DropChannel IPC and delete and unregister the channel. | 73 // Sends a WebSocketMsg_DropChannel IPC and delete and unregister the channel. |
| 74 void DoDropChannel(int routing_id, uint16 code, const std::string& reason); | 74 void DoDropChannel(int routing_id, |
| 75 bool fail, |
| 76 uint16 code, |
| 77 const std::string& reason); |
| 75 | 78 |
| 76 private: | 79 private: |
| 77 typedef base::hash_map<int, WebSocketHost*> WebSocketHostTable; | 80 typedef base::hash_map<int, WebSocketHost*> WebSocketHostTable; |
| 78 | 81 |
| 79 virtual ~WebSocketDispatcherHost(); | 82 virtual ~WebSocketDispatcherHost(); |
| 80 | 83 |
| 81 WebSocketHost* CreateWebSocketHost(int routing_id); | 84 WebSocketHost* CreateWebSocketHost(int routing_id); |
| 82 | 85 |
| 83 // Looks up a WebSocketHost object by |routing_id|. Returns the object if one | 86 // Looks up a WebSocketHost object by |routing_id|. Returns the object if one |
| 84 // is found, or NULL otherwise. | 87 // is found, or NULL otherwise. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 103 GetRequestContextCallback get_context_callback_; | 106 GetRequestContextCallback get_context_callback_; |
| 104 | 107 |
| 105 WebSocketHostFactory websocket_host_factory_; | 108 WebSocketHostFactory websocket_host_factory_; |
| 106 | 109 |
| 107 DISALLOW_COPY_AND_ASSIGN(WebSocketDispatcherHost); | 110 DISALLOW_COPY_AND_ASSIGN(WebSocketDispatcherHost); |
| 108 }; | 111 }; |
| 109 | 112 |
| 110 } // namespace content | 113 } // namespace content |
| 111 | 114 |
| 112 #endif // CONTENT_BROWSER_RENDERER_HOST_WEBSOCKET_DISPATCHER_HOST_H_ | 115 #endif // CONTENT_BROWSER_RENDERER_HOST_WEBSOCKET_DISPATCHER_HOST_H_ |
| OLD | NEW |