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

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

Issue 230453004: Remove InfoBarDelegate::web_contents() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile Created 6 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 | Annotate | Revision Log
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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 bool ShouldShowMessageInfoBarButton(); 137 bool ShouldShowMessageInfoBarButton();
138 138
139 // Called by the before translate infobar to figure-out if it should show 139 // Called by the before translate infobar to figure-out if it should show
140 // an extra shortcut to let the user black-list/white-list that language 140 // an extra shortcut to let the user black-list/white-list that language
141 // (based on how many times the user accepted/declined translation). 141 // (based on how many times the user accepted/declined translation).
142 // The shortcut itself is platform specific, it can be a button or a new bar 142 // The shortcut itself is platform specific, it can be a button or a new bar
143 // for example. 143 // for example.
144 bool ShouldShowNeverTranslateShortcut(); 144 bool ShouldShowNeverTranslateShortcut();
145 bool ShouldShowAlwaysTranslateShortcut(); 145 bool ShouldShowAlwaysTranslateShortcut();
146 146
147 // Returns the WebContents associated with the TranslateInfoBarDelegate.
148 content::WebContents* GetWebContents();
149
147 // Convenience method that returns the displayable language name for 150 // Convenience method that returns the displayable language name for
148 // |language_code| in the current application locale. 151 // |language_code| in the current application locale.
149 static base::string16 GetLanguageDisplayableName( 152 static base::string16 GetLanguageDisplayableName(
150 const std::string& language_code); 153 const std::string& language_code);
151 154
152 // Adds the strings that should be displayed in the after translate infobar to 155 // Adds the strings that should be displayed in the after translate infobar to
153 // |strings|. If |autodetermined_source_language| is false, the text in that 156 // |strings|. If |autodetermined_source_language| is false, the text in that
154 // infobar is: 157 // infobar is:
155 // "The page has been translated from <lang1> to <lang2>." 158 // "The page has been translated from <lang1> to <lang2>."
156 // Otherwise: 159 // Otherwise:
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // The translation related preferences. 207 // The translation related preferences.
205 scoped_ptr<TranslatePrefs> prefs_; 208 scoped_ptr<TranslatePrefs> prefs_;
206 209
207 // Whether the translation was triggered via a menu click vs automatically 210 // Whether the translation was triggered via a menu click vs automatically
208 // (due to language detection, preferences...) 211 // (due to language detection, preferences...)
209 bool triggered_from_menu_; 212 bool triggered_from_menu_;
210 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); 213 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate);
211 }; 214 };
212 215
213 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ 216 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/translate/options_menu_model.cc ('k') | chrome/browser/translate/translate_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698