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

Unified Diff: ui/views/examples/throbber_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/throbber_example.h ('k') | ui/views/examples/widget_example.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/throbber_example.cc
===================================================================
--- ui/views/examples/throbber_example.cc (revision 111815)
+++ ui/views/examples/throbber_example.cc (working copy)
@@ -8,15 +8,18 @@
#include "views/controls/throbber.h"
#include "views/view.h"
+namespace views {
+namespace examples {
+
namespace {
// Time in ms per throbber frame.
const int kThrobberFrameMs = 60;
-class ThrobberView : public views::View {
+class ThrobberView : public View {
public:
ThrobberView() {
- throbber_ = new views::Throbber(kThrobberFrameMs, false);
+ throbber_ = new Throbber(kThrobberFrameMs, false);
AddChildView(throbber_);
throbber_->SetVisible(true);
throbber_->Start();
@@ -27,7 +30,7 @@
}
virtual void Layout() {
- views::View* child = child_at(0);
+ View* child = child_at(0);
gfx::Size ps = child->GetPreferredSize();
child->SetBounds((width() - ps.width()) / 2,
(height() - ps.height()) / 2,
@@ -36,25 +39,23 @@
}
private:
- views::Throbber* throbber_;
+ Throbber* throbber_;
DISALLOW_COPY_AND_ASSIGN(ThrobberView);
};
} // namespace
-namespace examples {
-
-ThrobberExample::ThrobberExample(ExamplesMain* main)
- : ExampleBase(main, "Throbber") {
+ThrobberExample::ThrobberExample() : ExampleBase("Throbber") {
}
ThrobberExample::~ThrobberExample() {
}
-void ThrobberExample::CreateExampleView(views::View* container) {
- container->SetLayoutManager(new views::FillLayout());
+void ThrobberExample::CreateExampleView(View* container) {
+ container->SetLayoutManager(new FillLayout());
container->AddChildView(new ThrobberView());
}
} // namespace examples
+} // namespace views
« no previous file with comments | « ui/views/examples/throbber_example.h ('k') | ui/views/examples/widget_example.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698