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 COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_CLIENT_H_ | 5 #ifndef COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_CLIENT_H_ |
6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_CLIENT_H_ | 6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "components/translate/core/browser/translate_prefs.h" | 12 #include "components/translate/core/browser/translate_prefs.h" |
13 #include "components/translate/core/browser/translate_step.h" | 13 #include "components/translate/core/browser/translate_step.h" |
14 #include "components/translate/core/common/translate_errors.h" | 14 #include "components/translate/core/common/translate_errors.h" |
15 | 15 |
16 class GURL; | 16 class GURL; |
17 class PrefService; | 17 class PrefService; |
18 | |
19 namespace translate { | |
18 class TranslateAcceptLanguages; | 20 class TranslateAcceptLanguages; |
droger
2014/07/09 07:52:43
Nit: Move these declarations around line 30, and r
nshaik
2014/07/09 08:56:51
Done.
| |
19 class TranslateDriver; | 21 class TranslateDriver; |
20 class TranslateInfoBarDelegate; | 22 class TranslateInfoBarDelegate; |
23 } | |
21 | 24 |
22 namespace infobars { | 25 namespace infobars { |
23 class InfoBar; | 26 class InfoBar; |
24 } | 27 } |
25 | 28 |
29 namespace translate { | |
30 | |
26 // A client interface that needs to be supplied to TranslateManager by the | 31 // A client interface that needs to be supplied to TranslateManager by the |
27 // embedder. | 32 // embedder. |
28 // | 33 // |
29 // Each client instance is associated with a given context within which a | 34 // Each client instance is associated with a given context within which a |
30 // TranslateManager is used (e.g. a single tab). | 35 // TranslateManager is used (e.g. a single tab). |
31 class TranslateClient { | 36 class TranslateClient { |
32 public: | 37 public: |
33 // Gets the TranslateDriver associated with the client. | 38 // Gets the TranslateDriver associated with the client. |
34 virtual TranslateDriver* GetTranslateDriver() = 0; | 39 virtual TranslateDriver* GetTranslateDriver() = 0; |
35 | 40 |
(...skipping 23 matching lines...) Expand all Loading... | |
59 | 64 |
60 // Returns true if the URL can be translated. | 65 // Returns true if the URL can be translated. |
61 virtual bool IsTranslatableURL(const GURL& url) = 0; | 66 virtual bool IsTranslatableURL(const GURL& url) = 0; |
62 | 67 |
63 // Presents |report_url|, a URL containing information relating to reporting | 68 // Presents |report_url|, a URL containing information relating to reporting |
64 // a language detection error, to the user to allow them to report language | 69 // a language detection error, to the user to allow them to report language |
65 // detection errors as desired. | 70 // detection errors as desired. |
66 virtual void ShowReportLanguageDetectionErrorUI(const GURL& report_url) = 0; | 71 virtual void ShowReportLanguageDetectionErrorUI(const GURL& report_url) = 0; |
67 }; | 72 }; |
68 | 73 |
74 } // namespace translate | |
75 | |
69 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_CLIENT_H_ | 76 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_CLIENT_H_ |
OLD | NEW |