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

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

Issue 284313008: Move TranslateInfoBarDelegate and OptionsMenuModel to the Translate component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + review comments Created 6 years, 7 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
Index: chrome/browser/translate/translate_tab_helper.cc
diff --git a/chrome/browser/translate/translate_tab_helper.cc b/chrome/browser/translate/translate_tab_helper.cc
index 668e7f17e3821d28f04a564f88c75c95cbb14ee3..ac2190f73c3b1b6a25d6f025c198dd842d42539d 100644
--- a/chrome/browser/translate/translate_tab_helper.cc
+++ b/chrome/browser/translate/translate_tab_helper.cc
@@ -13,7 +13,6 @@
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/translate/translate_accept_languages_factory.h"
-#include "chrome/browser/translate/translate_infobar_delegate.h"
#include "chrome/browser/translate/translate_service.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
@@ -26,6 +25,7 @@
#include "components/translate/core/browser/page_translated_details.h"
#include "components/translate/core/browser/translate_accept_languages.h"
#include "components/translate/core/browser/translate_download_manager.h"
+#include "components/translate/core/browser/translate_infobar_delegate.h"
#include "components/translate/core/browser/translate_manager.h"
#include "components/translate/core/browser/translate_prefs.h"
#include "components/translate/core/common/language_detection_details.h"
@@ -34,6 +34,7 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
+#include "grit/theme_resources.h"
#include "net/http/http_status_code.h"
#include "url/gurl.h"
@@ -209,6 +210,13 @@ TranslateAcceptLanguages* TranslateTabHelper::GetTranslateAcceptLanguages() {
return GetTranslateAcceptLanguages(web_contents()->GetBrowserContext());
}
+int TranslateTabHelper::GetInfobarIconID() const {
+ return IDR_INFOBAR_TRANSLATE;
+}
+
+// TranslateTabHelper::CreateInfoBar() is implemented in platform-specific
+// files.
+
bool TranslateTabHelper::IsTranslatableURL(const GURL& url) {
return TranslateService::IsTranslatableURL(url);
}
« no previous file with comments | « chrome/browser/translate/translate_tab_helper.h ('k') | chrome/browser/ui/android/infobars/infobar_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698