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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_GTK_INFOBARS_AFTER_TRANSLATE_INFOBAR_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_INFOBARS_AFTER_TRANSLATE_INFOBAR_GTK_H_
8 #include "base/compiler_specific.h"
9 #include "base/memory/weak_ptr.h"
10 #include "chrome/browser/ui/gtk/infobars/translate_infobar_base_gtk.h"
12 class TranslateInfoBarDelegate
;
14 class AfterTranslateInfoBar
: public TranslateInfoBarBase
{
16 explicit AfterTranslateInfoBar(scoped_ptr
<TranslateInfoBarDelegate
> delegate
);
19 virtual ~AfterTranslateInfoBar();
21 // TranslateInfoBarBase:
22 virtual void PlatformSpecificSetOwner() OVERRIDE
;
23 virtual bool ShowOptionsMenuButton() const OVERRIDE
;
25 // These methods set the original/target language on the
26 // TranslateInfobarDelegate.
27 void SetOriginalLanguage(size_t language_index
);
28 void SetTargetLanguage(size_t language_index
);
30 CHROMEGTK_CALLBACK_0(AfterTranslateInfoBar
, void, OnOriginalLanguageModified
);
31 CHROMEGTK_CALLBACK_0(AfterTranslateInfoBar
, void, OnTargetLanguageModified
);
32 CHROMEGTK_CALLBACK_0(AfterTranslateInfoBar
, void, OnRevertPressed
);
34 base::WeakPtrFactory
<AfterTranslateInfoBar
> weak_factory_
;
36 DISALLOW_COPY_AND_ASSIGN(AfterTranslateInfoBar
);
39 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_AFTER_TRANSLATE_INFOBAR_GTK_H_