| 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 #include "ui/views/controls/combobox/native_combobox_views.h" | 5 #include "ui/views/controls/combobox/native_combobox_views.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // Define the id of the first item in the menu (since it needs to be > 0) | 48 // Define the id of the first item in the menu (since it needs to be > 0) |
| 49 const int kFirstMenuItemId = 1000; | 49 const int kFirstMenuItemId = 1000; |
| 50 | 50 |
| 51 } // namespace | 51 } // namespace |
| 52 | 52 |
| 53 namespace views { | 53 namespace views { |
| 54 | 54 |
| 55 const char NativeComboboxViews::kViewClassName[] = | 55 const char NativeComboboxViews::kViewClassName[] = |
| 56 "views/NativeComboboxViews"; | 56 "views/NativeComboboxViews"; |
| 57 | 57 |
| 58 NativeComboboxViews::NativeComboboxViews(Combobox* combo_box) | 58 NativeComboboxViews::NativeComboboxViews(Combobox* combobox) |
| 59 : combobox_(combo_box), | 59 : combobox_(combobox), |
| 60 text_border_(new FocusableBorder()), | 60 text_border_(new FocusableBorder()), |
| 61 disclosure_arrow_(ui::ResourceBundle::GetSharedInstance().GetImageNamed( | 61 disclosure_arrow_(ui::ResourceBundle::GetSharedInstance().GetImageNamed( |
| 62 IDR_DISCLOSURE_ARROW).ToSkBitmap()), | 62 IDR_DISCLOSURE_ARROW).ToSkBitmap()), |
| 63 dropdown_open_(false), | 63 dropdown_open_(false), |
| 64 selected_index_(-1), | 64 selected_index_(-1), |
| 65 content_width_(0), | 65 content_width_(0), |
| 66 content_height_(0) { | 66 content_height_(0) { |
| 67 set_border(text_border_); | 67 set_border(text_border_); |
| 68 } | 68 } |
| 69 | 69 |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 | 349 |
| 350 #if defined(USE_AURA) | 350 #if defined(USE_AURA) |
| 351 // static | 351 // static |
| 352 NativeComboboxWrapper* NativeComboboxWrapper::CreateWrapper( | 352 NativeComboboxWrapper* NativeComboboxWrapper::CreateWrapper( |
| 353 Combobox* combobox) { | 353 Combobox* combobox) { |
| 354 return new NativeComboboxViews(combobox); | 354 return new NativeComboboxViews(combobox); |
| 355 } | 355 } |
| 356 #endif | 356 #endif |
| 357 | 357 |
| 358 } // namespace views | 358 } // namespace views |
| OLD | NEW |