Chromium Code Reviews| Index: ui/views/controls/combobox/native_combobox_views.cc |
| diff --git a/ui/views/controls/combobox/native_combobox_views.cc b/ui/views/controls/combobox/native_combobox_views.cc |
| index 95fb42890f813fcf11b535550a62fc86f324e1d7..df398fc31ed79271026b6ebcc036053ec1e38bf7 100644 |
| --- a/ui/views/controls/combobox/native_combobox_views.cc |
| +++ b/ui/views/controls/combobox/native_combobox_views.cc |
| @@ -48,6 +48,11 @@ const SkColor kTextColor = SK_ColorBLACK; |
| // Define the id of the first item in the menu (since it needs to be > 0) |
| const int kFirstMenuItemId = 1000; |
| +const gfx::Font& GetFont() { |
|
sky
2012/03/23 15:36:38
Maybe we should promote this to combobox so that b
|
| + ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| + return rb.GetFont(ui::ResourceBundle::BaseFont); |
| +} |
| + |
| } // namespace |
| namespace views { |
| @@ -160,7 +165,7 @@ void NativeComboboxViews::OnBlur() { |
| void NativeComboboxViews::UpdateFromModel() { |
| int max_width = 0; |
| - const gfx::Font &font = GetFont(); |
| + const gfx::Font& font = GetFont(); |
| MenuItemView* menu = new MenuItemView(this); |
| // MenuRunner owns |menu|. |
| @@ -268,11 +273,6 @@ bool NativeComboboxViews::GetAccelerator(int id, ui::Accelerator* accel) { |
| ///////////////////////////////////////////////////////////////// |
| // NativeComboboxViews private methods: |
| -const gfx::Font& NativeComboboxViews::GetFont() const { |
| - ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| - return rb.GetFont(ResourceBundle::BaseFont); |
| -} |
| - |
| void NativeComboboxViews::AdjustBoundsForRTLUI(gfx::Rect* rect) const { |
| rect->set_x(GetMirroredXForRect(*rect)); |
| } |