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

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

Issue 8956050: Rename TabContents::controller() to GetController and put it into the WebContents interface. (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
Index: chrome/browser/translate/translate_manager.cc
===================================================================
--- chrome/browser/translate/translate_manager.cc (revision 115228)
+++ chrome/browser/translate/translate_manager.cc (working copy)
@@ -400,7 +400,7 @@
// The tab went away while we were retrieving the script.
continue;
}
- NavigationEntry* entry = tab->controller().GetActiveEntry();
+ NavigationEntry* entry = tab->GetController().GetActiveEntry();
if (!entry || entry->page_id() != request.page_id) {
// We navigated away from the page the translation was triggered on.
continue;
@@ -466,7 +466,7 @@
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableTranslate))
return;
- NavigationEntry* entry = tab->controller().GetActiveEntry();
+ NavigationEntry* entry = tab->GetController().GetActiveEntry();
if (!entry) {
// This can happen for popups created with window.open("").
return;
@@ -551,7 +551,7 @@
void TranslateManager::TranslatePage(TabContents* tab_contents,
const std::string& source_lang,
const std::string& target_lang) {
- NavigationEntry* entry = tab_contents->controller().GetActiveEntry();
+ NavigationEntry* entry = tab_contents->GetController().GetActiveEntry();
if (!entry) {
NOTREACHED();
return;
@@ -583,7 +583,7 @@
}
void TranslateManager::RevertTranslation(TabContents* tab_contents) {
- NavigationEntry* entry = tab_contents->controller().GetActiveEntry();
+ NavigationEntry* entry = tab_contents->GetController().GetActiveEntry();
if (!entry) {
NOTREACHED();
return;
@@ -599,7 +599,7 @@
void TranslateManager::ReportLanguageDetectionError(TabContents* tab_contents) {
UMA_HISTOGRAM_COUNTS("Translate.ReportLanguageDetectionError", 1);
- GURL page_url = tab_contents->controller().GetActiveEntry()->url();
+ GURL page_url = tab_contents->GetController().GetActiveEntry()->url();
// Report option should be disabled for secure URLs.
DCHECK(!page_url.SchemeIsSecure());
std::string report_error_url(kReportLanguageDetectionErrorURL);
@@ -629,7 +629,7 @@
const std::string& translate_script,
const std::string& source_lang,
const std::string& target_lang) {
- NavigationEntry* entry = tab->controller().GetActiveEntry();
+ NavigationEntry* entry = tab->GetController().GetActiveEntry();
if (!entry) {
NOTREACHED();
return;
« no previous file with comments | « chrome/browser/translate/translate_infobar_delegate.cc ('k') | chrome/browser/translate/translate_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698