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_WEBSOCKETS_WEBSOCKET_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_WEBSOCKETS_WEBSOCKET_MANAGER_H_ |
6 #define CONTENT_BROWSER_WEBSOCKETS_WEBSOCKET_MANAGER_H_ | 6 #define CONTENT_BROWSER_WEBSOCKETS_WEBSOCKET_MANAGER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 ~WebSocketManager() override; | 39 ~WebSocketManager() override; |
40 void DoCreateWebSocket(int frame_id, blink::mojom::WebSocketRequest request); | 40 void DoCreateWebSocket(int frame_id, blink::mojom::WebSocketRequest request); |
41 base::TimeDelta CalculateDelay() const; | 41 base::TimeDelta CalculateDelay() const; |
42 void ThrottlingPeriodTimerCallback(); | 42 void ThrottlingPeriodTimerCallback(); |
43 | 43 |
44 // This is virtual to support testing. | 44 // This is virtual to support testing. |
45 virtual WebSocketImpl* CreateWebSocketImpl( | 45 virtual WebSocketImpl* CreateWebSocketImpl( |
46 WebSocketImpl::Delegate* delegate, | 46 WebSocketImpl::Delegate* delegate, |
47 blink::mojom::WebSocketRequest request, | 47 blink::mojom::WebSocketRequest request, |
| 48 int child_id, |
48 int frame_id, | 49 int frame_id, |
49 base::TimeDelta delay); | 50 base::TimeDelta delay); |
50 | 51 |
51 // WebSocketImpl::Delegate methods: | 52 // WebSocketImpl::Delegate methods: |
52 int GetClientProcessId() override; | 53 int GetClientProcessId() override; |
53 StoragePartition* GetStoragePartition() override; | 54 StoragePartition* GetStoragePartition() override; |
54 void OnReceivedResponseFromServer(WebSocketImpl* impl) override; | 55 void OnReceivedResponseFromServer(WebSocketImpl* impl) override; |
55 void OnLostConnectionToClient(WebSocketImpl* impl) override; | 56 void OnLostConnectionToClient(WebSocketImpl* impl) override; |
56 | 57 |
57 int process_id_; | 58 int process_id_; |
(...skipping 16 matching lines...) Expand all Loading... |
74 // period. | 75 // period. |
75 int64_t num_current_failed_connections_; | 76 int64_t num_current_failed_connections_; |
76 int64_t num_previous_failed_connections_; | 77 int64_t num_previous_failed_connections_; |
77 | 78 |
78 DISALLOW_COPY_AND_ASSIGN(WebSocketManager); | 79 DISALLOW_COPY_AND_ASSIGN(WebSocketManager); |
79 }; | 80 }; |
80 | 81 |
81 } // namespace content | 82 } // namespace content |
82 | 83 |
83 #endif // CONTENT_BROWSER_WEBSOCKETS_WEBSOCKET_MANAGER_H_ | 84 #endif // CONTENT_BROWSER_WEBSOCKETS_WEBSOCKET_MANAGER_H_ |
OLD | NEW |