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

Unified 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: Do not throttle when should not 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/resource_dispatcher_host_impl.cc
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index fdddc37d1a59700218d8a6dbd0e893a81267532c..0f1890a1ee0381c29abddb25374dbca0bd24f8bd 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -1324,8 +1324,9 @@ ResourceRequestInfoImpl* ResourceDispatcherHostImpl::CreateRequestInfo(
void ResourceDispatcherHostImpl::OnRenderViewHostCreated(
int child_id,
- int route_id) {
- scheduler_->OnClientCreated(child_id, route_id);
+ int route_id,
+ bool is_visible) {
+ scheduler_->OnClientCreated(child_id, route_id, is_visible);
}
void ResourceDispatcherHostImpl::OnRenderViewHostDeleted(
@@ -1335,6 +1336,18 @@ void ResourceDispatcherHostImpl::OnRenderViewHostDeleted(
CancelRequestsForRoute(child_id, route_id);
}
+void ResourceDispatcherHostImpl::OnRenderViewHostWasHidden(
+ int child_id,
+ int route_id) {
+ scheduler_->OnVisibilityChanged(child_id, route_id, false);
+}
+
+void ResourceDispatcherHostImpl::OnRenderViewHostWasShown(
+ int child_id,
+ int route_id) {
+ scheduler_->OnVisibilityChanged(child_id, route_id, true);
+}
+
// This function is only used for saving feature.
void ResourceDispatcherHostImpl::BeginSaveFile(
const GURL& url,
« 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