| OLD | NEW |
| 1 // Copyright (c) 2011 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_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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 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 MenuGtk; | 12 class MenuGtk; |
| 13 class OptionsMenuModel; | 13 class OptionsMenuModel; |
| 14 class TranslateInfoBarDelegate; | 14 class TranslateInfoBarDelegate; |
| 15 | 15 |
| 16 // This class contains some of the base functionality that translate infobars | 16 // This class contains some of the base functionality that translate infobars |
| 17 // use. | 17 // use. |
| 18 class TranslateInfoBarBase : public InfoBarGtk { | 18 class TranslateInfoBarBase : public InfoBarGtk { |
| 19 public: | 19 public: |
| 20 explicit TranslateInfoBarBase(TabContentsWrapper* owner, | 20 TranslateInfoBarBase(TabContentsWrapper* owner, |
| 21 TranslateInfoBarDelegate* delegate); | 21 TranslateInfoBarDelegate* delegate); |
| 22 virtual ~TranslateInfoBarBase(); | 22 virtual ~TranslateInfoBarBase(); |
| 23 | 23 |
| 24 // Initializes the infobar widgets. Should be called after the object has been | 24 // Initializes the infobar widgets. Should be called after the object has been |
| 25 // created. | 25 // created. |
| 26 virtual void Init(); | 26 virtual void Init(); |
| 27 | 27 |
| 28 // Overridden from InfoBar: | 28 // Overridden from InfoBar: |
| 29 virtual void GetTopColor(InfoBarDelegate::Type type, | 29 virtual void GetTopColor(InfoBarDelegate::Type type, |
| 30 double* r, double* g, double *b); | 30 double* r, double* g, double *b); |
| 31 virtual void GetBottomColor(InfoBarDelegate::Type type, | 31 virtual void GetBottomColor(InfoBarDelegate::Type type, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // When 1, the infobar background should be pure WARNING_TYPE. | 71 // When 1, the infobar background should be pure WARNING_TYPE. |
| 72 double background_error_percent_; | 72 double background_error_percent_; |
| 73 | 73 |
| 74 // Changes the color of the background from normal to error color and back. | 74 // Changes the color of the background from normal to error color and back. |
| 75 scoped_ptr<ui::SlideAnimation> background_color_animation_; | 75 scoped_ptr<ui::SlideAnimation> background_color_animation_; |
| 76 | 76 |
| 77 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarBase); | 77 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarBase); |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_TRANSLATE_INFOBAR_BASE_GTK_H_ | 80 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_TRANSLATE_INFOBAR_BASE_GTK_H_ |
| OLD | NEW |