Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_SCHEDULER_VIEW_OBSERVER_H_ | |
| 6 #define CONTENT_BROWSER_LOADER_RESOURCE_SCHEDULER_VIEW_OBSERVER_H_ | |
| 7 | |
| 8 #include "content/public/browser/notification_observer.h" | |
| 9 #include "content/public/browser/notification_registrar.h" | |
| 10 | |
| 11 namespace content { | |
| 12 | |
| 13 // The ResourceScheduler needs to know when renderers are created and destroyed. | |
| 14 // That happens on the UI thread, but the ResourceScheduler lives on the IO | |
| 15 // thread. ResourceSchedulerViewObserver listens for renderer notifications on | |
| 16 // the UI thread, then bounces them over to the IO thread so the | |
| 17 // ResourceScheduler can be notified. | |
| 18 class CONTENT_EXPORT ResourceSchedulerViewObserver | |
|
darin (slow to review)
2013/03/13 00:12:27
Another name for this might be RenderViewHostTrack
| |
| 19 : public NotificationObserver { | |
| 20 public: | |
| 21 ResourceSchedulerViewObserver(); | |
| 22 virtual ~ResourceSchedulerViewObserver(); | |
| 23 | |
| 24 private: | |
| 25 // NotificationObserver interface: | |
| 26 virtual void Observe(int type, | |
| 27 const NotificationSource& source, | |
| 28 const NotificationDetails& details) OVERRIDE; | |
| 29 | |
| 30 content::NotificationRegistrar registrar_; | |
| 31 }; | |
| 32 | |
| 33 } // namespace content | |
| 34 | |
| 35 #endif // CONTENT_BROWSER_LOADER_RESOURCE_SCHEDULER_VIEW_OBSERVER_H_ | |
| OLD | NEW |