| 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_TRANSLATE_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_SERVICE_H_ |
| 6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_SERVICE_H_ | 6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_SERVICE_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/web_resource/resource_request_allowed_notifier.h" | 8 #include "chrome/browser/web_resource/resource_request_allowed_notifier.h" |
| 9 | 9 |
| 10 class GURL; | 10 class GURL; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 static std::string GetTargetLanguage(PrefService* prefs); | 45 static std::string GetTargetLanguage(PrefService* prefs); |
| 46 | 46 |
| 47 // Returns true if the URL can be translated. | 47 // Returns true if the URL can be translated. |
| 48 static bool IsTranslatableURL(const GURL& url); | 48 static bool IsTranslatableURL(const GURL& url); |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 TranslateService(); | 51 TranslateService(); |
| 52 ~TranslateService(); | 52 ~TranslateService(); |
| 53 | 53 |
| 54 // ResourceRequestAllowedNotifier::Observer methods. | 54 // ResourceRequestAllowedNotifier::Observer methods. |
| 55 virtual void OnResourceRequestsAllowed() override; | 55 void OnResourceRequestsAllowed() override; |
| 56 | 56 |
| 57 // Helper class to know if it's allowed to make network resource requests. | 57 // Helper class to know if it's allowed to make network resource requests. |
| 58 ResourceRequestAllowedNotifier resource_request_allowed_notifier_; | 58 ResourceRequestAllowedNotifier resource_request_allowed_notifier_; |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_SERVICE_H_ | 61 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_SERVICE_H_ |
| OLD | NEW |