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

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: Fix more compile issues 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..44ee8c9cd7f1fdabf48961a5ba054e52d56abd90 100644
--- a/chrome/browser/translate/translate_tab_helper.h
+++ b/chrome/browser/translate/translate_tab_helper.h
@@ -1,11 +1,11 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#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_driver.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,11 @@ class TranslateTabHelper
public:
virtual ~TranslateTabHelper();
- LanguageState& language_state() { return language_state_; }
+ // Gets the LanguageState associated with the page.
+ LanguageState& GetLanguageState();
+
+ // Returns the content driver for translate.
blundell 2014/01/20 14:22:53 // Returns the ContentTranslateDriver instance ass
+ ContentTranslateDriver* GetTranslateDriver();
private:
explicit TranslateTabHelper(content::WebContents* web_contents);
@@ -37,8 +41,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_;
+ ContentTranslateDriver translate_driver_;
DISALLOW_COPY_AND_ASSIGN(TranslateTabHelper);
};

Powered by Google App Engine
This is Rietveld 408576698