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

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

Issue 8687013: Get the examples to run in aura_shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/examples/progress_bar_example.h ('k') | ui/views/examples/radio_button_example.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/progress_bar_example.cc
===================================================================
--- ui/views/examples/progress_bar_example.cc (revision 111815)
+++ ui/views/examples/progress_bar_example.cc (working copy)
@@ -20,10 +20,11 @@
} // namespace
+namespace views {
namespace examples {
-ProgressBarExample::ProgressBarExample(ExamplesMain* main)
- : ExampleBase(main, "Progress Bar"),
+ProgressBarExample::ProgressBarExample()
+ : ExampleBase("Progress Bar"),
minus_button_(NULL),
plus_button_(NULL),
progress_bar_(NULL),
@@ -33,31 +34,30 @@
ProgressBarExample::~ProgressBarExample() {
}
-void ProgressBarExample::CreateExampleView(views::View* container) {
- views::GridLayout* layout = new views::GridLayout(container);
+void ProgressBarExample::CreateExampleView(View* container) {
+ GridLayout* layout = new GridLayout(container);
container->SetLayoutManager(layout);
- views::ColumnSet* column_set = layout->AddColumnSet(0);
- column_set->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL,
- 0, views::GridLayout::USE_PREF, 0, 0);
+ ColumnSet* column_set = layout->AddColumnSet(0);
+ column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL,
+ 0, GridLayout::USE_PREF, 0, 0);
column_set->AddPaddingColumn(0, 8);
- column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL,
- 1, views::GridLayout::USE_PREF, 0, 0);
+ column_set->AddColumn(GridLayout::FILL, GridLayout::FILL,
+ 1, GridLayout::USE_PREF, 0, 0);
column_set->AddPaddingColumn(0, 8);
- column_set->AddColumn(views::GridLayout::TRAILING, views::GridLayout::FILL,
- 0, views::GridLayout::USE_PREF, 0, 0);
+ column_set->AddColumn(GridLayout::TRAILING, GridLayout::FILL,
+ 0, GridLayout::USE_PREF, 0, 0);
layout->StartRow(0, 0);
- minus_button_ = new views::TextButton(this, ASCIIToUTF16("-"));
+ minus_button_ = new TextButton(this, ASCIIToUTF16("-"));
layout->AddView(minus_button_);
- progress_bar_ = new views::ProgressBar();
+ progress_bar_ = new ProgressBar();
layout->AddView(progress_bar_);
- plus_button_ = new views::TextButton(this, ASCIIToUTF16("+"));
+ plus_button_ = new TextButton(this, ASCIIToUTF16("+"));
layout->AddView(plus_button_);
}
-void ProgressBarExample::ButtonPressed(views::Button* sender,
- const views::Event& event) {
+void ProgressBarExample::ButtonPressed(Button* sender, const Event& event) {
if (sender == minus_button_)
current_percent_ = ClampToMin(current_percent_ - kStepSize);
else if (sender == plus_button_)
@@ -67,3 +67,4 @@
}
} // namespace examples
+} // namespace views
« no previous file with comments | « ui/views/examples/progress_bar_example.h ('k') | ui/views/examples/radio_button_example.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698