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

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

Issue 501703002: Hook up loading signal to ResourceScheduler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@zhen_visibility
Patch Set: Move definitions to match declarations. Created 6 years, 3 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
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 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after
1325 scheduler_->OnClientCreated(child_id, route_id, is_visible); 1325 scheduler_->OnClientCreated(child_id, route_id, is_visible);
1326 } 1326 }
1327 1327
1328 void ResourceDispatcherHostImpl::OnRenderViewHostDeleted( 1328 void ResourceDispatcherHostImpl::OnRenderViewHostDeleted(
1329 int child_id, 1329 int child_id,
1330 int route_id) { 1330 int route_id) {
1331 scheduler_->OnClientDeleted(child_id, route_id); 1331 scheduler_->OnClientDeleted(child_id, route_id);
1332 CancelRequestsForRoute(child_id, route_id); 1332 CancelRequestsForRoute(child_id, route_id);
1333 } 1333 }
1334 1334
1335 void ResourceDispatcherHostImpl::OnRenderViewHostSetIsLoading(int child_id,
1336 int route_id,
1337 bool is_loading) {
1338 scheduler_->OnLoadingStateChanged(child_id, route_id, !is_loading);
1339 }
1340
1335 void ResourceDispatcherHostImpl::OnRenderViewHostWasHidden( 1341 void ResourceDispatcherHostImpl::OnRenderViewHostWasHidden(
1336 int child_id, 1342 int child_id,
1337 int route_id) { 1343 int route_id) {
1338 scheduler_->OnVisibilityChanged(child_id, route_id, false); 1344 scheduler_->OnVisibilityChanged(child_id, route_id, false);
1339 } 1345 }
1340 1346
1341 void ResourceDispatcherHostImpl::OnRenderViewHostWasShown( 1347 void ResourceDispatcherHostImpl::OnRenderViewHostWasShown(
1342 int child_id, 1348 int child_id,
1343 int route_id) { 1349 int route_id) {
1344 scheduler_->OnVisibilityChanged(child_id, route_id, true); 1350 scheduler_->OnVisibilityChanged(child_id, route_id, true);
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
2004 2010
2005 // Add a flag to selectively bypass the data reduction proxy if the resource 2011 // Add a flag to selectively bypass the data reduction proxy if the resource
2006 // type is not an image. 2012 // type is not an image.
2007 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) 2013 if (request_data.resource_type != RESOURCE_TYPE_IMAGE)
2008 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; 2014 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY;
2009 2015
2010 return load_flags; 2016 return load_flags;
2011 } 2017 }
2012 2018
2013 } // namespace content 2019 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698