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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 virtual void WebContentsDestroyed( | 85 virtual void WebContentsDestroyed( |
86 content::WebContents* web_contents) OVERRIDE; | 86 content::WebContents* web_contents) OVERRIDE; |
87 | 87 |
88 void OnLanguageDetermined(const LanguageDetectionDetails& details, | 88 void OnLanguageDetermined(const LanguageDetectionDetails& details, |
89 bool page_needs_translation); | 89 bool page_needs_translation); |
90 void OnPageTranslated(int32 page_id, | 90 void OnPageTranslated(int32 page_id, |
91 const std::string& original_lang, | 91 const std::string& original_lang, |
92 const std::string& translated_lang, | 92 const std::string& translated_lang, |
93 TranslateErrors::Type error_type); | 93 TranslateErrors::Type error_type); |
94 | 94 |
| 95 // Called when we receive ChromeViewHostMsg_NeedCLDData from a renderer |
| 96 // process; attempts to look up the CLD data file in local storage and, |
| 97 // if found, to send a response with an IPC-safe file construct back to |
| 98 // the renderer. |
| 99 void OnCLDDataRequested(); |
| 100 |
95 // Shows the translate bubble. | 101 // Shows the translate bubble. |
96 void ShowBubble(TranslateStep step, TranslateErrors::Type error_type); | 102 void ShowBubble(TranslateStep step, TranslateErrors::Type error_type); |
97 | 103 |
98 ContentTranslateDriver translate_driver_; | 104 ContentTranslateDriver translate_driver_; |
99 scoped_ptr<TranslateManager> translate_manager_; | 105 scoped_ptr<TranslateManager> translate_manager_; |
100 | 106 |
101 DISALLOW_COPY_AND_ASSIGN(TranslateTabHelper); | 107 DISALLOW_COPY_AND_ASSIGN(TranslateTabHelper); |
102 }; | 108 }; |
103 | 109 |
104 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_TAB_HELPER_H_ | 110 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_TAB_HELPER_H_ |
OLD | NEW |