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 AfterTranslateInfoBar(InfoBarService* owner, | 22 explicit AfterTranslateInfoBar(scoped_ptr<TranslateInfoBarDelegate> delegate); |
23 TranslateInfoBarDelegate* delegate); | |
24 | 23 |
25 private: | 24 private: |
26 virtual ~AfterTranslateInfoBar(); | 25 virtual ~AfterTranslateInfoBar(); |
27 | 26 |
28 // TranslateInfoBarBase: | 27 // TranslateInfoBarBase: |
29 virtual void Layout() OVERRIDE; | 28 virtual void Layout() OVERRIDE; |
30 virtual void ViewHierarchyChanged( | 29 virtual void ViewHierarchyChanged( |
31 const ViewHierarchyChangedDetails& details) OVERRIDE; | 30 const ViewHierarchyChangedDetails& details) OVERRIDE; |
32 virtual void ButtonPressed(views::Button* sender, | 31 virtual void ButtonPressed(views::Button* sender, |
33 const ui::Event& event) OVERRIDE; | 32 const ui::Event& event) OVERRIDE; |
(...skipping 23 matching lines...) Expand all Loading... |
57 // True if the target language comes before the original one. | 56 // True if the target language comes before the original one. |
58 bool swapped_language_buttons_; | 57 bool swapped_language_buttons_; |
59 | 58 |
60 // True if the source language is expected to be determined by a server. | 59 // True if the source language is expected to be determined by a server. |
61 bool autodetermined_source_language_; | 60 bool autodetermined_source_language_; |
62 | 61 |
63 DISALLOW_COPY_AND_ASSIGN(AfterTranslateInfoBar); | 62 DISALLOW_COPY_AND_ASSIGN(AfterTranslateInfoBar); |
64 }; | 63 }; |
65 | 64 |
66 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_AFTER_TRANSLATE_INFOBAR_H_ | 65 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_AFTER_TRANSLATE_INFOBAR_H_ |
OLD | NEW |