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

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

Issue 558663003: Move navigation handling code from TranslateClient to TranslateDriver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 6 years, 3 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/chrome_translate_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/translate/chrome_translate_client.h
diff --git a/chrome/browser/translate/chrome_translate_client.h b/chrome/browser/translate/chrome_translate_client.h
index 3c22427682e493953c1b6d82f10e64d045731f76..ed3b9365a825630ad9fa2a162e55e649f1a306f3 100644
--- a/chrome/browser/translate/chrome_translate_client.h
+++ b/chrome/browser/translate/chrome_translate_client.h
@@ -8,7 +8,6 @@
#include <string>
#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
#include "chrome/browser/ui/translate/translate_bubble_model.h"
#include "components/translate/content/browser/browser_cld_data_provider.h"
#include "components/translate/content/browser/content_translate_driver.h"
@@ -83,11 +82,6 @@ class ChromeTranslateClient
// destroyed.
content::WebContents* GetWebContents();
- // Number of attempts before waiting for a page to be fully reloaded.
- void set_translate_max_reload_attempts(int attempts) {
- max_reload_check_attempts_ = attempts;
- }
-
// TranslateClient implementation.
virtual translate::TranslateDriver* GetTranslateDriver() OVERRIDE;
virtual PrefService* GetPrefs() OVERRIDE;
@@ -111,17 +105,9 @@ class ChromeTranslateClient
friend class content::WebContentsUserData<ChromeTranslateClient>;
// content::WebContentsObserver implementation.
- virtual void NavigationEntryCommitted(
- const content::LoadCommittedDetails& load_details) OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
- virtual void DidNavigateAnyFrame(
- const content::LoadCommittedDetails& details,
- const content::FrameNavigateParams& params) OVERRIDE;
virtual void WebContentsDestroyed() OVERRIDE;
- // Initiates translation once the page is finished loading.
- void InitiateTranslation(const std::string& page_lang, int attempt);
-
// IPC handlers.
void OnTranslateAssignedSequenceNumber(int page_seq_no);
void OnLanguageDetermined(const translate::LanguageDetectionDetails& details,
@@ -134,17 +120,12 @@ class ChromeTranslateClient
void ShowBubble(translate::TranslateStep step,
translate::TranslateErrors::Type error_type);
- // Max number of attempts before checking if a page has been reloaded.
- int max_reload_check_attempts_;
-
translate::ContentTranslateDriver translate_driver_;
scoped_ptr<translate::TranslateManager> translate_manager_;
// Provides CLD data for this process.
scoped_ptr<translate::BrowserCldDataProvider> cld_data_provider_;
- base::WeakPtrFactory<ChromeTranslateClient> weak_pointer_factory_;
-
DISALLOW_COPY_AND_ASSIGN(ChromeTranslateClient);
};
« no previous file with comments | « no previous file | chrome/browser/translate/chrome_translate_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698