| 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 const std::string& target_language, | 193 const std::string& target_language, |
| 194 TranslateErrors::Type error_type, | 194 TranslateErrors::Type error_type, |
| 195 bool triggered_from_menu); | 195 bool triggered_from_menu); |
| 196 | 196 |
| 197 private: | 197 private: |
| 198 friend class TranslationInfoBarTest; | 198 friend class TranslationInfoBarTest; |
| 199 typedef std::pair<std::string, base::string16> LanguageNamePair; | 199 typedef std::pair<std::string, base::string16> LanguageNamePair; |
| 200 | 200 |
| 201 // InfoBarDelegate: | 201 // InfoBarDelegate: |
| 202 Type GetInfoBarType() const override; | 202 Type GetInfoBarType() const override; |
| 203 std::string GetIdentifier() const override; |
| 203 int GetIconId() const override; | 204 int GetIconId() const override; |
| 204 void InfoBarDismissed() override; | 205 void InfoBarDismissed() override; |
| 205 TranslateInfoBarDelegate* AsTranslateInfoBarDelegate() override; | 206 TranslateInfoBarDelegate* AsTranslateInfoBarDelegate() override; |
| 206 | 207 |
| 207 bool is_off_the_record_; | 208 bool is_off_the_record_; |
| 208 translate::TranslateStep step_; | 209 translate::TranslateStep step_; |
| 209 | 210 |
| 210 // The type of fading animation if any that should be used when showing this | 211 // The type of fading animation if any that should be used when showing this |
| 211 // infobar. | 212 // infobar. |
| 212 BackgroundAnimationType background_animation_; | 213 BackgroundAnimationType background_animation_; |
| 213 | 214 |
| 214 TranslateUIDelegate ui_delegate_; | 215 TranslateUIDelegate ui_delegate_; |
| 215 base::WeakPtr<TranslateManager> translate_manager_; | 216 base::WeakPtr<TranslateManager> translate_manager_; |
| 216 | 217 |
| 217 // The error that occurred when trying to translate (NONE if no error). | 218 // The error that occurred when trying to translate (NONE if no error). |
| 218 TranslateErrors::Type error_type_; | 219 TranslateErrors::Type error_type_; |
| 219 | 220 |
| 220 // The translation related preferences. | 221 // The translation related preferences. |
| 221 scoped_ptr<TranslatePrefs> prefs_; | 222 scoped_ptr<TranslatePrefs> prefs_; |
| 222 | 223 |
| 223 // Whether the translation was triggered via a menu click vs automatically | 224 // Whether the translation was triggered via a menu click vs automatically |
| 224 // (due to language detection, preferences...) | 225 // (due to language detection, preferences...) |
| 225 bool triggered_from_menu_; | 226 bool triggered_from_menu_; |
| 226 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); | 227 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); |
| 227 }; | 228 }; |
| 228 | 229 |
| 229 } // namespace translate | 230 } // namespace translate |
| 230 | 231 |
| 231 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_ | 232 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_ |
| OLD | NEW |