| Index: chrome/browser/translate/translate_tab_helper.h
|
| diff --git a/chrome/browser/translate/translate_tab_helper.h b/chrome/browser/translate/translate_tab_helper.h
|
| index 3c35d4aacf387ab11cdacf30e5a5f6aad8b72a76..eef3e9c4807ff267e97810d36980b87dae963e40 100644
|
| --- a/chrome/browser/translate/translate_tab_helper.h
|
| +++ b/chrome/browser/translate/translate_tab_helper.h
|
| @@ -8,6 +8,7 @@
|
| #include <string>
|
|
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "chrome/browser/translate/translate_manager.h"
|
| #include "chrome/browser/ui/translate/translate_bubble_model.h"
|
| #include "components/translate/content/browser/content_translate_driver.h"
|
| #include "components/translate/core/common/translate_errors.h"
|
| @@ -45,6 +46,17 @@ class TranslateTabHelper
|
| static TranslateAcceptLanguages* GetTranslateAcceptLanguages(
|
| content::BrowserContext* browser_context);
|
|
|
| + // Helper method to return the TranslateManager instance associated with
|
| + // |web_contents|.
|
| + static TranslateManager* GetManagerFromWebContents(
|
| + content::WebContents* web_contents);
|
| +
|
| + // Gets the associated TranslateManager.
|
| + TranslateManager* GetTranslateManager();
|
| +
|
| + // Gets the associated WebContents.
|
| + content::WebContents* GetWebContents();
|
| +
|
| // Denotes which state the user is in with respect to translate.
|
| enum TranslateStep {
|
| BEFORE_TRANSLATE,
|
| @@ -56,7 +68,6 @@ class TranslateTabHelper
|
| // Called when the embedder should present UI to the user corresponding to the
|
| // user's current |step|.
|
| void ShowTranslateUI(TranslateStep step,
|
| - content::WebContents* web_contents,
|
| const std::string source_language,
|
| const std::string target_language,
|
| TranslateErrors::Type error_type);
|
| @@ -79,11 +90,10 @@ class TranslateTabHelper
|
| TranslateErrors::Type error_type);
|
|
|
| // Shows the translate bubble.
|
| - void ShowBubble(content::WebContents* web_contents,
|
| - TranslateStep step,
|
| - TranslateErrors::Type error_type);
|
| + void ShowBubble(TranslateStep step, TranslateErrors::Type error_type);
|
|
|
| ContentTranslateDriver translate_driver_;
|
| + TranslateManager translate_manager_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(TranslateTabHelper);
|
| };
|
|
|