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 COMPONENTS_TRANSLATE_CONTENT_RENDERER_TRANSLATE_HELPER_H_ | 5 #ifndef COMPONENTS_TRANSLATE_CONTENT_RENDERER_TRANSLATE_HELPER_H_ |
6 #define COMPONENTS_TRANSLATE_CONTENT_RENDERER_TRANSLATE_HELPER_H_ | 6 #define COMPONENTS_TRANSLATE_CONTENT_RENDERER_TRANSLATE_HELPER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "components/translate/content/common/translate.mojom.h" | 15 #include "components/translate/content/common/translate.mojom.h" |
16 #include "components/translate/core/common/translate_errors.h" | 16 #include "components/translate/core/common/translate_errors.h" |
17 #include "content/public/renderer/render_frame_observer.h" | 17 #include "content/public/renderer/render_frame_observer.h" |
18 #include "mojo/public/cpp/bindings/binding.h" | 18 #include "mojo/public/cpp/bindings/binding.h" |
19 #include "url/gurl.h" | 19 #include "url/gurl.h" |
20 | 20 |
21 namespace blink { | 21 namespace blink { |
22 class WebDocument; | |
23 class WebLocalFrame; | 22 class WebLocalFrame; |
24 } | 23 } |
25 | 24 |
26 namespace translate { | 25 namespace translate { |
27 | 26 |
28 // This class deals with page translation. | 27 // This class deals with page translation. |
29 // There is one TranslateHelper per RenderView. | 28 // There is one TranslateHelper per RenderView. |
30 class TranslateHelper : public content::RenderFrameObserver, | 29 class TranslateHelper : public content::RenderFrameObserver, |
31 public mojom::Page { | 30 public mojom::Page { |
32 public: | 31 public: |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 | 157 |
159 // Method factory used to make calls to TranslatePageImpl. | 158 // Method factory used to make calls to TranslatePageImpl. |
160 base::WeakPtrFactory<TranslateHelper> weak_method_factory_; | 159 base::WeakPtrFactory<TranslateHelper> weak_method_factory_; |
161 | 160 |
162 DISALLOW_COPY_AND_ASSIGN(TranslateHelper); | 161 DISALLOW_COPY_AND_ASSIGN(TranslateHelper); |
163 }; | 162 }; |
164 | 163 |
165 } // namespace translate | 164 } // namespace translate |
166 | 165 |
167 #endif // COMPONENTS_TRANSLATE_CONTENT_RENDERER_TRANSLATE_HELPER_H_ | 166 #endif // COMPONENTS_TRANSLATE_CONTENT_RENDERER_TRANSLATE_HELPER_H_ |
OLD | NEW |