Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 465363003: ResourceScheduler get visual signal from RenderViewHostImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add VisualObserver Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 false, // enable_load_timing 1300 false, // enable_load_timing
1301 blink::WebReferrerPolicyDefault, 1301 blink::WebReferrerPolicyDefault,
1302 blink::WebPageVisibilityStateVisible, 1302 blink::WebPageVisibilityStateVisible,
1303 context, 1303 context,
1304 base::WeakPtr<ResourceMessageFilter>(), // filter 1304 base::WeakPtr<ResourceMessageFilter>(), // filter
1305 true); // is_async 1305 true); // is_async
1306 } 1306 }
1307 1307
1308 void ResourceDispatcherHostImpl::OnRenderViewHostCreated( 1308 void ResourceDispatcherHostImpl::OnRenderViewHostCreated(
1309 int child_id, 1309 int child_id,
1310 int route_id) { 1310 int route_id,
1311 scheduler_->OnClientCreated(child_id, route_id); 1311 ResourceScheduler::VisualObserver* observer,
1312 bool is_visible) {
1313 scheduler_->OnClientCreated(child_id, route_id, observer, is_visible);
1312 } 1314 }
1313 1315
1314 void ResourceDispatcherHostImpl::OnRenderViewHostDeleted( 1316 void ResourceDispatcherHostImpl::OnRenderViewHostDeleted(
1315 int child_id, 1317 int child_id,
1316 int route_id) { 1318 int route_id) {
1317 scheduler_->OnClientDeleted(child_id, route_id); 1319 scheduler_->OnClientDeleted(child_id, route_id);
1318 CancelRequestsForRoute(child_id, route_id); 1320 CancelRequestsForRoute(child_id, route_id);
1319 } 1321 }
1320 1322
1321 // This function is only used for saving feature. 1323 // This function is only used for saving feature.
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
1981 1983
1982 // Add a flag to selectively bypass the data reduction proxy if the resource 1984 // Add a flag to selectively bypass the data reduction proxy if the resource
1983 // type is not an image. 1985 // type is not an image.
1984 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) 1986 if (request_data.resource_type != RESOURCE_TYPE_IMAGE)
1985 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; 1987 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY;
1986 1988
1987 return load_flags; 1989 return load_flags;
1988 } 1990 }
1989 1991
1990 } // namespace content 1992 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698