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_RENDER_VIEW_HOST_TRACKER_H_ |
| 6 #define CONTENT_BROWSER_LOADER_RENDER_VIEW_HOST_TRACKER_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 ResourceDispatcherHost needs to know when renderers are created and |
| 14 // destroyed. That happens on the UI thread, but the ResourceDispatcherHost |
| 15 // operates on the IO thread. RenderViewHostTracker listens for renderer |
| 16 // notifications on the UI thread, then bounces them over to the IO thread so |
| 17 // the ResourceDispatcherHost can be notified. |
| 18 class CONTENT_EXPORT RenderViewHostTracker : public NotificationObserver { |
| 19 public: |
| 20 RenderViewHostTracker(); |
| 21 virtual ~RenderViewHostTracker(); |
| 22 |
| 23 private: |
| 24 // NotificationObserver interface: |
| 25 virtual void Observe(int type, |
| 26 const NotificationSource& source, |
| 27 const NotificationDetails& details) OVERRIDE; |
| 28 |
| 29 content::NotificationRegistrar registrar_; |
| 30 }; |
| 31 |
| 32 } // namespace content |
| 33 |
| 34 #endif // CONTENT_BROWSER_LOADER_RENDER_VIEW_HOST_TRACKER_H_ |
OLD | NEW |