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

Unified Diff: ui/views/examples/single_split_view_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/single_split_view_example.h ('k') | ui/views/examples/tabbed_pane_example.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/single_split_view_example.cc
===================================================================
--- ui/views/examples/single_split_view_example.cc (revision 111815)
+++ ui/views/examples/single_split_view_example.cc (working copy)
@@ -7,10 +7,12 @@
#include "ui/views/layout/grid_layout.h"
#include "views/controls/single_split_view.h"
+namespace views {
+namespace examples {
namespace {
// SingleSplitView's content, which draws gradient color on background.
-class SplittedView : public views::View {
+class SplittedView : public View {
public:
SplittedView();
virtual ~SplittedView();
@@ -18,7 +20,7 @@
void SetColor(SkColor from, SkColor to);
private:
- // Overridden from views::View:
+ // Overridden from View:
virtual gfx::Size GetPreferredSize() OVERRIDE;
virtual gfx::Size GetMinimumSize() OVERRIDE;
virtual void Layout() OVERRIDE;
@@ -34,7 +36,7 @@
}
void SplittedView::SetColor(SkColor from, SkColor to) {
- set_background(views::Background::CreateVerticalGradientBackground(from, to));
+ set_background(Background::CreateVerticalGradientBackground(from, to));
}
gfx::Size SplittedView::GetPreferredSize() {
@@ -51,39 +53,38 @@
} // namespace
-namespace examples {
-
-SingleSplitViewExample::SingleSplitViewExample(ExamplesMain* main)
- : ExampleBase(main, "Single Split View") {
+SingleSplitViewExample::SingleSplitViewExample()
+ : ExampleBase("Single Split View") {
}
SingleSplitViewExample::~SingleSplitViewExample() {
}
-void SingleSplitViewExample::CreateExampleView(views::View* container) {
+void SingleSplitViewExample::CreateExampleView(View* container) {
SplittedView* splitted_view_1 = new SplittedView;
SplittedView* splitted_view_2 = new SplittedView;
splitted_view_1->SetColor(SK_ColorYELLOW, SK_ColorCYAN);
- single_split_view_ = new views::SingleSplitView(
+ single_split_view_ = new SingleSplitView(
splitted_view_1, splitted_view_2,
- views::SingleSplitView::HORIZONTAL_SPLIT,
+ SingleSplitView::HORIZONTAL_SPLIT,
this);
- views::GridLayout* layout = new views::GridLayout(container);
+ GridLayout* layout = new GridLayout(container);
container->SetLayoutManager(layout);
- views::ColumnSet* column_set = layout->AddColumnSet(0);
- column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1,
- views::GridLayout::USE_PREF, 0, 0);
+ ColumnSet* column_set = layout->AddColumnSet(0);
+ column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1,
+ GridLayout::USE_PREF, 0, 0);
layout->StartRow(1, 0);
layout->AddView(single_split_view_);
}
-bool SingleSplitViewExample::SplitHandleMoved(views::SingleSplitView* sender) {
+bool SingleSplitViewExample::SplitHandleMoved(SingleSplitView* sender) {
PrintStatus("Splitter moved");
return true;
}
} // namespace examples
+} // namespace views
« no previous file with comments | « ui/views/examples/single_split_view_example.h ('k') | ui/views/examples/tabbed_pane_example.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698