OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 | 183 |
184 content_width_ = max_width; | 184 content_width_ = max_width; |
185 content_height_ = font.GetFontSize(); | 185 content_height_ = font.GetFontSize(); |
186 } | 186 } |
187 | 187 |
188 void NativeComboboxViews::UpdateSelectedItem() { | 188 void NativeComboboxViews::UpdateSelectedItem() { |
189 selected_item_ = combobox_->selected_item(); | 189 selected_item_ = combobox_->selected_item(); |
190 } | 190 } |
191 | 191 |
192 void NativeComboboxViews::UpdateEnabled() { | 192 void NativeComboboxViews::UpdateEnabled() { |
193 SetEnabled(combobox_->IsEnabled()); | 193 SetEnabled(combobox_->enabled()); |
194 } | 194 } |
195 | 195 |
196 int NativeComboboxViews::GetSelectedItem() const { | 196 int NativeComboboxViews::GetSelectedItem() const { |
197 return selected_item_; | 197 return selected_item_; |
198 } | 198 } |
199 | 199 |
200 bool NativeComboboxViews::IsDropdownOpen() const { | 200 bool NativeComboboxViews::IsDropdownOpen() const { |
201 return dropdown_open_; | 201 return dropdown_open_; |
202 } | 202 } |
203 | 203 |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 | 377 |
378 #if defined(USE_AURA) | 378 #if defined(USE_AURA) |
379 // static | 379 // static |
380 NativeComboboxWrapper* NativeComboboxWrapper::CreateWrapper( | 380 NativeComboboxWrapper* NativeComboboxWrapper::CreateWrapper( |
381 Combobox* combobox) { | 381 Combobox* combobox) { |
382 return new NativeComboboxViews(combobox); | 382 return new NativeComboboxViews(combobox); |
383 } | 383 } |
384 #endif | 384 #endif |
385 | 385 |
386 } // namespace views | 386 } // namespace views |
OLD | NEW |