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_MANAGER_H_ | 5 #ifndef COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_MANAGER_H_ |
6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_MANAGER_H_ | 6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/callback_list.h" | 12 #include "base/callback_list.h" |
13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "components/translate/core/browser/language_state.h" | 16 #include "components/translate/core/browser/language_state.h" |
17 #include "components/translate/core/common/translate_errors.h" | 17 #include "components/translate/core/common/translate_errors.h" |
18 | 18 |
19 class GURL; | 19 class GURL; |
20 class PrefService; | 20 class PrefService; |
21 | |
22 namespace translate { | |
21 class TranslateClient; | 23 class TranslateClient; |
droger
2014/07/09 07:52:44
Nit: Same here.
nshaik
2014/07/09 08:56:52
Done.
| |
22 class TranslateDriver; | 24 class TranslateDriver; |
23 class TranslatePrefs; | 25 class TranslatePrefs; |
24 struct TranslateErrorDetails; | 26 struct TranslateErrorDetails; |
27 } | |
28 | |
29 namespace translate { | |
25 | 30 |
26 // The TranslateManager class is responsible for showing an info-bar when a page | 31 // The TranslateManager class is responsible for showing an info-bar when a page |
27 // in a language different than the user language is loaded. It triggers the | 32 // in a language different than the user language is loaded. It triggers the |
28 // page translation the user requests. | 33 // page translation the user requests. |
29 | 34 |
30 class TranslateManager { | 35 class TranslateManager { |
31 public: | 36 public: |
32 // |translate_client| is expected to outlive the TranslateManager. | 37 // |translate_client| is expected to outlive the TranslateManager. |
33 // |accept_language_pref_name| is the path for the preference for the | 38 // |accept_language_pref_name| is the path for the preference for the |
34 // accept-languages. | 39 // accept-languages. |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
118 TranslateClient* translate_client_; // Weak. | 123 TranslateClient* translate_client_; // Weak. |
119 TranslateDriver* translate_driver_; // Weak. | 124 TranslateDriver* translate_driver_; // Weak. |
120 | 125 |
121 LanguageState language_state_; | 126 LanguageState language_state_; |
122 | 127 |
123 base::WeakPtrFactory<TranslateManager> weak_method_factory_; | 128 base::WeakPtrFactory<TranslateManager> weak_method_factory_; |
124 | 129 |
125 DISALLOW_COPY_AND_ASSIGN(TranslateManager); | 130 DISALLOW_COPY_AND_ASSIGN(TranslateManager); |
126 }; | 131 }; |
127 | 132 |
133 } // namespace translate | |
134 | |
128 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_MANAGER_H_ | 135 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_MANAGER_H_ |
OLD | NEW |