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

Unified Diff: trunk/src/components/translate/content/browser/content_translate_driver.h

Issue 296003014: Revert 272217 "LanguageState should be owned by TranslateManager" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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: trunk/src/components/translate/content/browser/content_translate_driver.h
===================================================================
--- trunk/src/components/translate/content/browser/content_translate_driver.h (revision 272260)
+++ trunk/src/components/translate/content/browser/content_translate_driver.h (working copy)
@@ -5,10 +5,12 @@
#ifndef COMPONENTS_TRANSLATE_CONTENT_BROWSER_CONTENT_TRANSLATE_DRIVER_H_
#define COMPONENTS_TRANSLATE_CONTENT_BROWSER_CONTENT_TRANSLATE_DRIVER_H_
-#include "base/basictypes.h"
#include "components/translate/core/browser/translate_driver.h"
+#include "components/translate/core/browser/language_state.h"
+
namespace content {
+struct LoadCommittedDetails;
class NavigationController;
class WebContents;
}
@@ -36,10 +38,14 @@
// Sets the Observer. Calling this method is optional.
void set_observer(Observer* observer) { observer_ = observer; }
+ // Must be called on navigations.
+ void DidNavigate(const content::LoadCommittedDetails& details);
+
// TranslateDriver methods.
virtual void OnIsPageTranslatedChanged() OVERRIDE;
virtual void OnTranslateEnabledChanged() OVERRIDE;
virtual bool IsLinkNavigation() OVERRIDE;
+ virtual LanguageState& GetLanguageState() OVERRIDE;
virtual void TranslatePage(const std::string& translate_script,
const std::string& source_lang,
const std::string& target_lang) OVERRIDE;
@@ -57,6 +63,7 @@
// The navigation controller of the tab we are associated with.
content::NavigationController* navigation_controller_;
+ LanguageState language_state_;
Observer* observer_;
DISALLOW_COPY_AND_ASSIGN(ContentTranslateDriver);

Powered by Google App Engine
This is Rietveld 408576698