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

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

Issue 133273029: Move LanguageState to the translate component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 11 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 8378770d13d94401b3116a159d550b37478a0154..b3062905694ad6903d76d58fc8f94799368808db 100644
--- a/chrome/browser/translate/translate_tab_helper.h
+++ b/chrome/browser/translate/translate_tab_helper.h
@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_TAB_HELPER_H_
#define CHROME_BROWSER_TRANSLATE_TRANSLATE_TAB_HELPER_H_
-#include "chrome/browser/tab_contents/language_state.h"
+#include "components/translate/content/browser/content_translate_client.h"
#include "components/translate/core/common/translate_errors.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
@@ -18,7 +18,12 @@ class TranslateTabHelper
public:
virtual ~TranslateTabHelper();
- LanguageState& language_state() { return language_state_; }
+ // Gets the LanguageState associated with the page.
+ // Information about the language the page is in and has been translated to.
+ LanguageState& GetLanguageState();
+
+ // Returns the content client for translate.
+ ContentTranslateClient* GetTranslateClient();
private:
explicit TranslateTabHelper(content::WebContents* web_contents);
@@ -37,8 +42,7 @@ class TranslateTabHelper
const std::string& translated_lang,
TranslateErrors::Type error_type);
- // Information about the language the page is in and has been translated to.
- LanguageState language_state_;
+ ContentTranslateClient translate_client_;
DISALLOW_COPY_AND_ASSIGN(TranslateTabHelper);
};

Powered by Google App Engine
This is Rietveld 408576698