OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_ | 5 #ifndef COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_ |
6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_ | 6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 const std::string& original_language, | 185 const std::string& original_language, |
186 const std::string& target_language, | 186 const std::string& target_language, |
187 TranslateErrors::Type error_type, | 187 TranslateErrors::Type error_type, |
188 bool triggered_from_menu); | 188 bool triggered_from_menu); |
189 | 189 |
190 private: | 190 private: |
191 friend class TranslationInfoBarTest; | 191 friend class TranslationInfoBarTest; |
192 typedef std::pair<std::string, base::string16> LanguageNamePair; | 192 typedef std::pair<std::string, base::string16> LanguageNamePair; |
193 | 193 |
194 // InfoBarDelegate: | 194 // InfoBarDelegate: |
195 virtual void InfoBarDismissed() OVERRIDE; | 195 virtual void InfoBarDismissed() override; |
196 virtual int GetIconID() const OVERRIDE; | 196 virtual int GetIconID() const override; |
197 virtual infobars::InfoBarDelegate::Type GetInfoBarType() const OVERRIDE; | 197 virtual infobars::InfoBarDelegate::Type GetInfoBarType() const override; |
198 virtual bool ShouldExpire(const NavigationDetails& details) const OVERRIDE; | 198 virtual bool ShouldExpire(const NavigationDetails& details) const override; |
199 virtual TranslateInfoBarDelegate* AsTranslateInfoBarDelegate() OVERRIDE; | 199 virtual TranslateInfoBarDelegate* AsTranslateInfoBarDelegate() override; |
200 | 200 |
201 bool is_off_the_record_; | 201 bool is_off_the_record_; |
202 translate::TranslateStep step_; | 202 translate::TranslateStep step_; |
203 | 203 |
204 // The type of fading animation if any that should be used when showing this | 204 // The type of fading animation if any that should be used when showing this |
205 // infobar. | 205 // infobar. |
206 BackgroundAnimationType background_animation_; | 206 BackgroundAnimationType background_animation_; |
207 | 207 |
208 TranslateUIDelegate ui_delegate_; | 208 TranslateUIDelegate ui_delegate_; |
209 base::WeakPtr<TranslateManager> translate_manager_; | 209 base::WeakPtr<TranslateManager> translate_manager_; |
210 | 210 |
211 // The error that occurred when trying to translate (NONE if no error). | 211 // The error that occurred when trying to translate (NONE if no error). |
212 TranslateErrors::Type error_type_; | 212 TranslateErrors::Type error_type_; |
213 | 213 |
214 // The translation related preferences. | 214 // The translation related preferences. |
215 scoped_ptr<TranslatePrefs> prefs_; | 215 scoped_ptr<TranslatePrefs> prefs_; |
216 | 216 |
217 // Whether the translation was triggered via a menu click vs automatically | 217 // Whether the translation was triggered via a menu click vs automatically |
218 // (due to language detection, preferences...) | 218 // (due to language detection, preferences...) |
219 bool triggered_from_menu_; | 219 bool triggered_from_menu_; |
220 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); | 220 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); |
221 }; | 221 }; |
222 | 222 |
223 } // namespace translate | 223 } // namespace translate |
224 | 224 |
225 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_ | 225 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_ |
OLD | NEW |