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

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: Nit. 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 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after
1353 scheduler_->OnClientCreated(child_id, route_id, is_visible); 1353 scheduler_->OnClientCreated(child_id, route_id, is_visible);
1354 } 1354 }
1355 1355
1356 void ResourceDispatcherHostImpl::OnRenderViewHostDeleted( 1356 void ResourceDispatcherHostImpl::OnRenderViewHostDeleted(
1357 int child_id, 1357 int child_id,
1358 int route_id) { 1358 int route_id) {
1359 scheduler_->OnClientDeleted(child_id, route_id); 1359 scheduler_->OnClientDeleted(child_id, route_id);
1360 CancelRequestsForRoute(child_id, route_id); 1360 CancelRequestsForRoute(child_id, route_id);
1361 } 1361 }
1362 1362
1363 void ResourceDispatcherHostImpl::OnRenderViewHostSetIsLoading(int child_id,
1364 int route_id,
1365 bool is_loading) {
1366 scheduler_->OnLoadingStateChanged(child_id, route_id, !is_loading);
1367 }
1368
1363 void ResourceDispatcherHostImpl::OnRenderViewHostWasHidden( 1369 void ResourceDispatcherHostImpl::OnRenderViewHostWasHidden(
1364 int child_id, 1370 int child_id,
1365 int route_id) { 1371 int route_id) {
1366 scheduler_->OnVisibilityChanged(child_id, route_id, false); 1372 scheduler_->OnVisibilityChanged(child_id, route_id, false);
1367 } 1373 }
1368 1374
1369 void ResourceDispatcherHostImpl::OnRenderViewHostWasShown( 1375 void ResourceDispatcherHostImpl::OnRenderViewHostWasShown(
1370 int child_id, 1376 int child_id,
1371 int route_id) { 1377 int route_id) {
1372 scheduler_->OnVisibilityChanged(child_id, route_id, true); 1378 scheduler_->OnVisibilityChanged(child_id, route_id, true);
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
2032 2038
2033 // Add a flag to selectively bypass the data reduction proxy if the resource 2039 // Add a flag to selectively bypass the data reduction proxy if the resource
2034 // type is not an image. 2040 // type is not an image.
2035 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) 2041 if (request_data.resource_type != RESOURCE_TYPE_IMAGE)
2036 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; 2042 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY;
2037 2043
2038 return load_flags; 2044 return load_flags;
2039 } 2045 }
2040 2046
2041 } // namespace content 2047 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.h ('k') | content/browser/loader/resource_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698