| 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
| 6 | 6 |
| 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1298 false, // has_user_gesture | 1298 false, // has_user_gesture |
| 1299 blink::WebReferrerPolicyDefault, | 1299 blink::WebReferrerPolicyDefault, |
| 1300 blink::WebPageVisibilityStateVisible, | 1300 blink::WebPageVisibilityStateVisible, |
| 1301 context, | 1301 context, |
| 1302 base::WeakPtr<ResourceMessageFilter>(), // filter | 1302 base::WeakPtr<ResourceMessageFilter>(), // filter |
| 1303 true); // is_async | 1303 true); // is_async |
| 1304 } | 1304 } |
| 1305 | 1305 |
| 1306 void ResourceDispatcherHostImpl::OnRenderViewHostCreated( | 1306 void ResourceDispatcherHostImpl::OnRenderViewHostCreated( |
| 1307 int child_id, | 1307 int child_id, |
| 1308 int route_id) { | 1308 int route_id, |
| 1309 scheduler_->OnClientCreated(child_id, route_id); | 1309 RenderWidgetHostDelegate* widget_delegate) { |
| 1310 scheduler_->OnClientCreated(child_id, |
| 1311 route_id, |
| 1312 static_cast<WebContentsImpl*>(widget_delegate)); |
| 1310 } | 1313 } |
| 1311 | 1314 |
| 1312 void ResourceDispatcherHostImpl::OnRenderViewHostDeleted( | 1315 void ResourceDispatcherHostImpl::OnRenderViewHostDeleted( |
| 1313 int child_id, | 1316 int child_id, |
| 1314 int route_id) { | 1317 int route_id) { |
| 1315 scheduler_->OnClientDeleted(child_id, route_id); | 1318 scheduler_->OnClientDeleted(child_id, route_id); |
| 1316 CancelRequestsForRoute(child_id, route_id); | 1319 CancelRequestsForRoute(child_id, route_id); |
| 1317 } | 1320 } |
| 1318 | 1321 |
| 1319 // This function is only used for saving feature. | 1322 // This function is only used for saving feature. |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1979 | 1982 |
| 1980 // Add a flag to selectively bypass the data reduction proxy if the resource | 1983 // Add a flag to selectively bypass the data reduction proxy if the resource |
| 1981 // type is not an image. | 1984 // type is not an image. |
| 1982 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) | 1985 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) |
| 1983 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; | 1986 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; |
| 1984 | 1987 |
| 1985 return load_flags; | 1988 return load_flags; |
| 1986 } | 1989 } |
| 1987 | 1990 |
| 1988 } // namespace content | 1991 } // namespace content |
| OLD | NEW |