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

Unified Diff: chrome/browser/translate/translate_manager.cc

Issue 9030010: Move most of the remaining users of WebContentsObserver::tab_contents() to use web_contents(). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/translate/translate_manager.h ('k') | chrome/browser/translate/translate_tab_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/translate/translate_manager.cc
===================================================================
--- chrome/browser/translate/translate_manager.cc (revision 115777)
+++ chrome/browser/translate/translate_manager.cc (working copy)
@@ -302,7 +302,7 @@
break;
}
case chrome::NOTIFICATION_TAB_LANGUAGE_DETERMINED: {
- TabContents* tab = content::Source<TabContents>(source).ptr();
+ WebContents* tab = content::Source<WebContents>(source).ptr();
// We may get this notifications multiple times. Make sure to translate
// only once.
TabContentsWrapper* wrapper =
@@ -325,7 +325,7 @@
// Only add translate infobar if it doesn't exist; if it already exists,
// just update the state, the actual infobar would have received the same
// notification and update the visual display accordingly.
- TabContents* tab = content::Source<TabContents>(source).ptr();
+ WebContents* tab = content::Source<WebContents>(source).ptr();
PageTranslatedDetails* page_translated_details =
content::Details<PageTranslatedDetails>(details).ptr();
PageTranslated(tab, page_translated_details);
@@ -440,7 +440,7 @@
}
// static
-bool TranslateManager::IsShowingTranslateInfobar(TabContents* tab) {
+bool TranslateManager::IsShowingTranslateInfobar(WebContents* tab) {
return GetTranslateInfoBarDelegate(tab) != NULL;
}
@@ -456,7 +456,7 @@
content::NotificationService::AllSources());
}
-void TranslateManager::InitiateTranslation(TabContents* tab,
+void TranslateManager::InitiateTranslation(WebContents* tab,
const std::string& page_lang) {
Profile* profile = Profile::FromBrowserContext(tab->GetBrowserContext());
PrefService* prefs = profile->GetOriginalProfile()->GetPrefs();
@@ -649,7 +649,7 @@
translate_script, source_lang, target_lang));
}
-void TranslateManager::PageTranslated(TabContents* tab,
+void TranslateManager::PageTranslated(WebContents* tab,
PageTranslatedDetails* details) {
TabContentsWrapper* wrapper =
TabContentsWrapper::GetCurrentWrapperForContents(tab);
@@ -681,7 +681,7 @@
ShowInfoBar(tab, infobar);
}
-bool TranslateManager::IsAcceptLanguage(TabContents* tab,
+bool TranslateManager::IsAcceptLanguage(WebContents* tab,
const std::string& language) {
Profile* profile = Profile::FromBrowserContext(tab->GetBrowserContext());
profile = profile->GetOriginalProfile();
« no previous file with comments | « chrome/browser/translate/translate_manager.h ('k') | chrome/browser/translate/translate_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698