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_VIEWS_INFOBARS_AFTER_TRANSLATE_INFOBAR_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_INFOBARS_AFTER_TRANSLATE_INFOBAR_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_AFTER_TRANSLATE_INFOBAR_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_AFTER_TRANSLATE_INFOBAR_H_ |
7 | 7 |
8 #include "chrome/browser/ui/views/infobars/translate_infobar_base.h" | 8 #include "chrome/browser/ui/views/infobars/translate_infobar_base.h" |
9 #include "ui/views/controls/button/menu_button_listener.h" | 9 #include "ui/views/controls/button/menu_button_listener.h" |
10 | 10 |
11 class OptionsMenuModel; | 11 class OptionsMenuModel; |
12 class TranslateInfoBarDelegate; | 12 class TranslateInfoBarDelegate; |
13 class TranslateLanguageMenuModel; | 13 class TranslateLanguageMenuModel; |
14 | 14 |
15 namespace views { | 15 namespace views { |
16 class MenuButton; | 16 class MenuButton; |
17 } | 17 } |
18 | 18 |
19 class AfterTranslateInfoBar : public TranslateInfoBarBase, | 19 class AfterTranslateInfoBar : public TranslateInfoBarBase, |
20 public views::MenuButtonListener { | 20 public views::MenuButtonListener { |
21 public: | 21 public: |
22 explicit AfterTranslateInfoBar(scoped_ptr<TranslateInfoBarDelegate> delegate); | 22 AfterTranslateInfoBar(InfoBarService* owner, |
| 23 TranslateInfoBarDelegate* delegate); |
23 | 24 |
24 private: | 25 private: |
25 virtual ~AfterTranslateInfoBar(); | 26 virtual ~AfterTranslateInfoBar(); |
26 | 27 |
27 // TranslateInfoBarBase: | 28 // TranslateInfoBarBase: |
28 virtual void Layout() OVERRIDE; | 29 virtual void Layout() OVERRIDE; |
29 virtual void ViewHierarchyChanged( | 30 virtual void ViewHierarchyChanged( |
30 const ViewHierarchyChangedDetails& details) OVERRIDE; | 31 const ViewHierarchyChangedDetails& details) OVERRIDE; |
31 virtual void ButtonPressed(views::Button* sender, | 32 virtual void ButtonPressed(views::Button* sender, |
32 const ui::Event& event) OVERRIDE; | 33 const ui::Event& event) OVERRIDE; |
(...skipping 23 matching lines...) Expand all Loading... |
56 // True if the target language comes before the original one. | 57 // True if the target language comes before the original one. |
57 bool swapped_language_buttons_; | 58 bool swapped_language_buttons_; |
58 | 59 |
59 // True if the source language is expected to be determined by a server. | 60 // True if the source language is expected to be determined by a server. |
60 bool autodetermined_source_language_; | 61 bool autodetermined_source_language_; |
61 | 62 |
62 DISALLOW_COPY_AND_ASSIGN(AfterTranslateInfoBar); | 63 DISALLOW_COPY_AND_ASSIGN(AfterTranslateInfoBar); |
63 }; | 64 }; |
64 | 65 |
65 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_AFTER_TRANSLATE_INFOBAR_H_ | 66 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_AFTER_TRANSLATE_INFOBAR_H_ |
OLD | NEW |