Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: components/translate/core/browser/translate_infobar_delegate.h

Issue 922953002: Minor infobar cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resync Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 const std::string& original_language, 190 const std::string& original_language,
191 const std::string& target_language, 191 const std::string& target_language,
192 TranslateErrors::Type error_type, 192 TranslateErrors::Type error_type,
193 bool triggered_from_menu); 193 bool triggered_from_menu);
194 194
195 private: 195 private:
196 friend class TranslationInfoBarTest; 196 friend class TranslationInfoBarTest;
197 typedef std::pair<std::string, base::string16> LanguageNamePair; 197 typedef std::pair<std::string, base::string16> LanguageNamePair;
198 198
199 // InfoBarDelegate: 199 // InfoBarDelegate:
200 Type GetInfoBarType() const override;
201 int GetIconID() const override;
202 bool ShouldExpire(const NavigationDetails& details) const override;
200 void InfoBarDismissed() override; 203 void InfoBarDismissed() override;
201 int GetIconID() const override;
202 infobars::InfoBarDelegate::Type GetInfoBarType() const override;
203 bool ShouldExpire(const NavigationDetails& details) const override;
204 TranslateInfoBarDelegate* AsTranslateInfoBarDelegate() override; 204 TranslateInfoBarDelegate* AsTranslateInfoBarDelegate() override;
205 205
206 bool is_off_the_record_; 206 bool is_off_the_record_;
207 translate::TranslateStep step_; 207 translate::TranslateStep step_;
208 208
209 // The type of fading animation if any that should be used when showing this 209 // The type of fading animation if any that should be used when showing this
210 // infobar. 210 // infobar.
211 BackgroundAnimationType background_animation_; 211 BackgroundAnimationType background_animation_;
212 212
213 TranslateUIDelegate ui_delegate_; 213 TranslateUIDelegate ui_delegate_;
214 base::WeakPtr<TranslateManager> translate_manager_; 214 base::WeakPtr<TranslateManager> translate_manager_;
215 215
216 // The error that occurred when trying to translate (NONE if no error). 216 // The error that occurred when trying to translate (NONE if no error).
217 TranslateErrors::Type error_type_; 217 TranslateErrors::Type error_type_;
218 218
219 // The translation related preferences. 219 // The translation related preferences.
220 scoped_ptr<TranslatePrefs> prefs_; 220 scoped_ptr<TranslatePrefs> prefs_;
221 221
222 // Whether the translation was triggered via a menu click vs automatically 222 // Whether the translation was triggered via a menu click vs automatically
223 // (due to language detection, preferences...) 223 // (due to language detection, preferences...)
224 bool triggered_from_menu_; 224 bool triggered_from_menu_;
225 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); 225 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate);
226 }; 226 };
227 227
228 } // namespace translate 228 } // namespace translate
229 229
230 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_ 230 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698