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