diff options
Diffstat (limited to 'chrome/browser/tab_contents/render_view_host_delegate_helper.h')
-rw-r--r-- | chrome/browser/tab_contents/render_view_host_delegate_helper.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.h b/chrome/browser/tab_contents/render_view_host_delegate_helper.h index e0525fb..a2b2bf6 100644 --- a/chrome/browser/tab_contents/render_view_host_delegate_helper.h +++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.h @@ -10,6 +10,8 @@ #include "base/basictypes.h" #include "content/browser/webui/web_ui.h" +#include "content/common/notification_observer.h" +#include "content/common/notification_registrar.h" #include "content/common/window_container_type.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" #include "ui/gfx/rect.h" @@ -28,7 +30,7 @@ class TabContents; // Provides helper methods that provide common implementations of some // RenderViewHostDelegate::View methods. -class RenderViewHostDelegateViewHelper { +class RenderViewHostDelegateViewHelper : public NotificationObserver { public: RenderViewHostDelegateViewHelper(); virtual ~RenderViewHostDelegateViewHelper(); @@ -66,10 +68,12 @@ class RenderViewHostDelegateViewHelper { // map. virtual TabContents* GetCreatedWindow(int route_id); - // Removes |host| from the internal map of pending RenderWidgets. - void RenderWidgetHostDestroyed(RenderWidgetHost* host); - private: + // NotificationObserver implementation + virtual void Observe(int type, + const NotificationSource& source, + const NotificationDetails& details) OVERRIDE; + BackgroundContents* MaybeCreateBackgroundContents( int route_id, Profile* profile, @@ -87,6 +91,9 @@ class RenderViewHostDelegateViewHelper { typedef std::map<int, RenderWidgetHostView*> PendingWidgetViews; PendingWidgetViews pending_widget_views_; + // Registers and unregisters us for notifications. + NotificationRegistrar registrar_; + DISALLOW_COPY_AND_ASSIGN(RenderViewHostDelegateViewHelper); }; |