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

Unified Diff: chrome/browser/plugins/plugin_infobar_delegates.h

Issue 11644059: Change infobar creation to use a public static Create() method on the infobar delegate classes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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/plugins/plugin_infobar_delegates.h
===================================================================
--- chrome/browser/plugins/plugin_infobar_delegates.h (revision 175396)
+++ chrome/browser/plugins/plugin_infobar_delegates.h (working copy)
@@ -53,12 +53,17 @@
// Infobar that's shown when a plug-in requires user authorization to run.
class UnauthorizedPluginInfoBarDelegate : public PluginInfoBarDelegate {
public:
+ // Creates an unauthorized plugin delegate and adds it to |infobar_service|.
+ static void Create(InfoBarService* infobar_service,
+ HostContentSettingsMap* content_settings,
+ const string16& name,
+ const std::string& identifier);
+
+ private:
UnauthorizedPluginInfoBarDelegate(InfoBarService* infobar_service,
HostContentSettingsMap* content_settings,
const string16& name,
const std::string& identifier);
-
- private:
virtual ~UnauthorizedPluginInfoBarDelegate();
// PluginInfoBarDelegate:
@@ -80,12 +85,13 @@
class OutdatedPluginInfoBarDelegate : public PluginInfoBarDelegate,
public WeakPluginInstallerObserver {
public:
- static InfoBarDelegate* Create(content::WebContents* web_contents,
- PluginInstaller* installer,
- scoped_ptr<PluginMetadata> metadata);
+ // Creates an outdated plugin delegate and adds it to |infobar_service|.
+ static void Create(InfoBarService* infobar_service,
+ PluginInstaller* installer,
+ scoped_ptr<PluginMetadata> metadata);
private:
- OutdatedPluginInfoBarDelegate(content::WebContents* web_contents,
+ OutdatedPluginInfoBarDelegate(InfoBarService* infobar_service,
PluginInstaller* installer,
scoped_ptr<PluginMetadata> metadata,
const string16& message);
@@ -131,14 +137,20 @@
// |installer|. When the user accepts, |callback| is called.
// During installation of the plug-in, the infobar will change to reflect the
// installation state.
- static InfoBarDelegate* Create(InfoBarService* infobar_service,
- PluginInstaller* installer,
- scoped_ptr<PluginMetadata> plugin_metadata,
- const InstallCallback& callback);
+ static void Create(InfoBarService* infobar_service,
+ PluginInstaller* installer,
+ scoped_ptr<PluginMetadata> plugin_metadata,
+ const InstallCallback& callback);
+ // Replaces |infobar|, which must currently be owned, with an infobar asking
+ // the user to install or update a particular plugin.
+ static void Replace(InfoBarDelegate* infobar,
+ PluginInstaller* installer,
+ scoped_ptr<PluginMetadata> metadata,
+ bool new_install,
+ const string16& message);
+
private:
- friend class OutdatedPluginInfoBarDelegate;
-
PluginInstallerInfoBarDelegate(InfoBarService* infobar_service,
PluginInstaller* installer,
scoped_ptr<PluginMetadata> plugin_metadata,
@@ -193,11 +205,16 @@
DESKTOP_MODE_REQUIRED,
};
+ // Creates a metro mode infobar and delegate and adds the infobar to
+ // |infobar_service|.
+ static void Create(InfoBarService* infobar_service,
+ Mode mode,
+ const string16& name);
+
+ private:
PluginMetroModeInfoBarDelegate(InfoBarService* infobar_service,
Mode mode,
const string16& name);
-
- private:
virtual ~PluginMetroModeInfoBarDelegate();
// ConfirmInfoBarDelegate:
« no previous file with comments | « chrome/browser/pepper_broker_infobar_delegate.cc ('k') | chrome/browser/plugins/plugin_infobar_delegates.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698