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 |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 private: | 24 private: |
25 virtual ~AfterTranslateInfoBar(); | 25 virtual ~AfterTranslateInfoBar(); |
26 | 26 |
27 // TranslateInfoBarBase: | 27 // TranslateInfoBarBase: |
28 virtual void Layout() OVERRIDE; | 28 virtual void Layout() OVERRIDE; |
29 virtual void ViewHierarchyChanged( | 29 virtual void ViewHierarchyChanged( |
30 const ViewHierarchyChangedDetails& details) OVERRIDE; | 30 const ViewHierarchyChangedDetails& details) OVERRIDE; |
31 virtual void ButtonPressed(views::Button* sender, | 31 virtual void ButtonPressed(views::Button* sender, |
32 const ui::Event& event) OVERRIDE; | 32 const ui::Event& event) OVERRIDE; |
33 virtual int ContentMinimumWidth() OVERRIDE; | 33 virtual int ContentMinimumWidth() const OVERRIDE; |
34 | 34 |
35 // views::MenuButtonListener: | 35 // views::MenuButtonListener: |
36 virtual void OnMenuButtonClicked(views::View* source, | 36 virtual void OnMenuButtonClicked(views::View* source, |
37 const gfx::Point& point) OVERRIDE; | 37 const gfx::Point& point) OVERRIDE; |
38 | 38 |
39 // The original and target language buttons can appear in either order, so | 39 // The original and target language buttons can appear in either order, so |
40 // this function provides a convenient way to just obtain the two in the | 40 // this function provides a convenient way to just obtain the two in the |
41 // correct visual order, as opposed to adding conditionals in multiple places. | 41 // correct visual order, as opposed to adding conditionals in multiple places. |
42 void GetButtons(views::MenuButton** first_button, | 42 void GetButtons(views::MenuButton** first_button, |
43 views::MenuButton** second_button) const; | 43 views::MenuButton** second_button) const; |
(...skipping 22 matching lines...) Expand all Loading... |
66 // True if the target language comes before the original one. | 66 // True if the target language comes before the original one. |
67 bool swapped_language_buttons_; | 67 bool swapped_language_buttons_; |
68 | 68 |
69 // True if the source language is expected to be determined by a server. | 69 // True if the source language is expected to be determined by a server. |
70 bool autodetermined_source_language_; | 70 bool autodetermined_source_language_; |
71 | 71 |
72 DISALLOW_COPY_AND_ASSIGN(AfterTranslateInfoBar); | 72 DISALLOW_COPY_AND_ASSIGN(AfterTranslateInfoBar); |
73 }; | 73 }; |
74 | 74 |
75 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_AFTER_TRANSLATE_INFOBAR_H_ | 75 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_AFTER_TRANSLATE_INFOBAR_H_ |
OLD | NEW |