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

Unified Diff: chrome/browser/tab_contents/render_view_context_menu.cc

Issue 2602003: Refactored the translate infobars. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Synced Created 10 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/tab_contents/infobar_delegate.h ('k') | chrome/browser/translate/languages_menu_model2.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/render_view_context_menu.cc
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index d3ea7d6bd4fa0fa64cae5fb1db182758ce79d764..df97268ca077ee02844a29c1cb1ae7c67b43a923 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -35,6 +35,9 @@
#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/translate/translate_manager.h"
+#if defined(OS_WIN)
+#include "chrome/browser/translate/translate_manager2.h"
+#endif
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
@@ -1135,8 +1138,13 @@ void RenderViewContextMenu::ExecuteCommand(int id) {
TranslatePrefs prefs(profile_->GetPrefs());
prefs.RemoveLanguageFromBlacklist(original_lang);
prefs.RemoveSiteFromBlacklist(params_.page_url.HostNoBrackets());
+#if defined(OS_WIN)
+ Singleton<TranslateManager2>::get()->TranslatePage(
+ source_tab_contents_, original_lang, target_lang);
+#else
Singleton<TranslateManager>::get()->TranslatePage(
source_tab_contents_, original_lang, target_lang);
+#endif
break;
}
« no previous file with comments | « chrome/browser/tab_contents/infobar_delegate.h ('k') | chrome/browser/translate/languages_menu_model2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698