diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-29 16:34:05 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-29 16:34:05 +0000 |
commit | ed0b22ff3f9a1b5b190585dbdb8e9cd0d4742839 (patch) | |
tree | c4ce615f7fc3e3da612015ee553e2ee3a503e1ec /ui/views/examples/double_split_view_example.cc | |
parent | e86d8ba236502e2e5796bbbf7c8fcda512e51838 (diff) | |
download | chromium_src-ed0b22ff3f9a1b5b190585dbdb8e9cd0d4742839.zip chromium_src-ed0b22ff3f9a1b5b190585dbdb8e9cd0d4742839.tar.gz chromium_src-ed0b22ff3f9a1b5b190585dbdb8e9cd0d4742839.tar.bz2 |
jGet the examples to run in aura_shell.
. Reorganizes views_examples target into two: views_examples_lib (a component) and views_examples_exe (a runner in views, which builds in Aura but does not run without crashing due to lack of desktop environment).
. Refactors ExamplesMain into ExamplesWindowContents, a contents view that hosts the examples UI. Makes a publicly exported function from views examples to show a window containing this view.
. Moves the examples into the views namespace.
. Adds a button to launch the ExamplesWindow inside aura_shell.
. Adds a NativeTabbedPaneViews to host the examples content. This is not a production class and is mostly just intended to get something onto the screen. The code is copy-pasta from NativeTabbedPaneWin. I imagine we can get rid of all of this once we stop using TabbedPanes in Chrome.
http://crbug.com/105622
TEST=none
Review URL: http://codereview.chromium.org/8687013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111954 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/examples/double_split_view_example.cc')
-rw-r--r-- | ui/views/examples/double_split_view_example.cc | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/ui/views/examples/double_split_view_example.cc b/ui/views/examples/double_split_view_example.cc index e2a43bc..516c191 100644 --- a/ui/views/examples/double_split_view_example.cc +++ b/ui/views/examples/double_split_view_example.cc @@ -42,39 +42,41 @@ gfx::Size SplittedView::GetMinimumSize() { } // namespace +namespace views { namespace examples { -DoubleSplitViewExample::DoubleSplitViewExample(ExamplesMain* main) - : ExampleBase(main, "Double Split View") { +DoubleSplitViewExample::DoubleSplitViewExample() + : ExampleBase("Double Split View") { } DoubleSplitViewExample::~DoubleSplitViewExample() { } -void DoubleSplitViewExample::CreateExampleView(views::View* container) { +void DoubleSplitViewExample::CreateExampleView(View* container) { SplittedView* splitted_view_1 = new SplittedView(); SplittedView* splitted_view_2 = new SplittedView(); SplittedView* splitted_view_3 = new SplittedView(); - inner_single_split_view_ = new views::SingleSplitView( + inner_single_split_view_ = new SingleSplitView( splitted_view_1, splitted_view_2, - views::SingleSplitView::HORIZONTAL_SPLIT, + SingleSplitView::HORIZONTAL_SPLIT, NULL); - outer_single_split_view_ = new views::SingleSplitView( + outer_single_split_view_ = new SingleSplitView( inner_single_split_view_, splitted_view_3, - views::SingleSplitView::HORIZONTAL_SPLIT, + SingleSplitView::HORIZONTAL_SPLIT, NULL); - views::GridLayout* layout = new views::GridLayout(container); + GridLayout* layout = new GridLayout(container); container->SetLayoutManager(layout); // Add scroll view. - 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(outer_single_split_view_); } } // namespace examples +} // namespace views |