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

Side by Side Diff: chrome/browser/translate/translate_infobar_delegate.h

Issue 14392011: [Translate] Expose whether the user is within a navigation session as part of the infobar delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ 6 #define CHROME_BROWSER_TRANSLATE_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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // several times). 131 // several times).
132 void AlwaysTranslatePageLanguage(); 132 void AlwaysTranslatePageLanguage();
133 void NeverTranslatePageLanguage(); 133 void NeverTranslatePageLanguage();
134 134
135 // The following methods are called by the infobar that displays the status 135 // The following methods are called by the infobar that displays the status
136 // while translating and also the one displaying the error message. 136 // while translating and also the one displaying the error message.
137 string16 GetMessageInfoBarText(); 137 string16 GetMessageInfoBarText();
138 string16 GetMessageInfoBarButtonText(); 138 string16 GetMessageInfoBarButtonText();
139 void MessageInfoBarButtonPressed(); 139 void MessageInfoBarButtonPressed();
140 bool ShouldShowMessageInfoBarButton(); 140 bool ShouldShowMessageInfoBarButton();
141 bool InTranslateNavigation();
141 142
142 // Called by the before translate infobar to figure-out if it should show 143 // Called by the before translate infobar to figure-out if it should show
143 // an extra button to let the user black-list/white-list that language (based 144 // an extra button to let the user black-list/white-list that language (based
144 // on how many times the user accepted/declined translation). 145 // on how many times the user accepted/declined translation).
145 bool ShouldShowNeverTranslateButton(); 146 bool ShouldShowNeverTranslateButton();
146 bool ShouldShowAlwaysTranslateButton(); 147 bool ShouldShowAlwaysTranslateButton();
147 148
148 // Sets this infobar background animation based on the previous infobar shown. 149 // Sets this infobar background animation based on the previous infobar shown.
149 // A fading background effect is used when transitioning from a normal state 150 // A fading background effect is used when transitioning from a normal state
150 // to an error state (and vice-versa). 151 // to an error state (and vice-versa).
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 // The error that occurred when trying to translate (NONE if no error). 217 // The error that occurred when trying to translate (NONE if no error).
217 TranslateErrors::Type error_type_; 218 TranslateErrors::Type error_type_;
218 219
219 // The translation related preferences. 220 // The translation related preferences.
220 TranslatePrefs prefs_; 221 TranslatePrefs prefs_;
221 222
222 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); 223 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate);
223 }; 224 };
224 225
225 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ 226 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698