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/combobox.h" | 5 #include "ui/views/controls/combobox/combobox.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "ui/base/accessibility/accessible_view_state.h" | 9 #include "ui/base/accessibility/accessible_view_state.h" |
10 #include "ui/base/events/event.h" | 10 #include "ui/base/events/event.h" |
11 #include "ui/base/keycodes/keyboard_codes.h" | 11 #include "ui/base/keycodes/keyboard_codes.h" |
12 #include "ui/base/models/combobox_model.h" | 12 #include "ui/base/models/combobox_model.h" |
13 #include "ui/base/resource/resource_bundle.h" | 13 #include "ui/base/resource/resource_bundle.h" |
14 #include "ui/views/controls/combobox/combobox_listener.h" | 14 #include "ui/views/controls/combobox/combobox_listener.h" |
15 #include "ui/views/controls/native/native_view_host.h" | 15 #include "ui/views/controls/native/native_view_host.h" |
16 #include "ui/views/widget/widget.h" | 16 #include "ui/views/widget/widget.h" |
17 | 17 |
18 namespace views { | 18 namespace views { |
19 | 19 |
20 // static | 20 // static |
21 const char Combobox::kViewClassName[] = "views/Combobox"; | 21 const char Combobox::kViewClassName[] = "Combobox"; |
22 | 22 |
23 //////////////////////////////////////////////////////////////////////////////// | 23 //////////////////////////////////////////////////////////////////////////////// |
24 // Combobox, public: | 24 // Combobox, public: |
25 | 25 |
26 Combobox::Combobox(ui::ComboboxModel* model) | 26 Combobox::Combobox(ui::ComboboxModel* model) |
27 : native_wrapper_(NULL), | 27 : native_wrapper_(NULL), |
28 model_(model), | 28 model_(model), |
29 listener_(NULL), | 29 listener_(NULL), |
30 selected_index_(model_->GetDefaultIndex()), | 30 selected_index_(model_->GetDefaultIndex()), |
31 invalid_(false) { | 31 invalid_(false) { |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 native_wrapper_->UpdateSelectedIndex(); | 154 native_wrapper_->UpdateSelectedIndex(); |
155 native_wrapper_->UpdateEnabled(); | 155 native_wrapper_->UpdateEnabled(); |
156 } | 156 } |
157 } | 157 } |
158 | 158 |
159 const char* Combobox::GetClassName() const { | 159 const char* Combobox::GetClassName() const { |
160 return kViewClassName; | 160 return kViewClassName; |
161 } | 161 } |
162 | 162 |
163 } // namespace views | 163 } // namespace views |
OLD | NEW |