Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This is the browser side of the resource dispatcher, it receives requests | 5 // This is the browser side of the resource dispatcher, it receives requests |
| 6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and | 6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and |
| 7 // dispatches them to URLRequests. It then forwards the messages from the | 7 // dispatches them to URLRequests. It then forwards the messages from the |
| 8 // URLRequests back to the correct process for handling. | 8 // URLRequests back to the correct process for handling. |
| 9 // | 9 // |
| 10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading | 10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 255 void UnregisterDownloadedTempFile(int child_id, int request_id); | 255 void UnregisterDownloadedTempFile(int child_id, int request_id); |
| 256 | 256 |
| 257 // Needed for the sync IPC message dispatcher macros. | 257 // Needed for the sync IPC message dispatcher macros. |
| 258 bool Send(IPC::Message* message); | 258 bool Send(IPC::Message* message); |
| 259 | 259 |
| 260 // Controls if we launch or squash prefetch requests as they arrive | 260 // Controls if we launch or squash prefetch requests as they arrive |
| 261 // from renderers. | 261 // from renderers. |
| 262 static bool is_prefetch_enabled(); | 262 static bool is_prefetch_enabled(); |
| 263 static void set_is_prefetch_enabled(bool value); | 263 static void set_is_prefetch_enabled(bool value); |
| 264 | 264 |
| 265 // Controle whether third-party sub-content can pop-up HTTP basic auth | |
|
jam
2011/05/25 23:25:22
nit: spelling
| |
| 266 // dialog boxes. | |
| 267 static bool allow_cross_origin_auth_prompt(); | |
|
jam
2011/05/25 23:25:22
does this really have to be static? you can just
| |
| 268 static void set_allow_cross_origin_auth_prompt(bool value); | |
| 269 | |
| 265 // This does not take ownership of the observer. It is expected that the | 270 // This does not take ownership of the observer. It is expected that the |
| 266 // observer have a longer lifetime than the ResourceDispatcherHost. | 271 // observer have a longer lifetime than the ResourceDispatcherHost. |
| 267 void set_observer(Observer* observer) { observer_ = observer; } | 272 void set_observer(Observer* observer) { observer_ = observer; } |
| 268 | 273 |
| 269 private: | 274 private: |
| 270 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 275 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| 271 TestBlockedRequestsProcessDies); | 276 TestBlockedRequestsProcessDies); |
| 272 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 277 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| 273 IncrementOutstandingRequestsMemoryCost); | 278 IncrementOutstandingRequestsMemoryCost); |
| 274 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 279 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 494 // kAvgBytesPerOutstandingRequest) | 499 // kAvgBytesPerOutstandingRequest) |
| 495 int max_outstanding_requests_cost_per_process_; | 500 int max_outstanding_requests_cost_per_process_; |
| 496 | 501 |
| 497 // Used during IPC message dispatching so that the handlers can get a pointer | 502 // Used during IPC message dispatching so that the handlers can get a pointer |
| 498 // to the source of the message. | 503 // to the source of the message. |
| 499 ResourceMessageFilter* filter_; | 504 ResourceMessageFilter* filter_; |
| 500 | 505 |
| 501 Observer* observer_; | 506 Observer* observer_; |
| 502 | 507 |
| 503 static bool is_prefetch_enabled_; | 508 static bool is_prefetch_enabled_; |
| 509 static bool allow_cross_origin_auth_prompt_; | |
| 504 | 510 |
| 505 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); | 511 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); |
| 506 }; | 512 }; |
| 507 | 513 |
| 508 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ | 514 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ |
| OLD | NEW |