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

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: 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_dialog.h
diff --git a/chrome/browser/extensions/extension_install_dialog.h b/chrome/browser/extensions/extension_install_dialog.h
index bc4e85248b09fd1d74ab1325ea958279ea9cd5d6..d7d73f2a1f56817f7caa68c0e7dd1a6489444726 100644
--- a/chrome/browser/extensions/extension_install_dialog.h
+++ b/chrome/browser/extensions/extension_install_dialog.h
@@ -11,20 +11,24 @@
#include "base/string16.h"
#include "chrome/browser/extensions/extension_install_prompt.h"
-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> {
Aaron Boodman 2012/10/11 02:42:03 RefCounted is a design smell. Why does this need t
sail 2012/10/11 02:46:58 So if this isn't refcounted then it's not clear ho
+ public:
+ ExtensionInstallDialog();
Aaron Boodman 2012/10/11 02:42:03 Make this protected.
+
+ virtual void ShowExtensionInstallDialog(
+ gfx::NativeWindow parent,
+ content::PageNavigator* navigator,
+ ExtensionInstallPrompt::Delegate* delegate,
+ const ExtensionInstallPrompt::Prompt& prompt) = 0;
+
+ // The implementations of this function are platform-specific.
+ static scoped_refptr<ExtensionInstallDialog> CreateDefaultImpl();
+
+ protected:
+ friend class base::RefCounted<ExtensionInstallDialog>;
+ virtual ~ExtensionInstallDialog();
+
+ DISALLOW_COPY_AND_ASSIGN(ExtensionInstallDialog);
+};
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_DIALOG_H_
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.cc ('k') | chrome/browser/extensions/extension_install_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698