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

Side by Side Diff: chrome/browser/translate/translate_tab_helper.h

Issue 284313008: Move TranslateInfoBarDelegate and OptionsMenuModel to the Translate component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + review comments Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_TAB_HELPER_H_ 5 #ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_TAB_HELPER_H_
6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_TAB_HELPER_H_ 6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_TAB_HELPER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // Number of attempts before waiting for a page to be fully reloaded. 85 // Number of attempts before waiting for a page to be fully reloaded.
86 void set_translate_max_reload_attempts(int attempts) { 86 void set_translate_max_reload_attempts(int attempts) {
87 max_reload_check_attempts_ = attempts; 87 max_reload_check_attempts_ = attempts;
88 } 88 }
89 89
90 // TranslateClient implementation. 90 // TranslateClient implementation.
91 virtual TranslateDriver* GetTranslateDriver() OVERRIDE; 91 virtual TranslateDriver* GetTranslateDriver() OVERRIDE;
92 virtual PrefService* GetPrefs() OVERRIDE; 92 virtual PrefService* GetPrefs() OVERRIDE;
93 virtual scoped_ptr<TranslatePrefs> GetTranslatePrefs() OVERRIDE; 93 virtual scoped_ptr<TranslatePrefs> GetTranslatePrefs() OVERRIDE;
94 virtual TranslateAcceptLanguages* GetTranslateAcceptLanguages() OVERRIDE; 94 virtual TranslateAcceptLanguages* GetTranslateAcceptLanguages() OVERRIDE;
95 virtual int GetInfobarIconID() const OVERRIDE;
96 virtual scoped_ptr<infobars::InfoBar> CreateInfoBar(
97 scoped_ptr<TranslateInfoBarDelegate> delegate) const OVERRIDE;
95 virtual void ShowTranslateUI(translate::TranslateStep step, 98 virtual void ShowTranslateUI(translate::TranslateStep step,
96 const std::string source_language, 99 const std::string source_language,
97 const std::string target_language, 100 const std::string target_language,
98 TranslateErrors::Type error_type, 101 TranslateErrors::Type error_type,
99 bool triggered_from_menu) OVERRIDE; 102 bool triggered_from_menu) OVERRIDE;
100 virtual bool IsTranslatableURL(const GURL& url) OVERRIDE; 103 virtual bool IsTranslatableURL(const GURL& url) OVERRIDE;
101 virtual void ShowReportLanguageDetectionErrorUI( 104 virtual void ShowReportLanguageDetectionErrorUI(
102 const GURL& report_url) OVERRIDE; 105 const GURL& report_url) OVERRIDE;
103 106
104 private: 107 private:
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 174
172 // Necessary for binding the callback to HandleCLDDataRequest on the blocking 175 // Necessary for binding the callback to HandleCLDDataRequest on the blocking
173 // pool and for delaying translation initialization until the page has 176 // pool and for delaying translation initialization until the page has
174 // finished loading on a reload. 177 // finished loading on a reload.
175 base::WeakPtrFactory<TranslateTabHelper> weak_pointer_factory_; 178 base::WeakPtrFactory<TranslateTabHelper> weak_pointer_factory_;
176 179
177 DISALLOW_COPY_AND_ASSIGN(TranslateTabHelper); 180 DISALLOW_COPY_AND_ASSIGN(TranslateTabHelper);
178 }; 181 };
179 182
180 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_TAB_HELPER_H_ 183 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_TAB_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698