OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CHROME_TRANSLATE_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_TRANSLATE_CHROME_TRANSLATE_CLIENT_H_ |
6 #define CHROME_BROWSER_TRANSLATE_CHROME_TRANSLATE_CLIENT_H_ | 6 #define CHROME_BROWSER_TRANSLATE_CHROME_TRANSLATE_CLIENT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 class WebContents; | 22 class WebContents; |
23 } // namespace content | 23 } // namespace content |
24 | 24 |
25 namespace test { | 25 namespace test { |
26 class ScopedCLDDynamicDataHarness; | 26 class ScopedCLDDynamicDataHarness; |
27 } // namespace test | 27 } // namespace test |
28 | 28 |
29 class PrefService; | 29 class PrefService; |
30 | 30 |
31 namespace translate { | 31 namespace translate { |
| 32 class LanguageModel; |
32 class LanguageState; | 33 class LanguageState; |
33 class TranslateAcceptLanguages; | 34 class TranslateAcceptLanguages; |
34 class TranslatePrefs; | 35 class TranslatePrefs; |
35 class TranslateManager; | 36 class TranslateManager; |
36 } // namespace translate | 37 } // namespace translate |
37 | 38 |
38 class ChromeTranslateClient | 39 class ChromeTranslateClient |
39 : public translate::TranslateClient, | 40 : public translate::TranslateClient, |
40 public translate::ContentTranslateDriver::Observer, | 41 public translate::ContentTranslateDriver::Observer, |
41 public content::WebContentsObserver, | 42 public content::WebContentsObserver, |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 // content::WebContentsObserver implementation. | 116 // content::WebContentsObserver implementation. |
116 void WebContentsDestroyed() override; | 117 void WebContentsDestroyed() override; |
117 | 118 |
118 // Shows the translate bubble. | 119 // Shows the translate bubble. |
119 void ShowBubble(translate::TranslateStep step, | 120 void ShowBubble(translate::TranslateStep step, |
120 translate::TranslateErrors::Type error_type); | 121 translate::TranslateErrors::Type error_type); |
121 | 122 |
122 translate::ContentTranslateDriver translate_driver_; | 123 translate::ContentTranslateDriver translate_driver_; |
123 std::unique_ptr<translate::TranslateManager> translate_manager_; | 124 std::unique_ptr<translate::TranslateManager> translate_manager_; |
124 | 125 |
| 126 // Model to be notified about detected language of every page visited. Not |
| 127 // owned here. |
| 128 translate::LanguageModel* language_model_; |
| 129 |
125 DISALLOW_COPY_AND_ASSIGN(ChromeTranslateClient); | 130 DISALLOW_COPY_AND_ASSIGN(ChromeTranslateClient); |
126 }; | 131 }; |
127 | 132 |
128 #endif // CHROME_BROWSER_TRANSLATE_CHROME_TRANSLATE_CLIENT_H_ | 133 #endif // CHROME_BROWSER_TRANSLATE_CHROME_TRANSLATE_CLIENT_H_ |
OLD | NEW |