Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 87 virtual TranslateDriver* GetTranslateDriver() OVERRIDE; | 87 virtual TranslateDriver* GetTranslateDriver() OVERRIDE; |
| 88 virtual PrefService* GetPrefs() OVERRIDE; | 88 virtual PrefService* GetPrefs() OVERRIDE; |
| 89 virtual scoped_ptr<TranslatePrefs> GetTranslatePrefs() OVERRIDE; | 89 virtual scoped_ptr<TranslatePrefs> GetTranslatePrefs() OVERRIDE; |
| 90 virtual TranslateAcceptLanguages* GetTranslateAcceptLanguages() OVERRIDE; | 90 virtual TranslateAcceptLanguages* GetTranslateAcceptLanguages() OVERRIDE; |
| 91 virtual void ShowTranslateUI(translate::TranslateStep step, | 91 virtual void ShowTranslateUI(translate::TranslateStep step, |
| 92 const std::string source_language, | 92 const std::string source_language, |
| 93 const std::string target_language, | 93 const std::string target_language, |
| 94 TranslateErrors::Type error_type, | 94 TranslateErrors::Type error_type, |
| 95 bool triggered_from_menu) OVERRIDE; | 95 bool triggered_from_menu) OVERRIDE; |
| 96 virtual bool IsTranslatableURL(const GURL& url) OVERRIDE; | 96 virtual bool IsTranslatableURL(const GURL& url) OVERRIDE; |
| 97 virtual void ShowReportLanguageDetectionErrorUI( | 97 virtual void ShowReportLanguageDetectionErrorUI(const GURL& report_url) |
| 98 const GURL& report_url) OVERRIDE; | 98 OVERRIDE; |
|
droger
2014/04/09 08:31:24
Nit: break after opening bracket.
blundell
2014/04/09 08:49:27
Done.
| |
| 99 | 99 |
| 100 private: | 100 private: |
| 101 explicit TranslateTabHelper(content::WebContents* web_contents); | 101 explicit TranslateTabHelper(content::WebContents* web_contents); |
| 102 friend class content::WebContentsUserData<TranslateTabHelper>; | 102 friend class content::WebContentsUserData<TranslateTabHelper>; |
| 103 | 103 |
| 104 // content::WebContentsObserver implementation. | 104 // content::WebContentsObserver implementation. |
| 105 virtual void NavigationEntryCommitted( | 105 virtual void NavigationEntryCommitted( |
| 106 const content::LoadCommittedDetails& load_details) OVERRIDE; | 106 const content::LoadCommittedDetails& load_details) OVERRIDE; |
| 107 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 107 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 108 virtual void DidNavigateAnyFrame( | 108 virtual void DidNavigateAnyFrame( |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 167 | 167 |
| 168 // Necessary for binding the callback to HandleCLDDataRequest on the blocking | 168 // Necessary for binding the callback to HandleCLDDataRequest on the blocking |
| 169 // pool and for delaying translation initialization until the page has | 169 // pool and for delaying translation initialization until the page has |
| 170 // finished loading on a reload. | 170 // finished loading on a reload. |
| 171 base::WeakPtrFactory<TranslateTabHelper> weak_pointer_factory_; | 171 base::WeakPtrFactory<TranslateTabHelper> weak_pointer_factory_; |
| 172 | 172 |
| 173 DISALLOW_COPY_AND_ASSIGN(TranslateTabHelper); | 173 DISALLOW_COPY_AND_ASSIGN(TranslateTabHelper); |
| 174 }; | 174 }; |
| 175 | 175 |
| 176 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_TAB_HELPER_H_ | 176 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_TAB_HELPER_H_ |
| OLD | NEW |