| OLD | NEW |
| 1 // Copyright (c) 2010 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> |
| 11 #include <string> | 11 #include <string> |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 void ClearTranslateScript() { translate_script_.clear(); } | 59 void ClearTranslateScript() { translate_script_.clear(); } |
| 60 | 60 |
| 61 // NotificationObserver implementation: | 61 // NotificationObserver implementation: |
| 62 virtual void Observe(NotificationType type, | 62 virtual void Observe(NotificationType type, |
| 63 const NotificationSource& source, | 63 const NotificationSource& source, |
| 64 const NotificationDetails& details); | 64 const NotificationDetails& details); |
| 65 | 65 |
| 66 // URLFetcher::Delegate implementation: | 66 // URLFetcher::Delegate implementation: |
| 67 virtual void OnURLFetchComplete(const URLFetcher* source, | 67 virtual void OnURLFetchComplete(const URLFetcher* source, |
| 68 const GURL& url, | 68 const GURL& url, |
| 69 const URLRequestStatus& status, | 69 const net::URLRequestStatus& status, |
| 70 int response_code, | 70 int response_code, |
| 71 const ResponseCookies& cookies, | 71 const ResponseCookies& cookies, |
| 72 const std::string& data); | 72 const std::string& data); |
| 73 | 73 |
| 74 // Used by unit-tests to override the default delay after which the translate | 74 // Used by unit-tests to override the default delay after which the translate |
| 75 // script is fetched again from the translation server. | 75 // script is fetched again from the translation server. |
| 76 void set_translate_script_expiration_delay(int delay_ms) { | 76 void set_translate_script_expiration_delay(int delay_ms) { |
| 77 translate_script_expiration_delay_ = delay_ms; | 77 translate_script_expiration_delay_ = delay_ms; |
| 78 } | 78 } |
| 79 | 79 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 // server. | 180 // server. |
| 181 std::vector<PendingRequest> pending_requests_; | 181 std::vector<PendingRequest> pending_requests_; |
| 182 | 182 |
| 183 // The languages supported by the translation server. | 183 // The languages supported by the translation server. |
| 184 static base::LazyInstance<std::set<std::string> > supported_languages_; | 184 static base::LazyInstance<std::set<std::string> > supported_languages_; |
| 185 | 185 |
| 186 DISALLOW_COPY_AND_ASSIGN(TranslateManager); | 186 DISALLOW_COPY_AND_ASSIGN(TranslateManager); |
| 187 }; | 187 }; |
| 188 | 188 |
| 189 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_H_ | 189 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_H_ |
| OLD | NEW |