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

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

Issue 12600018: ResourceScheduler should use renderer notifications instead of MRUCache to track renderers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove dead code Created 7 years, 9 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_view_observer.h
diff --git a/content/browser/loader/resource_scheduler_view_observer.h b/content/browser/loader/resource_scheduler_view_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..9ea75e004cdc490e8311fbffb83a1fba8f6bd3b1
--- /dev/null
+++ b/content/browser/loader/resource_scheduler_view_observer.h
@@ -0,0 +1,35 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_LOADER_RESOURCE_SCHEDULER_VIEW_OBSERVER_H_
+#define CONTENT_BROWSER_LOADER_RESOURCE_SCHEDULER_VIEW_OBSERVER_H_
+
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
+
+namespace content {
+
+// The ResourceScheduler needs to know when renderers are created and destroyed.
+// That happens on the UI thread, but the ResourceScheduler lives on the IO
+// thread. ResourceSchedulerViewObserver listens for renderer notifications on
+// the UI thread, then bounces them over to the IO thread so the
+// ResourceScheduler can be notified.
+class CONTENT_EXPORT ResourceSchedulerViewObserver
darin (slow to review) 2013/03/13 00:12:27 Another name for this might be RenderViewHostTrack
+ : public NotificationObserver {
+ public:
+ ResourceSchedulerViewObserver();
+ virtual ~ResourceSchedulerViewObserver();
+
+ private:
+ // NotificationObserver interface:
+ virtual void Observe(int type,
+ const NotificationSource& source,
+ const NotificationDetails& details) OVERRIDE;
+
+ content::NotificationRegistrar registrar_;
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_LOADER_RESOURCE_SCHEDULER_VIEW_OBSERVER_H_

Powered by Google App Engine
This is Rietveld 408576698