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

Side by Side Diff: views/examples/native_theme_checkbox_example.cc

Issue 8395016: views/examples: Alphabetize examples list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix the tab titles Created 9 years, 1 month 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 | « views/examples/examples_main.cc ('k') | views/examples/native_widget_views_example.cc » ('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) 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 "views/examples/native_theme_checkbox_example.h" 5 #include "views/examples/native_theme_checkbox_example.h"
6 6
7 #include "base/stringprintf.h" 7 #include "base/stringprintf.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "views/controls/button/checkbox.h" 9 #include "views/controls/button/checkbox.h"
10 #include "views/controls/button/radio_button.h" 10 #include "views/controls/button/radio_button.h"
11 #include "views/layout/fill_layout.h" 11 #include "views/layout/fill_layout.h"
12 12
13 namespace examples { 13 namespace examples {
14 14
15 NativeThemeCheckboxExample::NativeThemeCheckboxExample(ExamplesMain* main) 15 NativeThemeCheckboxExample::NativeThemeCheckboxExample(ExamplesMain* main)
16 : ExampleBase(main, "Checkbox"), 16 : ExampleBase(main, "Native Theme Checkbox"),
17 count_(0) { 17 count_(0) {
18 } 18 }
19 19
20 NativeThemeCheckboxExample::~NativeThemeCheckboxExample() { 20 NativeThemeCheckboxExample::~NativeThemeCheckboxExample() {
21 } 21 }
22 22
23 void NativeThemeCheckboxExample::CreateExampleView(views::View* container) { 23 void NativeThemeCheckboxExample::CreateExampleView(views::View* container) {
24 button_ = new views::Checkbox(ASCIIToUTF16("Checkbox")); 24 button_ = new views::Checkbox(ASCIIToUTF16("Checkbox"));
25 button_->set_listener(this); 25 button_->set_listener(this);
26 container->SetLayoutManager(new views::FillLayout); 26 container->SetLayoutManager(new views::FillLayout);
27 container->AddChildView(button_); 27 container->AddChildView(button_);
28 } 28 }
29 29
30 void NativeThemeCheckboxExample::ButtonPressed(views::Button* sender, 30 void NativeThemeCheckboxExample::ButtonPressed(views::Button* sender,
31 const views::Event& event) { 31 const views::Event& event) {
32 PrintStatus(base::StringPrintf("Pressed! count: %d", ++count_).c_str()); 32 PrintStatus(base::StringPrintf("Pressed! count: %d", ++count_).c_str());
33 } 33 }
34 34
35 } // namespace examples 35 } // namespace examples
OLDNEW
« no previous file with comments | « views/examples/examples_main.cc ('k') | views/examples/native_widget_views_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698