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

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

Issue 465363003: ResourceScheduler get visual signal from RenderViewHostImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove ResourceScheduler::OnVisibilityChanged 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.h
diff --git a/content/browser/loader/resource_scheduler.h b/content/browser/loader/resource_scheduler.h
index 74ac16d3d42be6fa23f226b134817d030364d3c1..3a9df967e6c05819e5b0a918dbfe04f0ed46bd5b 100644
--- a/content/browser/loader/resource_scheduler.h
+++ b/content/browser/loader/resource_scheduler.h
@@ -13,6 +13,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/threading/non_thread_safe.h"
#include "base/timer/timer.h"
+#include "content/browser/web_contents/web_contents_impl.h"
#include "content/common/content_export.h"
#include "net/base/priority_queue.h"
#include "net/base/request_priority.h"
@@ -103,7 +104,9 @@ class CONTENT_EXPORT ResourceScheduler : public base::NonThreadSafe {
// Signals from the UI thread, posted as tasks on the IO thread:
// Called when a renderer is created.
- void OnClientCreated(int child_id, int route_id);
+ void OnClientCreated(int child_id,
+ int route_id,
+ WebContentsImpl* web_contents);
// Called when a renderer is destroyed.
void OnClientDeleted(int child_id, int route_id);
@@ -131,11 +134,10 @@ class CONTENT_EXPORT ResourceScheduler : public base::NonThreadSafe {
// Called when a Client starts or stops playing audio.
void OnAudibilityChanged(int child_id, int route_id, bool is_audible);
- // Called when a Client is shown or hidden.
- void OnVisibilityChanged(int child_id, int route_id, bool is_visible);
-
void OnLoadingStateChanged(int child_id, int route_id, bool is_loaded);
+ bool IsClientVisible(int child_id, int route_id);
aiolos (Not reviewing) 2014/08/15 01:45:38 nit: Since this isn't used outside of the unittest
Zhen Wang 2014/08/15 18:43:01 Done.
+
private:
class RequestQueue;
class ScheduledResourceRequest;

Powered by Google App Engine
This is Rietveld 408576698