Chromium Code Reviews| 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..6ede0db39475317efbee53ea28ef348e86da77b7 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" |
|
msw
2014/07/24 19:20:57
Remove this.
sashab
2014/07/25 02:44:33
Done.
|
| #include "base/memory/weak_ptr.h" |
| -#include "content/public/browser/notification_observer.h" |
| #include "content/public/browser/notification_registrar.h" |
|
msw
2014/07/24 19:20:57
Remove this.
sashab
2014/07/25 02:44:33
Done.
|
| #include "ui/gfx/image/image_skia.h" |
| +#include "ui/gfx/native_widget_types.h" |
| class Browser; |
|
msw
2014/07/24 19:20:57
Remove this.
sashab
2014/07/25 02:44:33
Done.
|
| 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 |
|
msw
2014/07/24 19:20:57
Consider: "The dialog will be modal to |parent|, o
sashab
2014/07/25 02:44:33
Thanks; agreed & removed the standalone bit.
|
| + // 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,24 +94,10 @@ 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_; |
| - |
| base::MessageLoop* ui_loop_; |
| content::NotificationRegistrar registrar_; |
|
msw
2014/07/24 19:20:57
Remove this.
sashab
2014/07/25 02:44:33
Done.
|