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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 // channel. | 104 // channel. |
105 WebSocketHostState DoDropChannel( | 105 WebSocketHostState DoDropChannel( |
106 int routing_id, | 106 int routing_id, |
107 bool was_clean, | 107 bool was_clean, |
108 uint16 code, | 108 uint16 code, |
109 const std::string& reason) WARN_UNUSED_RESULT; | 109 const std::string& reason) WARN_UNUSED_RESULT; |
110 | 110 |
111 // Returns whether the associated renderer process can read raw cookies. | 111 // Returns whether the associated renderer process can read raw cookies. |
112 bool CanReadRawCookies() const; | 112 bool CanReadRawCookies() const; |
113 | 113 |
| 114 int render_process_id() const { return process_id_; } |
| 115 |
114 private: | 116 private: |
115 typedef base::hash_map<int, WebSocketHost*> WebSocketHostTable; | 117 typedef base::hash_map<int, WebSocketHost*> WebSocketHostTable; |
116 | 118 |
117 virtual ~WebSocketDispatcherHost(); | 119 virtual ~WebSocketDispatcherHost(); |
118 | 120 |
119 WebSocketHost* CreateWebSocketHost(int routing_id); | 121 WebSocketHost* CreateWebSocketHost(int routing_id); |
120 | 122 |
121 // Looks up a WebSocketHost object by |routing_id|. Returns the object if one | 123 // Looks up a WebSocketHost object by |routing_id|. Returns the object if one |
122 // is found, or NULL otherwise. | 124 // is found, or NULL otherwise. |
123 WebSocketHost* GetHost(int routing_id) const; | 125 WebSocketHost* GetHost(int routing_id) const; |
(...skipping 20 matching lines...) Expand all Loading... |
144 GetRequestContextCallback get_context_callback_; | 146 GetRequestContextCallback get_context_callback_; |
145 | 147 |
146 WebSocketHostFactory websocket_host_factory_; | 148 WebSocketHostFactory websocket_host_factory_; |
147 | 149 |
148 DISALLOW_COPY_AND_ASSIGN(WebSocketDispatcherHost); | 150 DISALLOW_COPY_AND_ASSIGN(WebSocketDispatcherHost); |
149 }; | 151 }; |
150 | 152 |
151 } // namespace content | 153 } // namespace content |
152 | 154 |
153 #endif // CONTENT_BROWSER_RENDERER_HOST_WEBSOCKET_DISPATCHER_HOST_H_ | 155 #endif // CONTENT_BROWSER_RENDERER_HOST_WEBSOCKET_DISPATCHER_HOST_H_ |
OLD | NEW |