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

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

Issue 10010038: Do not show the install prompt for themes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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_ui.h
diff --git a/chrome/browser/extensions/extension_install_ui.h b/chrome/browser/extensions/extension_install_ui.h
index 35e3fe0c5cabf13a49c5e870f09dc59b48f0d88b..8578648a7ad8dc598065b30cb203466580b5af6f 100644
--- a/chrome/browser/extensions/extension_install_ui.h
+++ b/chrome/browser/extensions/extension_install_ui.h
@@ -25,6 +25,10 @@ class Profile;
class InfoBarDelegate;
class TabContentsWrapper;
+namespace base {
+class DictionaryValue;
+} // namespace base
+
namespace extensions {
class BundleInstaller;
} // namespace extensions
@@ -131,6 +135,15 @@ class ExtensionInstallUI : public ImageLoadingTracker::Observer {
virtual ~Delegate() {}
};
+ // Creates a dummy extension from the |manifest|, replacing the name and
+ // description with the localizations if provided.
+ static scoped_refptr<Extension> LocalizeExtensionForDisplay(
Yoyo Zhou 2012/04/20 15:38:14 I think GetLocalizedExtensionForDisplay would be c
jstritar 2012/04/20 16:18:27 Done.
+ const base::DictionaryValue* manifest,
+ const std::string& id,
+ const std::string& localized_name,
+ const std::string& localized_description,
+ std::string* error);
+
explicit ExtensionInstallUI(Profile* profile);
virtual ~ExtensionInstallUI();
@@ -147,6 +160,30 @@ class ExtensionInstallUI : public ImageLoadingTracker::Observer {
skip_post_install_ui_ = skip_ui;
}
+ // This is called by the bundle installer to verify whether the bundle
+ // should be installed.
+ //
+ // We *MUST* eventually call either Proceed() or Abort() on |delegate|.
+ virtual void ConfirmBundleInstall(extensions::BundleInstaller* bundle,
+ const ExtensionPermissionSet* permissions);
+
+ // This is called by the inline installer to verify whether the inline
+ // install from the webstore should proceed.
+ //
+ // We *MUST* eventually call either Proceed() or Abort() on |delegate|.
+ virtual void ConfirmInlineInstall(Delegate* delegate,
+ const Extension* extension,
+ SkBitmap* icon,
+ Prompt prompt);
+
+ // This is called by the installer to verify whether the installation from
+ // the webstore should proceed.
+ //
+ // We *MUST* eventually call either Proceed() or Abort() on |delegate|.
+ virtual void ConfirmWebstoreInstall(Delegate* delegate,
+ const Extension* extension,
+ const SkBitmap* icon);
+
// This is called by the installer to verify whether the installation should
// proceed. This is declared virtual for testing.
//
@@ -208,6 +245,9 @@ class ExtensionInstallUI : public ImageLoadingTracker::Observer {
// 2) Handle the load icon response and show the UI (OnImageLoaded).
void ShowConfirmation(PromptType prompt_type);
+ // Shows the actual UI (the icon should already be loaded).
+ void ShowDialog();
+
// Returns the delegate to control the browser's info bar. This is
// within its own function due to its platform-specific nature.
static InfoBarDelegate* GetNewThemeInstalledInfoBarDelegate(
@@ -229,12 +269,18 @@ class ExtensionInstallUI : public ImageLoadingTracker::Observer {
// The extension we are showing the UI for.
const Extension* extension_;
+ // The bundle we are showing the UI for, if type BUNDLE_INSTALL_PROMPT.
+ const extensions::BundleInstaller* bundle_;
+
// The permissions being prompted for.
scoped_refptr<const ExtensionPermissionSet> permissions_;
// The delegate we will call Proceed/Abort on after confirmation UI.
Delegate* delegate_;
+ // A pre-filled prompt.
+ Prompt prompt_;
Yoyo Zhou 2012/04/20 15:38:14 It seems like if this is sometimes present and som
jstritar 2012/04/20 16:18:27 I'd rather avoid managing the Prompt's life-cycle.
Yoyo Zhou 2012/04/20 17:19:12 Seems fine to me -- I mean, we were copying Prompt
+
// The type of prompt we are going to show.
PromptType prompt_type_;

Powered by Google App Engine
This is Rietveld 408576698