Chromium Code Reviews| Index: chrome/browser/extensions/extension_uninstall_ui.h |
| diff --git a/chrome/browser/extensions/extension_uninstall_dialog.h b/chrome/browser/extensions/extension_uninstall_ui.h |
| similarity index 73% |
| copy from chrome/browser/extensions/extension_uninstall_dialog.h |
| copy to chrome/browser/extensions/extension_uninstall_ui.h |
| index 086f21962bb06319580e642eacc199ca029f60bd..918c949f601baeee55a077ed1c695da25db0d156 100644 |
| --- a/chrome/browser/extensions/extension_uninstall_dialog.h |
| +++ b/chrome/browser/extensions/extension_uninstall_ui.h |
| @@ -2,34 +2,36 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_ |
| -#define CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_ |
| +#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_UI_H_ |
| +#define CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_UI_H_ |
| #pragma once |
| #include "base/basictypes.h" |
| #include "base/compiler_specific.h" |
| +#include "base/memory/scoped_ptr.h" |
| #include "chrome/browser/extensions/image_loading_tracker.h" |
| #include "third_party/skia/include/core/SkBitmap.h" |
| +class ExtensionUninstallDialog; |
| class MessageLoop; |
| class Profile; |
| -class ExtensionUninstallDialog : public ImageLoadingTracker::Observer { |
| +class ExtensionUninstallUI : public ImageLoadingTracker::Observer { |
| public: |
| class Delegate { |
| public: |
| // We call this method to signal that the uninstallation should continue. |
| - virtual void ExtensionDialogAccepted() = 0; |
| + virtual void ExtensionUninstallAccepted() = 0; |
| // We call this method to signal that the uninstallation should stop. |
| - virtual void ExtensionDialogCanceled() = 0; |
| + virtual void ExtensionUninstallCanceled() = 0; |
| protected: |
| virtual ~Delegate() {} |
| }; |
| - explicit ExtensionUninstallDialog(Profile* profile); |
| - virtual ~ExtensionUninstallDialog(); |
| + explicit ExtensionUninstallUI(Profile* profile); |
| + virtual ~ExtensionUninstallUI(); |
| // This is called by the extensions management page to verify whether the |
| // uninstallation should proceed. |
| @@ -40,10 +42,7 @@ class ExtensionUninstallDialog : public ImageLoadingTracker::Observer { |
| private: |
| // Creates an appropriate ExtensionUninstallDialog for the platform. |
| - static void Show(Profile* profile, |
| - Delegate* delegate, |
| - const Extension* extension, |
| - SkBitmap* icon); |
| + void ShowDialog(); |
|
Mihai Parparita -not on Chrome
2011/09/20 23:54:47
Can you add a comment "The implementations of this
jstritar
2011/09/22 16:47:13
Done.
|
| // Sets the icon that will be used in any UI. If |icon| is NULL, or contains |
| // an empty bitmap, then a default icon will be used instead. |
| @@ -57,6 +56,8 @@ class ExtensionUninstallDialog : public ImageLoadingTracker::Observer { |
| Profile* profile_; |
| MessageLoop* ui_loop_; |
| + scoped_ptr<ExtensionUninstallDialog> uninstall_dialog_; |
| + |
| // The delegate we will call Accepted/Canceled on after confirmation UI. |
| Delegate* delegate_; |
| @@ -70,7 +71,7 @@ class ExtensionUninstallDialog : public ImageLoadingTracker::Observer { |
| // The extensions icon. |
| SkBitmap icon_; |
| - DISALLOW_COPY_AND_ASSIGN(ExtensionUninstallDialog); |
| + DISALLOW_COPY_AND_ASSIGN(ExtensionUninstallUI); |
| }; |
| -#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_ |
| +#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_UI_H_ |