diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-09 20:52:48 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-09 20:52:48 +0000 |
commit | 47e4c8793c51d873957c3b6329d020c99f83d1d7 (patch) | |
tree | 7f90483b47327021110fcbbe2d907c3cb8c2e343 /chrome/browser/extensions/theme_installed_infobar_delegate.h | |
parent | c10d60b4194cab3f68da71e0270647c02d000146 (diff) | |
download | chromium_src-47e4c8793c51d873957c3b6329d020c99f83d1d7.zip chromium_src-47e4c8793c51d873957c3b6329d020c99f83d1d7.tar.gz chromium_src-47e4c8793c51d873957c3b6329d020c99f83d1d7.tar.bz2 |
Reland: Rename ThemePreviewInfobarDelegate to
ThemeInstalledInfoBarDelegate
Contributed by Thiago Farina <tfarina@gmail.com>
TBR=rafaelw@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28595 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/theme_installed_infobar_delegate.h')
-rw-r--r-- | chrome/browser/extensions/theme_installed_infobar_delegate.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/chrome/browser/extensions/theme_installed_infobar_delegate.h b/chrome/browser/extensions/theme_installed_infobar_delegate.h new file mode 100644 index 0000000..594764a --- /dev/null +++ b/chrome/browser/extensions/theme_installed_infobar_delegate.h @@ -0,0 +1,38 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_VIEWS_EXTENSIONS_THEME_INSTALLED_INFOBAR_DELEGATE_H_ +#define CHROME_BROWSER_VIEWS_EXTENSIONS_THEME_INSTALLED_INFOBAR_DELEGATE_H_ + +#include "chrome/browser/tab_contents/infobar_delegate.h" + +class SkBitmap; +class TabContents; + +// When a user installs a theme, we display it immediately, but provide an +// infobar allowing them to cancel. +class ThemeInstalledInfoBarDelegate : public ConfirmInfoBarDelegate { + public: + ThemeInstalledInfoBarDelegate(TabContents* tab_contents, + const std::string& name, + const std::string& previous_theme); + virtual void InfoBarClosed(); + virtual std::wstring GetMessageText() const; + virtual SkBitmap* GetIcon() const; + virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate(); + virtual int GetButtons() const; + virtual std::wstring GetButtonLabel( + ConfirmInfoBarDelegate::InfoBarButton button) const; + virtual bool Cancel(); + + protected: + Profile* profile() { return profile_; } + + private: + Profile* profile_; + std::string name_; // name of theme to install + std::string previous_theme_id_; // used to undo theme install +}; + +#endif // CHROME_BROWSER_VIEWS_EXTENSIONS_THEME_INSTALLED_INFOBAR_DELEGATE_H_ |