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

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

Issue 227363005: Move reload processing from TranslateManager to TranslateTabHelper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Response to review Created 6 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/translate/translate_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/translate/translate_manager.h
diff --git a/chrome/browser/translate/translate_manager.h b/chrome/browser/translate/translate_manager.h
index 2a2c1e3a7a3be353b02510e7271b9833242755b3..53faad0e5bc859ba908a558a5ba823a2df1fd96c 100644
--- a/chrome/browser/translate/translate_manager.h
+++ b/chrome/browser/translate/translate_manager.h
@@ -14,8 +14,6 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "components/translate/core/common/translate_errors.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
class GURL;
class PrefService;
@@ -35,7 +33,7 @@ class WebContents;
// valid WebContents (i.e. the WebContents is never destroyed within the
// lifetime of TranslateManager).
-class TranslateManager : public content::NotificationObserver {
+class TranslateManager {
public:
// TranslateTabHelper is expected to outlive the TranslateManager.
// |accept_language_pref_name| is the path for the preference for the
@@ -84,16 +82,6 @@ class TranslateManager : public content::NotificationObserver {
// under options in the translate infobar.
void ReportLanguageDetectionError();
- // content::NotificationObserver implementation:
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
-
- // Number of attempts before waiting for a page to be fully reloaded.
- void set_translate_max_reload_attemps(int attempts) {
- max_reload_check_attempts_ = attempts;
- }
-
// Callback types for translate errors.
typedef base::Callback<void(const TranslateErrorDetails&)>
TranslateErrorCallback;
@@ -105,10 +93,6 @@ class TranslateManager : public content::NotificationObserver {
RegisterTranslateErrorCallback(const TranslateErrorCallback& callback);
private:
-
- // Initiates translation once the page is finished loading.
- void InitiateTranslationPosted(const std::string& page_lang, int attempt);
-
// Sends a translation request to the TranslateDriver.
void DoTranslatePage(const std::string& translate_script,
const std::string& source_lang,
@@ -122,11 +106,6 @@ class TranslateManager : public content::NotificationObserver {
bool success,
const std::string& data);
- content::NotificationRegistrar notification_registrar_;
-
- // Max number of attempts before checking if a page has been reloaded.
- int max_reload_check_attempts_;
-
// Preference name for the Accept-Languages HTTP header.
std::string accept_languages_pref_name_;
« no previous file with comments | « no previous file | chrome/browser/translate/translate_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698