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 086f21962bb06319580e642eacc199ca029f60bd..40bbd2a7043da5cc94976d611b1427c0d5193431 100644 |
--- a/chrome/browser/extensions/extension_uninstall_dialog.h |
+++ b/chrome/browser/extensions/extension_uninstall_dialog.h |
@@ -6,71 +6,27 @@ |
#define CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_ |
#pragma once |
-#include "base/basictypes.h" |
-#include "base/compiler_specific.h" |
-#include "chrome/browser/extensions/image_loading_tracker.h" |
-#include "third_party/skia/include/core/SkBitmap.h" |
+#include "chrome/browser/extensions/extension_uninstall_ui.h" |
-class MessageLoop; |
+class Extension; |
class Profile; |
+class SkBitmap; |
-class ExtensionUninstallDialog : public ImageLoadingTracker::Observer { |
+// The common base class for connecting the ExtensionUninstallUI to |
+// platform-specific UI. |
+class ExtensionUninstallDialog { |
public: |
- class Delegate { |
- public: |
- // We call this method to signal that the uninstallation should continue. |
- virtual void ExtensionDialogAccepted() = 0; |
- |
- // We call this method to signal that the uninstallation should stop. |
- virtual void ExtensionDialogCanceled() = 0; |
- |
- protected: |
- virtual ~Delegate() {} |
- }; |
- |
- explicit ExtensionUninstallDialog(Profile* profile); |
+ ExtensionUninstallDialog(Profile* profile, |
+ ExtensionUninstallUI::Delegate* delegate, |
+ const Extension* extension, |
+ SkBitmap* icon); |
virtual ~ExtensionUninstallDialog(); |
- // This is called by the extensions management page to verify whether the |
- // uninstallation should proceed. |
- // Starts the process of showing a confirmation UI, which is split into two. |
- // 1) Set off a 'load icon' task. |
- // 2) Handle the load icon response and show the UI (OnImageLoaded). |
- void ConfirmUninstall(Delegate* delegate, const Extension* extension); |
- |
- private: |
- // Creates an appropriate ExtensionUninstallDialog for the platform. |
- static void Show(Profile* profile, |
- Delegate* delegate, |
- const Extension* extension, |
- SkBitmap* icon); |
- |
- // 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. |
- void SetIcon(SkBitmap* icon); |
- |
- // ImageLoadingTracker::Observer: |
- virtual void OnImageLoaded(SkBitmap* image, |
- const ExtensionResource& resource, |
- int index) OVERRIDE; |
- |
+ protected: |
Profile* profile_; |
- MessageLoop* ui_loop_; |
- |
- // The delegate we will call Accepted/Canceled on after confirmation UI. |
- Delegate* delegate_; |
- |
- // The extension we are showing the UI for. |
+ ExtensionUninstallUI::Delegate* delegate_; |
const Extension* extension_; |
- |
- // Keeps track of extension images being loaded on the File thread for the |
- // purpose of showing the install UI. |
- ImageLoadingTracker tracker_; |
- |
- // The extensions icon. |
- SkBitmap icon_; |
- |
- DISALLOW_COPY_AND_ASSIGN(ExtensionUninstallDialog); |
+ SkBitmap* icon_; |
}; |
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_ |