OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_H_ |
6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_H_ | 6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 // Reports to the Google translate server that a page language was incorrectly | 64 // Reports to the Google translate server that a page language was incorrectly |
65 // detected. This call is initiated by the user selecting the "report" menu | 65 // detected. This call is initiated by the user selecting the "report" menu |
66 // under options in the translate infobar. | 66 // under options in the translate infobar. |
67 void ReportLanguageDetectionError(TabContents* tab_contents); | 67 void ReportLanguageDetectionError(TabContents* tab_contents); |
68 | 68 |
69 // Clears the translate script, so it will be fetched next time we translate. | 69 // Clears the translate script, so it will be fetched next time we translate. |
70 void ClearTranslateScript() { translate_script_.clear(); } | 70 void ClearTranslateScript() { translate_script_.clear(); } |
71 | 71 |
72 // NotificationObserver implementation: | 72 // NotificationObserver implementation: |
73 virtual void Observe(NotificationType type, | 73 virtual void Observe(int type, |
74 const NotificationSource& source, | 74 const NotificationSource& source, |
75 const NotificationDetails& details); | 75 const NotificationDetails& details); |
76 | 76 |
77 // URLFetcher::Delegate implementation: | 77 // URLFetcher::Delegate implementation: |
78 virtual void OnURLFetchComplete(const URLFetcher* source, | 78 virtual void OnURLFetchComplete(const URLFetcher* source, |
79 const GURL& url, | 79 const GURL& url, |
80 const net::URLRequestStatus& status, | 80 const net::URLRequestStatus& status, |
81 int response_code, | 81 int response_code, |
82 const net::ResponseCookies& cookies, | 82 const net::ResponseCookies& cookies, |
83 const std::string& data); | 83 const std::string& data); |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 // server. | 206 // server. |
207 std::vector<PendingRequest> pending_requests_; | 207 std::vector<PendingRequest> pending_requests_; |
208 | 208 |
209 // The languages supported by the translation server. | 209 // The languages supported by the translation server. |
210 static base::LazyInstance<std::set<std::string> > supported_languages_; | 210 static base::LazyInstance<std::set<std::string> > supported_languages_; |
211 | 211 |
212 DISALLOW_COPY_AND_ASSIGN(TranslateManager); | 212 DISALLOW_COPY_AND_ASSIGN(TranslateManager); |
213 }; | 213 }; |
214 | 214 |
215 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_H_ | 215 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_H_ |
OLD | NEW |