Index: components/translate/content/renderer/translate_helper.h |
diff --git a/chrome/renderer/translate/translate_helper.h b/components/translate/content/renderer/translate_helper.h |
similarity index 93% |
rename from chrome/renderer/translate/translate_helper.h |
rename to components/translate/content/renderer/translate_helper.h |
index cc70eaa36a32ac25793d67e95b9934bf0dd20765..409e20cf2feb489c026c6e1aba4a3b3cf4f3e28b 100644 |
--- a/chrome/renderer/translate/translate_helper.h |
+++ b/components/translate/content/renderer/translate_helper.h |
@@ -2,8 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROME_RENDERER_TRANSLATE_TRANSLATE_HELPER_H_ |
-#define CHROME_RENDERER_TRANSLATE_TRANSLATE_HELPER_H_ |
+#ifndef COMPONENTS_TRANSLATE_CONTENT_RENDERER_TRANSLATE_HELPER_H_ |
+#define COMPONENTS_TRANSLATE_CONTENT_RENDERER_TRANSLATE_HELPER_H_ |
#include <string> |
@@ -26,6 +26,8 @@ namespace content { |
class RendererCldDataProvider; |
} |
+namespace translate { |
+ |
// This class deals with page translation. |
// There is one TranslateHelper per RenderView. |
// |
@@ -77,7 +79,10 @@ class RendererCldDataProvider; |
// message to be sent to the browser process immediately. |
class TranslateHelper : public content::RenderViewObserver { |
public: |
- explicit TranslateHelper(content::RenderView* render_view); |
+ explicit TranslateHelper(content::RenderView* render_view, |
+ int world_id, |
+ int extension_group, |
+ const std::string& extension_scheme); |
virtual ~TranslateHelper(); |
// Informs us that the page's text has been extracted. |
@@ -195,7 +200,7 @@ class TranslateHelper : public content::RenderViewObserver { |
// Sends a message to the browser to notify it that the translation failed |
// with |error|. |
- void NotifyBrowserTranslationFailed(translate::TranslateErrors::Type error); |
+ void NotifyBrowserTranslationFailed(TranslateErrors::Type error); |
// Convenience method to access the main frame. Can return NULL, typically |
// if the page is being closed. |
@@ -242,7 +247,7 @@ class TranslateHelper : public content::RenderViewObserver { |
base::WeakPtrFactory<TranslateHelper> weak_method_factory_; |
// Provides CLD data for this process. |
- scoped_ptr<translate::RendererCldDataProvider> cld_data_provider_; |
+ scoped_ptr<RendererCldDataProvider> cld_data_provider_; |
// Whether or not polling for CLD2 data has started. |
bool cld_data_polling_started_; |
@@ -258,6 +263,15 @@ class TranslateHelper : public content::RenderViewObserver { |
// deferred_page_capture_ is true. |
int deferred_page_seq_no_; |
+ // The world ID to use for script execution. |
+ int world_id_; |
+ |
+ // The extension group. |
+ int extension_group_; |
+ |
+ // The URL scheme for translate extensions. |
+ std::string extension_scheme_; |
+ |
// The contents of the page most recently reported to PageCaptured if |
// deferred_page_capture_ is true. |
base::string16 deferred_contents_; |
@@ -265,4 +279,6 @@ class TranslateHelper : public content::RenderViewObserver { |
DISALLOW_COPY_AND_ASSIGN(TranslateHelper); |
}; |
-#endif // CHROME_RENDERER_TRANSLATE_TRANSLATE_HELPER_H_ |
+} // namespace translate |
+ |
+#endif // COMPONENTS_TRANSLATE_CONTENT_RENDERER_TRANSLATE_HELPER_H_ |