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

Side by Side Diff: ui/views/examples/native_theme_button_example.cc

Issue 9965017: views: Rename ComboboxListener::ItemChanged to something more accurate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: combo_box -> combobox Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/examples/native_theme_button_example.h ('k') | ui/views/examples/text_example.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/examples/native_theme_button_example.h" 5 #include "ui/views/examples/native_theme_button_example.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 message = is_checked_ ? "Checked! count:%d" : 84 message = is_checked_ ? "Checked! count:%d" :
85 is_indeterminate_ ? "Indeterminate! count:%d" : "Unchecked! count:%d"; 85 is_indeterminate_ ? "Indeterminate! count:%d" : "Unchecked! count:%d";
86 break; 86 break;
87 default: 87 default:
88 DCHECK(false); 88 DCHECK(false);
89 } 89 }
90 90
91 return base::StringPrintf(message, ++count_); 91 return base::StringPrintf(message, ++count_);
92 } 92 }
93 93
94 void ExampleNativeThemeButton::ItemChanged(Combobox* combo_box, 94 void ExampleNativeThemeButton::OnSelectedIndexChanged(Combobox* combobox) {
95 int prev_index,
96 int new_index) {
97 SchedulePaint(); 95 SchedulePaint();
98 } 96 }
99 97
100 gfx::NativeTheme::Part ExampleNativeThemeButton::GetThemePart() const { 98 gfx::NativeTheme::Part ExampleNativeThemeButton::GetThemePart() const {
101 switch (cb_part_->selected_index()) { 99 switch (cb_part_->selected_index()) {
102 case 0: 100 case 0:
103 return gfx::NativeTheme::kPushButton; 101 return gfx::NativeTheme::kPushButton;
104 case 1: 102 case 1:
105 return gfx::NativeTheme::kRadio; 103 return gfx::NativeTheme::kRadio;
106 case 2: 104 case 2:
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 layout->AddPaddingRow(0, 8); 247 layout->AddPaddingRow(0, 8);
250 } 248 }
251 249
252 void NativeThemeButtonExample::ButtonPressed(Button* sender, 250 void NativeThemeButtonExample::ButtonPressed(Button* sender,
253 const Event& event) { 251 const Event& event) {
254 PrintStatus(button_->MessWithState().c_str()); 252 PrintStatus(button_->MessWithState().c_str());
255 } 253 }
256 254
257 } // namespace examples 255 } // namespace examples
258 } // namespace views 256 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/examples/native_theme_button_example.h ('k') | ui/views/examples/text_example.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698