OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 CONTENT_PUBLIC_BROWSER_WEBSOCKET_HANDSHAKE_REQUEST_INFO_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_WEBSOCKET_HANDSHAKE_REQUEST_INFO_H_ |
| 7 |
| 8 #include "content/common/content_export.h" |
| 9 |
| 10 namespace net { |
| 11 class URLRequest; |
| 12 } // namespace net |
| 13 |
| 14 namespace content { |
| 15 |
| 16 // WebSocketHandshakeRequestInfo provides additional information attached to |
| 17 // a net::URLRequest. |
| 18 class WebSocketHandshakeRequestInfo { |
| 19 public: |
| 20 virtual ~WebSocketHandshakeRequestInfo() {} |
| 21 // Returns the ID of the child process where the WebSocket connection lives. |
| 22 virtual int GetChildId() const = 0; |
| 23 // Returns the ID of the renderer frame where the WebSocket connection lives. |
| 24 virtual int GetRenderFrameId() const = 0; |
| 25 |
| 26 // Returns the WebSocketHandshakeRequestInfo instance attached to the given |
| 27 // URLRequest. Returns nullptr when no instance is attached. |
| 28 CONTENT_EXPORT static const WebSocketHandshakeRequestInfo* ForRequest( |
| 29 const net::URLRequest* request); |
| 30 }; |
| 31 |
| 32 } // namespace content |
| 33 |
| 34 #endif // CONTENT_PUBLIC_BROWSER_WEBSOCKET_HANDSHAKE_REQUEST_INFO_H_ |
OLD | NEW |