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

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

Issue 1923143003: Implement the 2016Q2 Translate UI designe spec out in (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add 200 icon png. remove unnecessary include in .cc file, remove unnecessary reset and remove expli… Created 4 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_UI_DELEGATE_H_ 5 #ifndef COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_UI_DELEGATE_H_
6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_UI_DELEGATE_H_ 6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_UI_DELEGATE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 void SetSiteBlacklist(bool value); 112 void SetSiteBlacklist(bool value);
113 113
114 // Returns true if the webpage in the current original language should be 114 // Returns true if the webpage in the current original language should be
115 // translated into the current target language automatically. 115 // translated into the current target language automatically.
116 bool ShouldAlwaysTranslate(); 116 bool ShouldAlwaysTranslate();
117 117
118 // Sets the value if the webpage in the current original language should be 118 // Sets the value if the webpage in the current original language should be
119 // translated into the current target language automatically. 119 // translated into the current target language automatically.
120 void SetAlwaysTranslate(bool value); 120 void SetAlwaysTranslate(bool value);
121 121
122 // Return true if "Always translate" should be checked by default in the
msw 2016/05/03 22:33:35 optional nit: copy the comment from translate_bubb
ftang 2016/05/03 23:55:42 Done.
123 // bubble UI.
124 bool ShouldAlwaysTranslateBeCheckedByDefault();
125
122 private: 126 private:
123 // Gets the host of the page being translated, or an empty string if no URL is 127 // Gets the host of the page being translated, or an empty string if no URL is
124 // associated with the current page. 128 // associated with the current page.
125 std::string GetPageHost(); 129 std::string GetPageHost();
126 130
127 TranslateDriver* translate_driver_; 131 TranslateDriver* translate_driver_;
128 base::WeakPtr<TranslateManager> translate_manager_; 132 base::WeakPtr<TranslateManager> translate_manager_;
129 133
130 // ISO code (en, fr...) -> displayable name in the current locale 134 // ISO code (en, fr...) -> displayable name in the current locale
131 typedef std::pair<std::string, base::string16> LanguageNamePair; 135 typedef std::pair<std::string, base::string16> LanguageNamePair;
(...skipping 17 matching lines...) Expand all
149 153
150 // The translation related preferences. 154 // The translation related preferences.
151 std::unique_ptr<TranslatePrefs> prefs_; 155 std::unique_ptr<TranslatePrefs> prefs_;
152 156
153 DISALLOW_COPY_AND_ASSIGN(TranslateUIDelegate); 157 DISALLOW_COPY_AND_ASSIGN(TranslateUIDelegate);
154 }; 158 };
155 159
156 } // namespace translate 160 } // namespace translate
157 161
158 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_UI_DELEGATE_H_ 162 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_UI_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698