| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UI_GTK_INFOBARS_TRANSLATE_INFOBAR_BASE_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_INFOBARS_TRANSLATE_INFOBAR_BASE_GTK_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_INFOBARS_TRANSLATE_INFOBAR_BASE_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_INFOBARS_TRANSLATE_INFOBAR_BASE_GTK_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "chrome/browser/ui/gtk/infobars/infobar_gtk.h" | 9 #include "chrome/browser/ui/gtk/infobars/infobar_gtk.h" |
| 10 #include "ui/base/animation/animation_delegate.h" | 10 #include "ui/base/animation/animation_delegate.h" |
| 11 | 11 |
| 12 class TranslateInfoBarDelegate; | 12 class TranslateInfoBarDelegate; |
| 13 | 13 |
| 14 // This class contains some of the base functionality that translate infobars | 14 // This class contains some of the base functionality that translate infobars |
| 15 // use. | 15 // use. |
| 16 class TranslateInfoBarBase : public InfoBarGtk { | 16 class TranslateInfoBarBase : public InfoBarGtk { |
| 17 public: | 17 public: |
| 18 TranslateInfoBarBase(InfoBarService* owner, | 18 TranslateInfoBarBase(InfoBarService* owner, |
| 19 TranslateInfoBarDelegate* delegate); | 19 TranslateInfoBarDelegate* delegate); |
| 20 virtual ~TranslateInfoBarBase(); | 20 virtual ~TranslateInfoBarBase(); |
| 21 | 21 |
| 22 // Initializes the infobar widgets. Should be called after the object has been | |
| 23 // created. | |
| 24 virtual void Init(); | |
| 25 | |
| 26 // Overridden from InfoBar: | 22 // Overridden from InfoBar: |
| 27 virtual void GetTopColor(InfoBarDelegate::Type type, | 23 virtual void GetTopColor(InfoBarDelegate::Type type, |
| 28 double* r, double* g, double* b) OVERRIDE; | 24 double* r, double* g, double* b) OVERRIDE; |
| 29 virtual void GetBottomColor(InfoBarDelegate::Type type, | 25 virtual void GetBottomColor(InfoBarDelegate::Type type, |
| 30 double* r, double* g, double* b) OVERRIDE; | 26 double* r, double* g, double* b) OVERRIDE; |
| 27 virtual void InitWidgets() OVERRIDE; |
| 31 | 28 |
| 32 // Overridden from ui::AnimationDelegate: | 29 // Overridden from ui::AnimationDelegate: |
| 33 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; | 30 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; |
| 34 | 31 |
| 35 protected: | 32 protected: |
| 36 // Sub-classes that want to have the options menu button showing sould | 33 // Sub-classes that want to have the options menu button showing sould |
| 37 // override and return true. | 34 // override and return true. |
| 38 virtual bool ShowOptionsMenuButton() const; | 35 virtual bool ShowOptionsMenuButton() const; |
| 39 | 36 |
| 40 // Creates a combobox that displays the languages currently available. | 37 // Creates a combobox that displays the languages currently available. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 64 // Changes the color of the background from normal to error color and back. | 61 // Changes the color of the background from normal to error color and back. |
| 65 scoped_ptr<ui::SlideAnimation> background_color_animation_; | 62 scoped_ptr<ui::SlideAnimation> background_color_animation_; |
| 66 | 63 |
| 67 // The model for the current menu displayed. | 64 // The model for the current menu displayed. |
| 68 scoped_ptr<ui::MenuModel> menu_model_; | 65 scoped_ptr<ui::MenuModel> menu_model_; |
| 69 | 66 |
| 70 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarBase); | 67 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarBase); |
| 71 }; | 68 }; |
| 72 | 69 |
| 73 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_TRANSLATE_INFOBAR_BASE_GTK_H_ | 70 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_TRANSLATE_INFOBAR_BASE_GTK_H_ |
| OLD | NEW |