| Index: chrome/browser/extensions/extension_uninstall_dialog.h
|
| diff --git a/chrome/browser/extensions/extension_uninstall_dialog.h b/chrome/browser/extensions/extension_uninstall_dialog.h
|
| index 0d2f112a1ad781feb8fb145e165efd98af28205a..61144bd49e6aaaa04774a70299b902da367ea04e 100644
|
| --- a/chrome/browser/extensions/extension_uninstall_dialog.h
|
| +++ b/chrome/browser/extensions/extension_uninstall_dialog.h
|
| @@ -9,9 +9,9 @@
|
| #include "base/compiler_specific.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/memory/weak_ptr.h"
|
| -#include "content/public/browser/notification_observer.h"
|
| #include "content/public/browser/notification_registrar.h"
|
| #include "ui/gfx/image/image_skia.h"
|
| +#include "ui/gfx/native_widget_types.h"
|
|
|
| class Browser;
|
| class Profile;
|
| @@ -28,8 +28,7 @@ namespace extensions {
|
| class Extension;
|
|
|
| class ExtensionUninstallDialog
|
| - : public content::NotificationObserver,
|
| - public base::SupportsWeakPtr<ExtensionUninstallDialog> {
|
| + : public base::SupportsWeakPtr<ExtensionUninstallDialog> {
|
| public:
|
| class Delegate {
|
| public:
|
| @@ -44,11 +43,10 @@ class ExtensionUninstallDialog
|
| };
|
|
|
| // Creates a platform specific implementation of ExtensionUninstallDialog.
|
| - // |profile| and |delegate| can never be NULL.
|
| - // |browser| can be NULL only for Ash when this is used with the applist
|
| - // window.
|
| + // |profile| and |delegate| can never be NULL. If |parent| is not NULL, makes
|
| + // the dialog modal to |parent|, otherwise creates a standalone dialog.
|
| static ExtensionUninstallDialog* Create(Profile* profile,
|
| - Browser* browser,
|
| + gfx::NativeWindow parent,
|
| Delegate* delegate);
|
|
|
| virtual ~ExtensionUninstallDialog();
|
| @@ -69,12 +67,12 @@ class ExtensionUninstallDialog
|
| protected:
|
| // Constructor used by the derived classes.
|
| ExtensionUninstallDialog(Profile* profile,
|
| - Browser* browser,
|
| + gfx::NativeWindow parent,
|
| Delegate* delegate);
|
|
|
| Profile* const profile_;
|
|
|
| - Browser* browser_;
|
| + gfx::NativeWindow parent_;
|
|
|
| // The delegate we will call Accepted/Canceled on after confirmation dialog.
|
| Delegate* delegate_;
|
| @@ -96,23 +94,13 @@ class ExtensionUninstallDialog
|
|
|
| void OnImageLoaded(const std::string& extension_id, const gfx::Image& image);
|
|
|
| - // content::NotificationObserver implementation.
|
| - virtual void Observe(int type,
|
| - const content::NotificationSource& source,
|
| - const content::NotificationDetails& details) 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;
|
|
|
| - // Keeps track of whether we're still waiting for an image to load before
|
| - // we show the dialog.
|
| - enum State {
|
| - kImageIsLoading, // Image is loading asynchronously.
|
| - kDialogIsShowing, // Dialog is shown after image is loaded.
|
| - kBrowserIsClosing // Browser is closed while image is still loading.
|
| - };
|
| - State state_;
|
| + // Refreshes the icon in the prompt. Called after the icon has been loaded.
|
| + // The implementations of this method are platform-specific.
|
| + virtual void RefreshIcon() = 0;
|
|
|
| base::MessageLoop* ui_loop_;
|
|
|
|
|