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_VIEWS_INFOBARS_TRANSLATE_INFOBAR_BASE_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_INFOBARS_TRANSLATE_INFOBAR_BASE_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_TRANSLATE_INFOBAR_BASE_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_TRANSLATE_INFOBAR_BASE_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "chrome/browser/ui/views/infobars/infobar_background.h" | 9 #include "chrome/browser/ui/views/infobars/infobar_background.h" |
10 #include "chrome/browser/ui/views/infobars/infobar_view.h" | 10 #include "chrome/browser/ui/views/infobars/infobar_view.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 const ViewHierarchyChangedDetails& details) OVERRIDE; | 33 const ViewHierarchyChangedDetails& details) OVERRIDE; |
34 | 34 |
35 // Convenience to retrieve the TranslateInfoBarDelegate for this infobar. | 35 // Convenience to retrieve the TranslateInfoBarDelegate for this infobar. |
36 TranslateInfoBarDelegate* GetDelegate(); | 36 TranslateInfoBarDelegate* GetDelegate(); |
37 | 37 |
38 static const int kButtonInLabelSpacing; | 38 static const int kButtonInLabelSpacing; |
39 | 39 |
40 private: | 40 private: |
41 // InfoBarView: | 41 // InfoBarView: |
42 virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE; | 42 virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE; |
43 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; | 43 virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE; |
44 | 44 |
45 // Returns the background that should be displayed when not animating. | 45 // Returns the background that should be displayed when not animating. |
46 const views::Background& GetBackground(); | 46 const views::Background& GetBackground(); |
47 | 47 |
48 // Paints |background| to |canvas| with the opacity level based on | 48 // Paints |background| to |canvas| with the opacity level based on |
49 // |animation_value|. | 49 // |animation_value|. |
50 void FadeBackground(gfx::Canvas* canvas, | 50 void FadeBackground(gfx::Canvas* canvas, |
51 double animation_value, | 51 double animation_value, |
52 const views::Background& background); | 52 const views::Background& background); |
53 | 53 |
54 InfoBarBackground error_background_; | 54 InfoBarBackground error_background_; |
55 scoped_ptr<ui::SlideAnimation> background_color_animation_; | 55 scoped_ptr<gfx::SlideAnimation> background_color_animation_; |
56 | 56 |
57 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarBase); | 57 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarBase); |
58 }; | 58 }; |
59 | 59 |
60 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_TRANSLATE_INFOBAR_BASE_H_ | 60 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_TRANSLATE_INFOBAR_BASE_H_ |
OLD | NEW |