| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_VIEWS_EXTENSIONS_THEME_PREVIEW_INFOBAR_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_EXTENSIONS_THEME_PREVIEW_INFOBAR_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_VIEWS_EXTENSIONS_THEME_PREVIEW_INFOBAR_DELEGATE_H_ | 6 #define CHROME_BROWSER_VIEWS_EXTENSIONS_THEME_PREVIEW_INFOBAR_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/tab_contents/infobar_delegate.h" | 8 #include "chrome/browser/tab_contents/infobar_delegate.h" |
| 9 | 9 |
| 10 class Extension; | |
| 11 class ExtensionsService; | |
| 12 class SkBitmap; | 10 class SkBitmap; |
| 13 class TabContents; | 11 class TabContents; |
| 14 | 12 |
| 15 // When a user installs a theme, we display it immediately, but provide an | 13 // When a user installs a theme, we display it immediately, but provide an |
| 16 // infobar allowing them to cancel. | 14 // infobar allowing them to cancel. |
| 17 // | 15 // |
| 18 // TODO(aa): Rename this to ThemeInstalledInfoBarDelegate, since it isn't | 16 // TODO(aa): Rename this to ThemeInstalledInfoBarDelegate, since it isn't |
| 19 // used for previewing anymore. | 17 // used for previewing anymore. |
| 20 class ThemePreviewInfobarDelegate : public ConfirmInfoBarDelegate { | 18 class ThemePreviewInfobarDelegate : public ConfirmInfoBarDelegate { |
| 21 public: | 19 public: |
| 22 ThemePreviewInfobarDelegate(TabContents* tab_contents, | 20 ThemePreviewInfobarDelegate(TabContents* tab_contents, |
| 23 const std::string& name); | 21 const std::string& name, |
| 22 const std::string& previous_theme); |
| 24 virtual void InfoBarClosed(); | 23 virtual void InfoBarClosed(); |
| 25 virtual std::wstring GetMessageText() const; | 24 virtual std::wstring GetMessageText() const; |
| 26 virtual SkBitmap* GetIcon() const; | 25 virtual SkBitmap* GetIcon() const; |
| 27 virtual ThemePreviewInfobarDelegate* AsThemePreviewInfobarDelegate(); | 26 virtual ThemePreviewInfobarDelegate* AsThemePreviewInfobarDelegate(); |
| 28 virtual int GetButtons() const; | 27 virtual int GetButtons() const; |
| 29 virtual std::wstring GetButtonLabel( | 28 virtual std::wstring GetButtonLabel( |
| 30 ConfirmInfoBarDelegate::InfoBarButton button) const; | 29 ConfirmInfoBarDelegate::InfoBarButton button) const; |
| 31 virtual bool Cancel(); | 30 virtual bool Cancel(); |
| 32 | 31 |
| 33 private: | 32 private: |
| 34 Profile* profile_; | 33 Profile* profile_; |
| 35 std::string name_; // name of theme to install | 34 std::string name_; // name of theme to install |
| 35 std::string previous_theme_id_; // used to undo theme install |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 #endif // CHROME_BROWSER_VIEWS_EXTENSIONS_THEME_PREVIEW_INFOBAR_DELEGATE_H_ | 38 #endif // CHROME_BROWSER_VIEWS_EXTENSIONS_THEME_PREVIEW_INFOBAR_DELEGATE_H_ |
| OLD | NEW |