Index: chrome/browser/renderer_context_menu/render_view_context_menu.cc |
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.cc b/chrome/browser/renderer_context_menu/render_view_context_menu.cc |
index a36a8f097d2891ef5e774d8b7f0c53eb0b8a650b..f4bf6e90c86998cf6d91cd1274465a6301be6ef1 100644 |
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc |
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc |
@@ -920,7 +920,7 @@ void RenderViewContextMenu::AppendPageItems() { |
if (TranslateService::IsTranslatableURL(params_.page_url)) { |
std::string locale = g_browser_process->GetApplicationLocale(); |
- locale = TranslateDownloadManager::GetLanguageCode(locale); |
+ locale = translate::TranslateDownloadManager::GetLanguageCode(locale); |
base::string16 language = |
l10n_util::GetDisplayNameForLocale(locale, locale, true); |
menu_model_.AddItem( |
@@ -1179,7 +1179,8 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const { |
std::string original_lang = |
chrome_translate_client->GetLanguageState().original_language(); |
std::string target_lang = g_browser_process->GetApplicationLocale(); |
- target_lang = TranslateDownloadManager::GetLanguageCode(target_lang); |
+ target_lang = |
+ translate::TranslateDownloadManager::GetLanguageCode(target_lang); |
// Note that we intentionally enable the menu even if the original and |
// target languages are identical. This is to give a way to user to |
// translate a page that might contains text fragments in a different |
@@ -1190,7 +1191,8 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const { |
!source_web_contents_->GetInterstitialPage() && |
// There are some application locales which can't be used as a |
// target language for translation. |
- TranslateDownloadManager::IsSupportedLanguage(target_lang) && |
+ translate::TranslateDownloadManager::IsSupportedLanguage( |
+ target_lang) && |
// Disable on the Instant Extended NTP. |
!chrome::IsInstantNTP(source_web_contents_); |
} |
@@ -1732,14 +1734,15 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) { |
std::string original_lang = |
chrome_translate_client->GetLanguageState().original_language(); |
std::string target_lang = g_browser_process->GetApplicationLocale(); |
- target_lang = TranslateDownloadManager::GetLanguageCode(target_lang); |
+ target_lang = |
+ translate::TranslateDownloadManager::GetLanguageCode(target_lang); |
// Since the user decided to translate for that language and site, clears |
// any preferences for not translating them. |
- scoped_ptr<TranslatePrefs> prefs( |
+ scoped_ptr<translate::TranslatePrefs> prefs( |
ChromeTranslateClient::CreateTranslatePrefs(profile_->GetPrefs())); |
prefs->UnblockLanguage(original_lang); |
prefs->RemoveSiteFromBlacklist(params_.page_url.HostNoBrackets()); |
- TranslateManager* manager = |
+ translate::TranslateManager* manager = |
chrome_translate_client->GetTranslateManager(); |
DCHECK(manager); |
manager->TranslatePage(original_lang, target_lang, true); |