| 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 "grit/ui_resources.h" | 9 #include "grit/ui_resources.h" |
| 10 #include "ui/base/keycodes/keyboard_codes.h" | 10 #include "ui/base/keycodes/keyboard_codes.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 namespace views { | 51 namespace views { |
| 52 | 52 |
| 53 const char NativeComboboxViews::kViewClassName[] = | 53 const char NativeComboboxViews::kViewClassName[] = |
| 54 "views/NativeComboboxViews"; | 54 "views/NativeComboboxViews"; |
| 55 | 55 |
| 56 NativeComboboxViews::NativeComboboxViews(Combobox* combobox) | 56 NativeComboboxViews::NativeComboboxViews(Combobox* combobox) |
| 57 : combobox_(combobox), | 57 : combobox_(combobox), |
| 58 text_border_(new FocusableBorder()), | 58 text_border_(new FocusableBorder()), |
| 59 disclosure_arrow_(ui::ResourceBundle::GetSharedInstance().GetImageNamed( | 59 disclosure_arrow_(ui::ResourceBundle::GetSharedInstance().GetImageNamed( |
| 60 IDR_DISCLOSURE_ARROW).ToSkBitmap()), | 60 IDR_DISCLOSURE_ARROW).ToImageSkia()), |
| 61 dropdown_open_(false), | 61 dropdown_open_(false), |
| 62 selected_index_(-1), | 62 selected_index_(-1), |
| 63 content_width_(0), | 63 content_width_(0), |
| 64 content_height_(0) { | 64 content_height_(0) { |
| 65 set_border(text_border_); | 65 set_border(text_border_); |
| 66 } | 66 } |
| 67 | 67 |
| 68 NativeComboboxViews::~NativeComboboxViews() { | 68 NativeComboboxViews::~NativeComboboxViews() { |
| 69 } | 69 } |
| 70 | 70 |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 | 347 |
| 348 #if defined(USE_AURA) | 348 #if defined(USE_AURA) |
| 349 // static | 349 // static |
| 350 NativeComboboxWrapper* NativeComboboxWrapper::CreateWrapper( | 350 NativeComboboxWrapper* NativeComboboxWrapper::CreateWrapper( |
| 351 Combobox* combobox) { | 351 Combobox* combobox) { |
| 352 return new NativeComboboxViews(combobox); | 352 return new NativeComboboxViews(combobox); |
| 353 } | 353 } |
| 354 #endif | 354 #endif |
| 355 | 355 |
| 356 } // namespace views | 356 } // namespace views |
| OLD | NEW |