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

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

Issue 11087071: Making ShowExtensionInstallDialog a callback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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_dialog.h
diff --git a/chrome/browser/extensions/extension_install_dialog.h b/chrome/browser/extensions/extension_install_dialog.h
index bc4e85248b09fd1d74ab1325ea958279ea9cd5d6..3f7cb9e22ddbdf488d151629cf0d13132cd408e2 100644
--- a/chrome/browser/extensions/extension_install_dialog.h
+++ b/chrome/browser/extensions/extension_install_dialog.h
@@ -15,16 +15,31 @@ namespace base {
class DictionaryValue;
}
-void ShowExtensionInstallDialog(gfx::NativeWindow parent,
- content::PageNavigator* navigator,
- ExtensionInstallPrompt::Delegate* delegate,
- const ExtensionInstallPrompt::Prompt& prompt);
-
-// The implementations of this function are platform-specific.
-void ShowExtensionInstallDialogImpl(
- gfx::NativeWindow parent,
- content::PageNavigator* navigator,
- ExtensionInstallPrompt::Delegate* delegate,
- const ExtensionInstallPrompt::Prompt& prompt);
+class ExtensionInstallDialog : public base::RefCounted<ExtensionInstallDialog> {
+ public:
+ ExtensionInstallDialog();
+
+ void ShowExtensionInstallDialog(
+ gfx::NativeWindow parent,
+ content::PageNavigator* navigator,
+ ExtensionInstallPrompt::Delegate* delegate,
+ const ExtensionInstallPrompt::Prompt& prompt);
+
+ // The implementations of this function are platform-specific.
+ static scoped_refptr<ExtensionInstallDialog> CreateDefaultImpl();
+
+ protected:
+ virtual void ShowExtensionInstallDialogImpl(
+ gfx::NativeWindow parent,
+ content::PageNavigator* navigator,
+ ExtensionInstallPrompt::Delegate* delegate,
+ const ExtensionInstallPrompt::Prompt& prompt) = 0;
+
+ private:
+ friend class base::RefCounted<ExtensionInstallDialog>;
+ virtual ~ExtensionInstallDialog();
+
+ DISALLOW_COPY_AND_ASSIGN(ExtensionInstallDialog);
+};
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_DIALOG_H_

Powered by Google App Engine
This is Rietveld 408576698