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

Unified Diff: chrome/browser/extensions/extension_view.h

Issue 125164: Fix a bug where ExtensionHost and ExtensionView weren't getting closed proper... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_view.h
===================================================================
--- chrome/browser/extensions/extension_view.h (revision 18385)
+++ chrome/browser/extensions/extension_view.h (working copy)
@@ -8,6 +8,7 @@
#include "build/build_config.h"
#include "base/scoped_ptr.h"
+#include "chrome/common/notification_registrar.h"
#include "googleurl/src/gurl.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "views/controls/native/native_view_host.h"
@@ -28,7 +29,8 @@
};
// This handles the display portion of an ExtensionHost.
-class ExtensionView : public views::NativeViewHost {
+class ExtensionView : public views::NativeViewHost,
+ public NotificationObserver {
public:
ExtensionView(ExtensionHost* host, Browser* browser);
~ExtensionView();
@@ -56,6 +58,11 @@
virtual void ViewHierarchyChanged(bool is_add,
views::View *parent, views::View *child);
+ // NotificationObserver:
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
private:
friend class ExtensionHost;
@@ -84,6 +91,9 @@
// Note: the view does not own its container.
ExtensionContainer* container_;
+ // So that we can track browser window closing.
+ NotificationRegistrar registrar_;
+
DISALLOW_COPY_AND_ASSIGN(ExtensionView);
};
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698