| 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 UI_VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_VIEWS_H_ | 5 #ifndef UI_VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_VIEWS_H_ |
| 6 #define UI_VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_VIEWS_H_ | 6 #define UI_VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_VIEWS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ui/views/controls/combobox/native_combobox_wrapper.h" | 9 #include "ui/views/controls/combobox/native_combobox_wrapper.h" |
| 10 #include "ui/views/controls/menu/menu_delegate.h" | 10 #include "ui/views/controls/menu/menu_delegate.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // MenuDelegate overrides: | 57 // MenuDelegate overrides: |
| 58 virtual bool IsItemChecked(int id) const OVERRIDE; | 58 virtual bool IsItemChecked(int id) const OVERRIDE; |
| 59 virtual bool IsCommandEnabled(int id) const OVERRIDE; | 59 virtual bool IsCommandEnabled(int id) const OVERRIDE; |
| 60 virtual void ExecuteCommand(int id) OVERRIDE; | 60 virtual void ExecuteCommand(int id) OVERRIDE; |
| 61 virtual bool GetAccelerator(int id, ui::Accelerator* accelerator) OVERRIDE; | 61 virtual bool GetAccelerator(int id, ui::Accelerator* accelerator) OVERRIDE; |
| 62 | 62 |
| 63 // class name of internal | 63 // class name of internal |
| 64 static const char kViewClassName[]; | 64 static const char kViewClassName[]; |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 // Returns the Combobox's font. | |
| 68 const gfx::Font& GetFont() const; | |
| 69 | |
| 70 // Given bounds within our View, this helper routine mirrors the bounds if | 67 // Given bounds within our View, this helper routine mirrors the bounds if |
| 71 // necessary. | 68 // necessary. |
| 72 void AdjustBoundsForRTLUI(gfx::Rect* rect) const; | 69 void AdjustBoundsForRTLUI(gfx::Rect* rect) const; |
| 73 | 70 |
| 74 // Draw the selected value of the drop down list | 71 // Draw the selected value of the drop down list |
| 75 void PaintText(gfx::Canvas* canvas); | 72 void PaintText(gfx::Canvas* canvas); |
| 76 | 73 |
| 77 // Show the drop down list | 74 // Show the drop down list |
| 78 void ShowDropDownMenu(); | 75 void ShowDropDownMenu(); |
| 79 | 76 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 98 // The maximum dimensions of the content in the dropdown | 95 // The maximum dimensions of the content in the dropdown |
| 99 int content_width_; | 96 int content_width_; |
| 100 int content_height_; | 97 int content_height_; |
| 101 | 98 |
| 102 DISALLOW_COPY_AND_ASSIGN(NativeComboboxViews); | 99 DISALLOW_COPY_AND_ASSIGN(NativeComboboxViews); |
| 103 }; | 100 }; |
| 104 | 101 |
| 105 } // namespace views | 102 } // namespace views |
| 106 | 103 |
| 107 #endif // UI_VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_VIEWS_H_ | 104 #endif // UI_VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_VIEWS_H_ |
| OLD | NEW |