Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Unified Diff: ui/views/examples/native_theme_button_example.cc

Issue 9875001: views: Rename Combobox "selected getter/setter" accessors to something more accurate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: combo box -> combobox Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/examples/combobox_example.cc ('k') | ui/views/examples/text_example.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/native_theme_button_example.cc
diff --git a/ui/views/examples/native_theme_button_example.cc b/ui/views/examples/native_theme_button_example.cc
index 7d738154fe5b5c602b3c4cb39282ef15e1bb75ad..9e38467a0a41f9bedbee0179609f7fc3be3e7248 100644
--- a/ui/views/examples/native_theme_button_example.cc
+++ b/ui/views/examples/native_theme_button_example.cc
@@ -98,8 +98,7 @@ void ExampleNativeThemeButton::ItemChanged(Combobox* combo_box,
}
gfx::NativeTheme::Part ExampleNativeThemeButton::GetThemePart() const {
- int selected = cb_part_->selected_item();
- switch (selected) {
+ switch (cb_part_->selected_index()) {
case 0:
return gfx::NativeTheme::kPushButton;
case 1:
@@ -127,7 +126,7 @@ gfx::NativeTheme::State ExampleNativeThemeButton::GetThemeState(
gfx::NativeTheme::ExtraParams* params) const {
GetExtraParams(params);
- int selected = cb_state_->selected_item();
+ int selected = cb_state_->selected_index();
if (selected > 3) {
switch (state()) {
case BS_DISABLED:
@@ -170,8 +169,7 @@ void ExampleNativeThemeButton::GetExtraParams(
}
const ui::Animation* ExampleNativeThemeButton::GetThemeAnimation() const {
- int selected = cb_state_->selected_item();
- return selected <= 3 ? NULL : hover_animation_.get();
+ return cb_state_->selected_index() <= 3 ? NULL : hover_animation_.get();
}
gfx::NativeTheme::State ExampleNativeThemeButton::GetBackgroundThemeState(
@@ -224,14 +222,14 @@ void NativeThemeButtonExample::CreateExampleView(View* container) {
layout->AddView(new Label(ASCIIToUTF16("Part:")));
Combobox* cb_part = new Combobox(
new ExampleComboboxModel(kParts, arraysize(kParts)));
- cb_part->SetSelectedItem(0);
+ cb_part->SetSelectedIndex(0);
layout->AddView(cb_part);
layout->StartRow(0, 0);
layout->AddView(new Label(ASCIIToUTF16("State:")));
Combobox* cb_state = new Combobox(
new ExampleComboboxModel(kStates, arraysize(kStates)));
- cb_state->SetSelectedItem(0);
+ cb_state->SetSelectedIndex(0);
layout->AddView(cb_state);
layout->AddPaddingRow(0, 32);
« no previous file with comments | « ui/views/examples/combobox_example.cc ('k') | ui/views/examples/text_example.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698