| Index: chrome/browser/translate/translate_infobar_delegate.h
|
| diff --git a/chrome/browser/translate/translate_infobar_delegate.h b/chrome/browser/translate/translate_infobar_delegate.h
|
| index 1e99be73244eb27d4e352c8aa8dddb957f8892aa..3efb89e1fc6d5bb0b5994d24d0d3d63164e6f225 100644
|
| --- a/chrome/browser/translate/translate_infobar_delegate.h
|
| +++ b/chrome/browser/translate/translate_infobar_delegate.h
|
| @@ -19,13 +19,12 @@
|
| #include "components/translate/core/common/translate_constants.h"
|
| #include "components/translate/core/common/translate_errors.h"
|
|
|
| -class InfoBarService;
|
| class PrefService;
|
| class TranslateClient;
|
| class TranslateManager;
|
|
|
| -namespace content {
|
| -class WebContents;
|
| +namespace infobars {
|
| +class InfoBarManager;
|
| }
|
|
|
| class TranslateInfoBarDelegate : public infobars::InfoBarDelegate {
|
| @@ -50,12 +49,12 @@ class TranslateInfoBarDelegate : public infobars::InfoBarDelegate {
|
| // |step| == TRANSLATING and |original_language| == kUnknownLanguageCode.
|
| //
|
| // If |replace_existing_infobar| is true, the infobar is created and added to
|
| - // the infobar service for |web_contents|, replacing any other translate
|
| - // infobar already present there. Otherwise, the infobar will only be added
|
| - // if there is no other translate infobar already present.
|
| + // the infobar manager, replacing any other translate infobar already present
|
| + // there. Otherwise, the infobar will only be added if there is no other
|
| + // translate infobar already present.
|
| static void Create(bool replace_existing_infobar,
|
| const base::WeakPtr<TranslateManager>& translate_manager,
|
| - InfoBarService* infobar_service,
|
| + infobars::InfoBarManager* infobar_manager,
|
| bool is_off_the_record,
|
| translate::TranslateStep step,
|
| const std::string& original_language,
|
| @@ -156,9 +155,6 @@ class TranslateInfoBarDelegate : public infobars::InfoBarDelegate {
|
| bool ShouldShowNeverTranslateShortcut();
|
| bool ShouldShowAlwaysTranslateShortcut();
|
|
|
| - // Returns the WebContents associated with the TranslateInfoBarDelegate.
|
| - content::WebContents* GetWebContents();
|
| -
|
| // Adds the strings that should be displayed in the after translate infobar to
|
| // |strings|. If |autodetermined_source_language| is false, the text in that
|
| // infobar is:
|
| @@ -175,6 +171,10 @@ class TranslateInfoBarDelegate : public infobars::InfoBarDelegate {
|
| bool* swap_languages,
|
| bool autodetermined_source_language);
|
|
|
| + // Gets the TranslateClient associated with this object.
|
| + // May return NULL if the client has been destroyed.
|
| + TranslateClient* GetTranslateClient();
|
| +
|
| protected:
|
| TranslateInfoBarDelegate(
|
| const base::WeakPtr<TranslateManager>& translate_manager,
|
| @@ -195,9 +195,6 @@ class TranslateInfoBarDelegate : public infobars::InfoBarDelegate {
|
| static scoped_ptr<infobars::InfoBar> CreateInfoBar(
|
| scoped_ptr<TranslateInfoBarDelegate> delegate);
|
|
|
| - // May return NULL if the client has been destroyed.
|
| - TranslateClient* GetTranslateClient();
|
| -
|
| // InfoBarDelegate:
|
| virtual void InfoBarDismissed() OVERRIDE;
|
| virtual int GetIconID() const OVERRIDE;
|
|
|