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

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

Issue 159883002: Move TranslatePrefs to the Translate component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@acceptLanguages
Patch Set: Fix ChromeOS browsertests Created 6 years, 10 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.h
diff --git a/chrome/browser/translate/translate_tab_helper.h b/chrome/browser/translate/translate_tab_helper.h
index 6348cd2c621ba2d05bbcf8acdfe70981340e0ef7..8c22b2792d3da8e115195e4ce7887d135697dcf0 100644
--- a/chrome/browser/translate/translate_tab_helper.h
+++ b/chrome/browser/translate/translate_tab_helper.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/translate/translate_bubble_model.h"
#include "components/translate/content/browser/content_translate_driver.h"
#include "components/translate/core/common/translate_errors.h"
@@ -14,10 +15,14 @@
#include "content/public/browser/web_contents_user_data.h"
namespace content {
+class BrowserContext;
class WebContents;
}
struct LanguageDetectionDetails;
+class PrefService;
+class TranslateAcceptLanguages;
+class TranslatePrefs;
class TranslateTabHelper
: public content::WebContentsObserver,
@@ -32,6 +37,14 @@ class TranslateTabHelper
// WebContents.
ContentTranslateDriver& translate_driver() { return translate_driver_; }
+ // Helper method to return a new TranslatePrefs instance.
+ static scoped_ptr<TranslatePrefs> CreateTranslatePrefs(PrefService* prefs);
+
+ // Helper method to return the TranslateAcceptLanguages instance associated
+ // with |browser_context|.
+ static TranslateAcceptLanguages* GetTranslateAcceptLanguages(
+ content::BrowserContext* browser_context);
+
// Denotes which state the user is in with respect to translate.
enum TranslateStep {
BEFORE_TRANSLATE,

Powered by Google App Engine
This is Rietveld 408576698