diff options
Diffstat (limited to 'chrome/browser/extensions/extension_uninstall_dialog.h')
-rw-r--r-- | chrome/browser/extensions/extension_uninstall_dialog.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/chrome/browser/extensions/extension_uninstall_dialog.h b/chrome/browser/extensions/extension_uninstall_dialog.h index 6d465c8..625557b 100644 --- a/chrome/browser/extensions/extension_uninstall_dialog.h +++ b/chrome/browser/extensions/extension_uninstall_dialog.h @@ -8,12 +8,13 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "chrome/browser/extensions/image_loading_tracker.h" +#include "chrome/browser/ui/browser_list.h" #include "ui/gfx/image/image_skia.h" class MessageLoop; -class Profile; namespace extensions { class Extension; @@ -21,6 +22,7 @@ class Extension; class ExtensionUninstallDialog : public ImageLoadingTracker::Observer, + public BrowserList::Observer, public base::SupportsWeakPtr<ExtensionUninstallDialog> { public: class Delegate { @@ -36,8 +38,9 @@ class ExtensionUninstallDialog }; // Creates a platform specific implementation of ExtensionUninstallDialog. - static ExtensionUninstallDialog* Create( - Profile* profile, Delegate* delegate); + // |browser| can be NULL only for Ash when this is used with the applist + // window. + static ExtensionUninstallDialog* Create(Browser* browser, Delegate* delegate); virtual ~ExtensionUninstallDialog(); @@ -49,9 +52,9 @@ class ExtensionUninstallDialog protected: // Constructor used by the derived classes. - explicit ExtensionUninstallDialog(Profile* profile, Delegate* delegate); + ExtensionUninstallDialog(Browser* browser, Delegate* delegate); - Profile* profile_; + Browser* browser_; // The delegate we will call Accepted/Canceled on after confirmation dialog. Delegate* delegate_; @@ -72,6 +75,9 @@ class ExtensionUninstallDialog const std::string& extension_id, int index) OVERRIDE; + // BrowserList::Observer + virtual void OnBrowserRemoved(Browser* browser) OVERRIDE; + // Displays the prompt. This should only be called after loading the icon. // The implementations of this method are platform-specific. virtual void Show() = 0; @@ -80,7 +86,7 @@ class ExtensionUninstallDialog // Keeps track of extension images being loaded on the File thread for the // purpose of showing the dialog. - ImageLoadingTracker tracker_; + scoped_ptr<ImageLoadingTracker> tracker_; DISALLOW_COPY_AND_ASSIGN(ExtensionUninstallDialog); }; |