OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_LOADER_RESOURCE_SCHEDULER_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_SCHEDULER_H_ |
6 #define CONTENT_BROWSER_LOADER_RESOURCE_SCHEDULER_H_ | 6 #define CONTENT_BROWSER_LOADER_RESOURCE_SCHEDULER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
143 // from a proxy using SPDY. | 143 // from a proxy using SPDY. |
144 void OnReceivedSpdyProxiedHttpResponse(int child_id, int route_id); | 144 void OnReceivedSpdyProxiedHttpResponse(int child_id, int route_id); |
145 | 145 |
146 // Client functions: | 146 // Client functions: |
147 | 147 |
148 // Called to check if all user observable tabs have completed loading. | 148 // Called to check if all user observable tabs have completed loading. |
149 bool active_clients_loaded() const { return active_clients_loading_ == 0; } | 149 bool active_clients_loaded() const { return active_clients_loading_ == 0; } |
150 | 150 |
151 bool IsClientVisibleForTesting(int child_id, int route_id); | 151 bool IsClientVisibleForTesting(int child_id, int route_id); |
152 | 152 |
153 bool HasLoadingClients() const; | |
Andre
2015/05/05 20:06:49
Is there a better way to find out if any tab is cu
mmenke
2015/05/05 21:42:18
Hrm...Don't see one, since we're on the IO thread.
| |
154 | |
153 private: | 155 private: |
154 enum ClientState { | 156 enum ClientState { |
155 // Observable client. | 157 // Observable client. |
156 ACTIVE, | 158 ACTIVE, |
157 // Non-observable client. | 159 // Non-observable client. |
158 BACKGROUND, | 160 BACKGROUND, |
159 // No client found. | 161 // No client found. |
160 UNKNOWN, | 162 UNKNOWN, |
161 }; | 163 }; |
162 | 164 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
223 size_t active_clients_loading_; | 225 size_t active_clients_loading_; |
224 size_t coalesced_clients_; | 226 size_t coalesced_clients_; |
225 // This is a repeating timer to initiate requests on COALESCED Clients. | 227 // This is a repeating timer to initiate requests on COALESCED Clients. |
226 scoped_ptr<base::Timer> coalescing_timer_; | 228 scoped_ptr<base::Timer> coalescing_timer_; |
227 RequestSet unowned_requests_; | 229 RequestSet unowned_requests_; |
228 }; | 230 }; |
229 | 231 |
230 } // namespace content | 232 } // namespace content |
231 | 233 |
232 #endif // CONTENT_BROWSER_LOADER_RESOURCE_SCHEDULER_H_ | 234 #endif // CONTENT_BROWSER_LOADER_RESOURCE_SCHEDULER_H_ |
OLD | NEW |