| 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; | 10 class Extension; |
| 11 class ExtensionsService; | 11 class ExtensionsService; |
| 12 class SkBitmap; | 12 class SkBitmap; |
| 13 class TabContents; | 13 class TabContents; |
| 14 | 14 |
| 15 // When a user installs a theme, we display it immediately, but provide an | 15 // When a user installs a theme, we display it immediately, but provide an |
| 16 // infobar allowing them to cancel. | 16 // infobar allowing them to cancel. |
| 17 class ThemePreviewInfobarDelegate : public ConfirmInfoBarDelegate { | 17 class ThemePreviewInfobarDelegate : public ConfirmInfoBarDelegate { |
| 18 public: | 18 public: |
| 19 ThemePreviewInfobarDelegate(TabContents* tab_contents, | 19 ThemePreviewInfobarDelegate(TabContents* tab_contents, |
| 20 const std::string& name); | 20 const std::string& name); |
| 21 virtual bool EqualsDelegate(InfoBarDelegate* delegate) const; | |
| 22 virtual void InfoBarClosed(); | 21 virtual void InfoBarClosed(); |
| 23 virtual std::wstring GetMessageText() const; | 22 virtual std::wstring GetMessageText() const; |
| 24 virtual SkBitmap* GetIcon() const; | 23 virtual SkBitmap* GetIcon() const; |
| 25 virtual ThemePreviewInfobarDelegate* AsThemePreviewInfobarDelegate(); | 24 virtual ThemePreviewInfobarDelegate* AsThemePreviewInfobarDelegate(); |
| 26 virtual int GetButtons() const; | 25 virtual int GetButtons() const; |
| 27 virtual std::wstring GetButtonLabel( | 26 virtual std::wstring GetButtonLabel( |
| 28 ConfirmInfoBarDelegate::InfoBarButton button) const; | 27 ConfirmInfoBarDelegate::InfoBarButton button) const; |
| 29 virtual bool Cancel(); | 28 virtual bool Cancel(); |
| 30 | 29 |
| 31 private: | 30 private: |
| 32 Profile* profile_; | 31 Profile* profile_; |
| 33 std::string name_; // name of theme to install | 32 std::string name_; // name of theme to install |
| 34 }; | 33 }; |
| 35 | 34 |
| 36 #endif // CHROME_BROWSER_VIEWS_EXTENSIONS_THEME_PREVIEW_INFOBAR_DELEGATE_H_ | 35 #endif // CHROME_BROWSER_VIEWS_EXTENSIONS_THEME_PREVIEW_INFOBAR_DELEGATE_H_ |
| OLD | NEW |