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

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

Issue 1632953002: Change the TranslateDeclined() to only count decline if the explicit_closed is set to true (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ng build breakage Created 4 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_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 <string> 10 #include <string>
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // Returns the displayable name for the language at |index|. 81 // Returns the displayable name for the language at |index|.
82 base::string16 GetLanguageNameAt(size_t index) const; 82 base::string16 GetLanguageNameAt(size_t index) const;
83 83
84 // Starts translating the current page. 84 // Starts translating the current page.
85 void Translate(); 85 void Translate();
86 86
87 // Reverts translation. 87 // Reverts translation.
88 void RevertTranslation(); 88 void RevertTranslation();
89 89
90 // Processes when the user declines translation. 90 // Processes when the user declines translation.
91 // The function name is not accurate. It only means the user did not take
92 // affirmative action after the translation ui show up. The user either
93 // actively decline the translation or ignore the prompt of translation.
94 // Pass explicitly_closed as true if user explicityly decline the
groby-ooo-7-16 2016/01/28 21:17:28 nit: |explicitly_closed|, please - here and elsewh
ftang 2016/01/28 22:37:21 Done.
95 // translation.
96 // Pass explicitly_closed as false if the translation UI is dismissed
97 // implicit by some user actions which ignore the translation UI,
98 // such as switch to a new tab/window or navigate to another page by
99 // click a link.
91 void TranslationDeclined(bool explicitly_closed); 100 void TranslationDeclined(bool explicitly_closed);
92 101
93 // Returns true if the current language is blocked. 102 // Returns true if the current language is blocked.
94 bool IsLanguageBlocked(); 103 bool IsLanguageBlocked();
95 104
96 // Sets the value if the current language is blocked. 105 // Sets the value if the current language is blocked.
97 void SetLanguageBlocked(bool value); 106 void SetLanguageBlocked(bool value);
98 107
99 // Returns true if the current webpage is blacklisted. 108 // Returns true if the current webpage is blacklisted.
100 bool IsSiteBlacklisted(); 109 bool IsSiteBlacklisted();
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 149
141 // The translation related preferences. 150 // The translation related preferences.
142 scoped_ptr<TranslatePrefs> prefs_; 151 scoped_ptr<TranslatePrefs> prefs_;
143 152
144 DISALLOW_COPY_AND_ASSIGN(TranslateUIDelegate); 153 DISALLOW_COPY_AND_ASSIGN(TranslateUIDelegate);
145 }; 154 };
146 155
147 } // namespace translate 156 } // namespace translate
148 157
149 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_UI_DELEGATE_H_ 158 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_UI_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698