| 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_BEFORE_TRANSLATE_INFOBAR_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_INFOBARS_BEFORE_TRANSLATE_INFOBAR_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_BEFORE_TRANSLATE_INFOBAR_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_BEFORE_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 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 private: | 25 private: |
| 26 virtual ~BeforeTranslateInfoBar(); | 26 virtual ~BeforeTranslateInfoBar(); |
| 27 | 27 |
| 28 // TranslateInfoBarBase: | 28 // TranslateInfoBarBase: |
| 29 virtual void Layout() OVERRIDE; | 29 virtual void Layout() OVERRIDE; |
| 30 virtual void ButtonPressed(views::Button* sender, | 30 virtual void ButtonPressed(views::Button* sender, |
| 31 const ui::Event& event) OVERRIDE; | 31 const ui::Event& event) OVERRIDE; |
| 32 virtual void ViewHierarchyChanged( | 32 virtual void ViewHierarchyChanged( |
| 33 const ViewHierarchyChangedDetails& details) OVERRIDE; | 33 const ViewHierarchyChangedDetails& details) OVERRIDE; |
| 34 virtual int ContentMinimumWidth() OVERRIDE; | 34 virtual int ContentMinimumWidth() const OVERRIDE; |
| 35 | 35 |
| 36 // views::MenuButtonListener: | 36 // views::MenuButtonListener: |
| 37 virtual void OnMenuButtonClicked(views::View* source, | 37 virtual void OnMenuButtonClicked(views::View* source, |
| 38 const gfx::Point& point) OVERRIDE; | 38 const gfx::Point& point) OVERRIDE; |
| 39 | 39 |
| 40 // Returns the width of all content other than the labels. Layout() uses this | 40 // Returns the width of all content other than the labels. Layout() uses this |
| 41 // to determine how much space the labels can take. | 41 // to determine how much space the labels can take. |
| 42 int NonLabelWidth() const; | 42 int NonLabelWidth() const; |
| 43 | 43 |
| 44 // The text displayed in the infobar is something like: | 44 // The text displayed in the infobar is something like: |
| (...skipping 10 matching lines...) Expand all Loading... |
| 55 views::LabelButton* always_translate_button_; | 55 views::LabelButton* always_translate_button_; |
| 56 views::MenuButton* options_menu_button_; | 56 views::MenuButton* options_menu_button_; |
| 57 | 57 |
| 58 scoped_ptr<TranslateLanguageMenuModel> language_menu_model_; | 58 scoped_ptr<TranslateLanguageMenuModel> language_menu_model_; |
| 59 scoped_ptr<OptionsMenuModel> options_menu_model_; | 59 scoped_ptr<OptionsMenuModel> options_menu_model_; |
| 60 | 60 |
| 61 DISALLOW_COPY_AND_ASSIGN(BeforeTranslateInfoBar); | 61 DISALLOW_COPY_AND_ASSIGN(BeforeTranslateInfoBar); |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_BEFORE_TRANSLATE_INFOBAR_H_ | 64 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_BEFORE_TRANSLATE_INFOBAR_H_ |
| OLD | NEW |