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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/translate/languages_menu_model.h" | 9 #include "chrome/browser/translate/languages_menu_model.h" |
10 #include "chrome/browser/translate/translate_infobar_view.h" | 10 #include "chrome/browser/translate/translate_infobar_view.h" |
11 #include "chrome/browser/ui/views/infobars/infobar_background.h" | 11 #include "chrome/browser/ui/views/infobars/infobar_background.h" |
12 #include "chrome/browser/ui/views/infobars/infobar_view.h" | 12 #include "chrome/browser/ui/views/infobars/infobar_view.h" |
13 | 13 |
14 class TranslateInfoBarDelegate; | 14 class TranslateInfoBarDelegate; |
15 | 15 |
16 namespace views { | 16 namespace views { |
17 class MenuButton; | 17 class MenuButton; |
18 } | 18 } |
19 | 19 |
20 // This class contains some of the base functionality that translate infobars | 20 // This class contains some of the base functionality that translate infobars |
21 // use. | 21 // use. |
22 class TranslateInfoBarBase : public TranslateInfoBarView, | 22 class TranslateInfoBarBase : public TranslateInfoBarView, |
23 public InfoBarView { | 23 public InfoBarView { |
24 public: | 24 public: |
25 explicit TranslateInfoBarBase(TranslateInfoBarDelegate* delegate); | 25 TranslateInfoBarBase(TabContentsWrapper* owner, |
| 26 TranslateInfoBarDelegate* delegate); |
26 virtual ~TranslateInfoBarBase(); | 27 virtual ~TranslateInfoBarBase(); |
27 | 28 |
28 protected: | 29 protected: |
29 static const int kButtonInLabelSpacing; | 30 static const int kButtonInLabelSpacing; |
30 | 31 |
31 // InfoBarView: | 32 // InfoBarView: |
32 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child); | 33 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child); |
33 | 34 |
34 // Sets the text of the provided language menu button to reflect the current | 35 // Sets the text of the provided language menu button to reflect the current |
35 // value from the delegate. | 36 // value from the delegate. |
(...skipping 17 matching lines...) Expand all Loading... |
53 double animation_value, | 54 double animation_value, |
54 const views::Background& background); | 55 const views::Background& background); |
55 | 56 |
56 InfoBarBackground error_background_; | 57 InfoBarBackground error_background_; |
57 scoped_ptr<ui::SlideAnimation> background_color_animation_; | 58 scoped_ptr<ui::SlideAnimation> background_color_animation_; |
58 | 59 |
59 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarBase); | 60 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarBase); |
60 }; | 61 }; |
61 | 62 |
62 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_TRANSLATE_INFOBAR_BASE_H_ | 63 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_TRANSLATE_INFOBAR_BASE_H_ |
OLD | NEW |