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

Unified Diff: chrome/browser/extensions/theme_installed_infobar_delegate.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/extensions/theme_installed_infobar_delegate.h
===================================================================
--- chrome/browser/extensions/theme_installed_infobar_delegate.h (revision 175396)
+++ chrome/browser/extensions/theme_installed_infobar_delegate.h (working copy)
@@ -14,6 +14,7 @@
class ExtensionService;
class InfoBarService;
+class Profile;
class ThemeService;
namespace extensions {
@@ -25,27 +26,29 @@
class ThemeInstalledInfoBarDelegate : public ConfirmInfoBarDelegate,
public content::NotificationObserver {
public:
+ // Creates a theme installed delegate and adds it to the last active tab on
+ // |profile|.
+ static void Create(const extensions::Extension* new_theme,
+ Profile* profile,
+ const std::string& previous_theme_id,
+ bool previous_using_native_theme);
+
+ protected:
+ ThemeService* theme_service() { return theme_service_; }
+
+ // ConfirmInfoBarDelegate:
+ virtual bool Cancel() OVERRIDE;
+
+ private:
ThemeInstalledInfoBarDelegate(InfoBarService* infobar_service,
ExtensionService* extension_service,
ThemeService* theme_service,
const extensions::Extension* new_theme,
const std::string& previous_theme_id,
bool previous_using_native_theme);
-
- // Returns true if the given theme is the same as the one associated with this
- // info bar.
- bool MatchesTheme(const extensions::Extension* theme) const;
-
- protected:
virtual ~ThemeInstalledInfoBarDelegate();
- ThemeService* theme_service() { return theme_service_; }
-
// ConfirmInfoBarDelegate:
- virtual bool Cancel() OVERRIDE;
-
- private:
- // ConfirmInfoBarDelegate:
virtual gfx::Image* GetIcon() const OVERRIDE;
virtual Type GetInfoBarType() const OVERRIDE;
virtual ThemeInstalledInfoBarDelegate*

Powered by Google App Engine
This is Rietveld 408576698