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

Unified Diff: content/browser/loader/resource_scheduler.cc

Issue 501703002: Hook up loading signal to ResourceScheduler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@zhen_visibility
Patch Set: Rebase 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
Index: content/browser/loader/resource_scheduler.cc
diff --git a/content/browser/loader/resource_scheduler.cc b/content/browser/loader/resource_scheduler.cc
index 3519b8bdf8a4c4c9a6230912cb5dd83136222043..cb256f17ff149194d1c7b51c2c6570646553f653 100644
--- a/content/browser/loader/resource_scheduler.cc
+++ b/content/browser/loader/resource_scheduler.cc
@@ -288,7 +288,7 @@ class ResourceScheduler::Client {
bool is_loaded() const { return is_loaded_; }
- bool IsVisible() const { return is_visible_; }
+ bool is_visible() const { return is_visible_; }
void OnAudibilityChanged(bool is_audible) {
if (is_audible == is_audible_) {
@@ -891,7 +891,13 @@ void ResourceScheduler::OnLoadingStateChanged(int child_id,
bool ResourceScheduler::IsClientVisibleForTesting(int child_id, int route_id) {
Client* client = GetClient(child_id, route_id);
DCHECK(client);
- return client->IsVisible();
+ return client->is_visible();
+}
+
+bool ResourceScheduler::IsClientLoadedForTesting(int child_id, int route_id) {
+ Client* client = GetClient(child_id, route_id);
+ DCHECK(client);
+ return client->is_loaded();
}
ResourceScheduler::Client* ResourceScheduler::GetClient(int child_id,

Powered by Google App Engine
This is Rietveld 408576698