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

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

Issue 809333003: Upstream //ios/chrome/browser/translate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 5 years, 11 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 bool ShouldShowMessageInfoBarButton(); 149 bool ShouldShowMessageInfoBarButton();
150 150
151 // Called by the before translate infobar to figure-out if it should show 151 // Called by the before translate infobar to figure-out if it should show
152 // an extra shortcut to let the user black-list/white-list that language 152 // an extra shortcut to let the user black-list/white-list that language
153 // (based on how many times the user accepted/declined translation). 153 // (based on how many times the user accepted/declined translation).
154 // The shortcut itself is platform specific, it can be a button or a new bar 154 // The shortcut itself is platform specific, it can be a button or a new bar
155 // for example. 155 // for example.
156 bool ShouldShowNeverTranslateShortcut(); 156 bool ShouldShowNeverTranslateShortcut();
157 bool ShouldShowAlwaysTranslateShortcut(); 157 bool ShouldShowAlwaysTranslateShortcut();
158 158
159 #if defined(OS_IOS)
160 // Shows the Infobar offering to never translate the language or the site.
161 void ShowNeverTranslateInfobar();
162 #endif
163
159 // Adds the strings that should be displayed in the after translate infobar to 164 // Adds the strings that should be displayed in the after translate infobar to
160 // |strings|. If |autodetermined_source_language| is false, the text in that 165 // |strings|. If |autodetermined_source_language| is false, the text in that
161 // infobar is: 166 // infobar is:
162 // "The page has been translated from <lang1> to <lang2>." 167 // "The page has been translated from <lang1> to <lang2>."
163 // Otherwise: 168 // Otherwise:
164 // "The page has been translated to <lang1>." 169 // "The page has been translated to <lang1>."
165 // Because <lang1>, or <lang1> and <lang2> are displayed in menu buttons, the 170 // Because <lang1>, or <lang1> and <lang2> are displayed in menu buttons, the
166 // text is split in 2 or 3 chunks. |swap_languages| is set to true if 171 // text is split in 2 or 3 chunks. |swap_languages| is set to true if
167 // |autodetermined_source_language| is false, and <lang1> and <lang2> 172 // |autodetermined_source_language| is false, and <lang1> and <lang2>
168 // should be inverted (some languages express the sentense as "The page has 173 // should be inverted (some languages express the sentense as "The page has
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 221
217 // Whether the translation was triggered via a menu click vs automatically 222 // Whether the translation was triggered via a menu click vs automatically
218 // (due to language detection, preferences...) 223 // (due to language detection, preferences...)
219 bool triggered_from_menu_; 224 bool triggered_from_menu_;
220 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); 225 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate);
221 }; 226 };
222 227
223 } // namespace translate 228 } // namespace translate
224 229
225 #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