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_ |