| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ | 6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 TranslateErrors::Type error, | 152 TranslateErrors::Type error, |
| 153 TabContents* tab_contents, | 153 TabContents* tab_contents, |
| 154 const std::string& original_language, | 154 const std::string& original_language, |
| 155 const std::string& target_language); | 155 const std::string& target_language); |
| 156 Type type_; | 156 Type type_; |
| 157 | 157 |
| 158 private: | 158 private: |
| 159 typedef std::pair<std::string, string16> LanguageNamePair; | 159 typedef std::pair<std::string, string16> LanguageNamePair; |
| 160 | 160 |
| 161 // InfoBarDelegate: | 161 // InfoBarDelegate: |
| 162 virtual InfoBar* CreateInfoBar(); | 162 virtual InfoBar* CreateInfoBar() OVERRIDE; |
| 163 virtual void InfoBarDismissed(); | 163 virtual void InfoBarDismissed() OVERRIDE; |
| 164 virtual void InfoBarClosed(); | 164 virtual gfx::Image* GetIcon() const OVERRIDE; |
| 165 virtual gfx::Image* GetIcon() const; | 165 virtual InfoBarDelegate::Type GetInfoBarType() const OVERRIDE; |
| 166 virtual InfoBarDelegate::Type GetInfoBarType() const; | 166 virtual TranslateInfoBarDelegate* AsTranslateInfoBarDelegate() OVERRIDE; |
| 167 virtual TranslateInfoBarDelegate* AsTranslateInfoBarDelegate(); | |
| 168 | 167 |
| 169 // Gets the host of the page being translated, or an empty string if no URL is | 168 // Gets the host of the page being translated, or an empty string if no URL is |
| 170 // associated with the current page. | 169 // associated with the current page. |
| 171 std::string GetPageHost(); | 170 std::string GetPageHost(); |
| 172 | 171 |
| 173 // The type of fading animation if any that should be used when showing this | 172 // The type of fading animation if any that should be used when showing this |
| 174 // infobar. | 173 // infobar. |
| 175 BackgroundAnimationType background_animation_; | 174 BackgroundAnimationType background_animation_; |
| 176 | 175 |
| 177 TabContents* tab_contents_; | 176 TabContents* tab_contents_; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 201 // The current infobar view. | 200 // The current infobar view. |
| 202 TranslateInfoBarView* infobar_view_; | 201 TranslateInfoBarView* infobar_view_; |
| 203 | 202 |
| 204 // The translation related preferences. | 203 // The translation related preferences. |
| 205 TranslatePrefs prefs_; | 204 TranslatePrefs prefs_; |
| 206 | 205 |
| 207 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); | 206 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); |
| 208 }; | 207 }; |
| 209 | 208 |
| 210 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ | 209 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ |
| OLD | NEW |