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

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

Issue 1142153002: Simplify infobar expiry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android compile Created 5 years, 7 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
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; 200 Type GetInfoBarType() const override;
201 int GetIconID() const override; 201 int GetIconID() const override;
202 bool ShouldExpire(const NavigationDetails& details) const override;
203 void InfoBarDismissed() override; 202 void InfoBarDismissed() override;
204 TranslateInfoBarDelegate* AsTranslateInfoBarDelegate() override; 203 TranslateInfoBarDelegate* AsTranslateInfoBarDelegate() override;
205 204
206 bool is_off_the_record_; 205 bool is_off_the_record_;
207 translate::TranslateStep step_; 206 translate::TranslateStep step_;
208 207
209 // The type of fading animation if any that should be used when showing this 208 // The type of fading animation if any that should be used when showing this
210 // infobar. 209 // infobar.
211 BackgroundAnimationType background_animation_; 210 BackgroundAnimationType background_animation_;
212 211
213 TranslateUIDelegate ui_delegate_; 212 TranslateUIDelegate ui_delegate_;
214 base::WeakPtr<TranslateManager> translate_manager_; 213 base::WeakPtr<TranslateManager> translate_manager_;
215 214
216 // The error that occurred when trying to translate (NONE if no error). 215 // The error that occurred when trying to translate (NONE if no error).
217 TranslateErrors::Type error_type_; 216 TranslateErrors::Type error_type_;
218 217
219 // The translation related preferences. 218 // The translation related preferences.
220 scoped_ptr<TranslatePrefs> prefs_; 219 scoped_ptr<TranslatePrefs> prefs_;
221 220
222 // Whether the translation was triggered via a menu click vs automatically 221 // Whether the translation was triggered via a menu click vs automatically
223 // (due to language detection, preferences...) 222 // (due to language detection, preferences...)
224 bool triggered_from_menu_; 223 bool triggered_from_menu_;
225 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); 224 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate);
226 }; 225 };
227 226
228 } // namespace translate 227 } // namespace translate
229 228
230 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_ 229 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698