Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(648)

Unified Diff: chrome/browser/extensions/extension_install_prompt.h

Issue 11087071: Making ShowExtensionInstallDialog a callback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_install_prompt.h
diff --git a/chrome/browser/extensions/extension_install_prompt.h b/chrome/browser/extensions/extension_install_prompt.h
index 480dfd062caac34e19bbfd38b701a695ab08afc6..4917b052e4469f4102ae6869726da6f4ba1719aa 100644
--- a/chrome/browser/extensions/extension_install_prompt.h
+++ b/chrome/browser/extensions/extension_install_prompt.h
@@ -21,6 +21,7 @@
#include "ui/gfx/native_widget_types.h"
class Browser;
+class ExtensionInstallDialog;
class ExtensionInstallUI;
class InfoBarDelegate;
class MessageLoop;
@@ -196,19 +197,23 @@ class ExtensionInstallPrompt : public ImageLoadingTracker::Observer,
const Prompt& prompt);
// This is called by the installer to verify whether the installation from
- // the webstore should proceed.
+ // the webstore should proceed. |dialog| is optional and can be NULL.
//
// We *MUST* eventually call either Proceed() or Abort() on |delegate|.
- virtual void ConfirmWebstoreInstall(Delegate* delegate,
- const extensions::Extension* extension,
- const SkBitmap* icon);
+ virtual void ConfirmWebstoreInstall(
+ Delegate* delegate,
+ const extensions::Extension* extension,
+ const SkBitmap* icon,
+ scoped_refptr<ExtensionInstallDialog> dialog);
// This is called by the installer to verify whether the installation should
- // proceed. This is declared virtual for testing.
+ // proceed. This is declared virtual for testing. |dialog| is optional and
+ // can be NULL.
//
// We *MUST* eventually call either Proceed() or Abort() on |delegate|.
virtual void ConfirmInstall(Delegate* delegate,
- const extensions::Extension* extension);
+ const extensions::Extension* extension,
+ scoped_refptr<ExtensionInstallDialog> dialog);
// This is called by the app handler launcher to verify whether the app
// should be re-enabled. This is declared virtual for testing.
@@ -311,6 +316,9 @@ class ExtensionInstallPrompt : public ImageLoadingTracker::Observer,
// Keeps track of extension images being loaded on the File thread for the
// purpose of showing the install UI.
ImageLoadingTracker tracker_;
+
+ // Used to show the confirm dialog.
+ scoped_refptr<ExtensionInstallDialog> dialog_;
};
namespace chrome {

Powered by Google App Engine
This is Rietveld 408576698