OLD | NEW |
1 // Copyright (c) 2010 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 CHROME_BROWSER_GTK_TRANSLATE_AFTER_TRANSLATE_INFOBAR_GTK_H_ | 5 #ifndef CHROME_BROWSER_GTK_TRANSLATE_AFTER_TRANSLATE_INFOBAR_GTK_H_ |
6 #define CHROME_BROWSER_GTK_TRANSLATE_AFTER_TRANSLATE_INFOBAR_GTK_H_ | 6 #define CHROME_BROWSER_GTK_TRANSLATE_AFTER_TRANSLATE_INFOBAR_GTK_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/task.h" | 9 #include "chrome/browser/ui/gtk/translate/after_translate_infobar_gtk.h" |
10 #include "chrome/browser/gtk/translate/translate_infobar_base_gtk.h" | 10 // TODO(msw): remove this file once all includes have been updated. |
11 | |
12 class TranslateInfoBarDelegate; | |
13 | |
14 class AfterTranslateInfoBar : public TranslateInfoBarBase { | |
15 public: | |
16 explicit AfterTranslateInfoBar(TranslateInfoBarDelegate* delegate); | |
17 virtual ~AfterTranslateInfoBar(); | |
18 | |
19 // Overridden from TranslateInfoBarBase: | |
20 virtual void Init(); | |
21 | |
22 protected: | |
23 virtual bool ShowOptionsMenuButton() const; | |
24 | |
25 private: | |
26 CHROMEGTK_CALLBACK_0(AfterTranslateInfoBar, void, OnOriginalLanguageModified); | |
27 CHROMEGTK_CALLBACK_0(AfterTranslateInfoBar, void, OnTargetLanguageModified); | |
28 CHROMEGTK_CALLBACK_0(AfterTranslateInfoBar, void, OnRevertPressed); | |
29 | |
30 // These methods set the original/target language on the | |
31 // TranslateInfobarDelegate. | |
32 void SetOriginalLanguage(int language_index); | |
33 void SetTargetLanguage(int language_index); | |
34 | |
35 ScopedRunnableMethodFactory<AfterTranslateInfoBar> method_factory_; | |
36 | |
37 DISALLOW_COPY_AND_ASSIGN(AfterTranslateInfoBar); | |
38 }; | |
39 | 11 |
40 #endif // CHROME_BROWSER_GTK_TRANSLATE_AFTER_TRANSLATE_INFOBAR_GTK_H_ | 12 #endif // CHROME_BROWSER_GTK_TRANSLATE_AFTER_TRANSLATE_INFOBAR_GTK_H_ |
OLD | NEW |