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

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

Issue 7846010: Fixed crash when a SinglesplitView gets embdedded inside SingleSplitView (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 3 months 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
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/examples_main.h" 5 #include "views/examples/examples_main.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/i18n/icu_util.h" 9 #include "base/i18n/icu_util.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "ui/base/resource/resource_bundle.h" 12 #include "ui/base/resource/resource_bundle.h"
13 #include "ui/base/ui_base_paths.h" 13 #include "ui/base/ui_base_paths.h"
14 #include "views/controls/button/text_button.h" 14 #include "views/controls/button/text_button.h"
15 #include "views/controls/label.h" 15 #include "views/controls/label.h"
16 #include "views/controls/tabbed_pane/tabbed_pane.h" 16 #include "views/controls/tabbed_pane/tabbed_pane.h"
17 #include "views/examples/button_example.h" 17 #include "views/examples/button_example.h"
18 #include "views/examples/combobox_example.h" 18 #include "views/examples/combobox_example.h"
19 #include "views/examples/double_split_view_example.h"
19 #include "views/examples/link_example.h" 20 #include "views/examples/link_example.h"
20 #include "views/examples/menu_example.h" 21 #include "views/examples/menu_example.h"
21 #include "views/examples/message_box_example.h" 22 #include "views/examples/message_box_example.h"
22 #include "views/examples/native_theme_button_example.h" 23 #include "views/examples/native_theme_button_example.h"
23 #include "views/examples/native_theme_checkbox_example.h" 24 #include "views/examples/native_theme_checkbox_example.h"
24 #include "views/examples/native_widget_views_example.h" 25 #include "views/examples/native_widget_views_example.h"
25 #include "views/examples/radio_button_example.h" 26 #include "views/examples/radio_button_example.h"
26 #include "views/examples/scroll_view_example.h" 27 #include "views/examples/scroll_view_example.h"
27 #include "views/examples/single_split_view_example.h" 28 #include "views/examples/single_split_view_example.h"
28 #include "views/examples/tabbed_pane_example.h" 29 #include "views/examples/tabbed_pane_example.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 layout->StartRow(1, 0); 102 layout->StartRow(1, 0);
102 layout->AddView(tabbed_pane); 103 layout->AddView(tabbed_pane);
103 layout->StartRow(0 /* no expand */, 0); 104 layout->StartRow(0 /* no expand */, 0);
104 layout->AddView(status_label_); 105 layout->AddView(status_label_);
105 106
106 // TODO(satorux): The window is getting wide. Eventually, we would have 107 // TODO(satorux): The window is getting wide. Eventually, we would have
107 // the second tabbed pane. 108 // the second tabbed pane.
108 views::Widget* window = 109 views::Widget* window =
109 views::Widget::CreateWindowWithBounds(this, gfx::Rect(0, 0, 850, 300)); 110 views::Widget::CreateWindowWithBounds(this, gfx::Rect(0, 0, 850, 300));
110 111
112
111 examples::NativeThemeCheckboxExample native_theme_checkbox_example(this); 113 examples::NativeThemeCheckboxExample native_theme_checkbox_example(this);
112 tabbed_pane->AddTab(native_theme_checkbox_example.GetExampleTitle(), 114 tabbed_pane->AddTab(native_theme_checkbox_example.GetExampleTitle(),
113 native_theme_checkbox_example.GetExampleView()); 115 native_theme_checkbox_example.GetExampleView());
114 116
117 examples::DoubleSplitViewExample double_split_view_example(this);
118 tabbed_pane->AddTab(double_split_view_example.GetExampleTitle(),
119 double_split_view_example.GetExampleView());
120
115 examples::NativeThemeButtonExample native_theme_button_example(this); 121 examples::NativeThemeButtonExample native_theme_button_example(this);
116 tabbed_pane->AddTab(native_theme_button_example.GetExampleTitle(), 122 tabbed_pane->AddTab(native_theme_button_example.GetExampleTitle(),
117 native_theme_button_example.GetExampleView()); 123 native_theme_button_example.GetExampleView());
118 124
119 examples::NativeWidgetViewsExample native_widget_views_example(this); 125 examples::NativeWidgetViewsExample native_widget_views_example(this);
120 tabbed_pane->AddTab(native_widget_views_example.GetExampleTitle(), 126 tabbed_pane->AddTab(native_widget_views_example.GetExampleTitle(),
121 native_widget_views_example.GetExampleView()); 127 native_widget_views_example.GetExampleView());
122 128
123 examples::TextfieldExample textfield_example(this); 129 examples::TextfieldExample textfield_example(this);
124 tabbed_pane->AddTab(textfield_example.GetExampleTitle(), 130 tabbed_pane->AddTab(textfield_example.GetExampleTitle(),
(...skipping 28 matching lines...) Expand all
153 radio_button_example.GetExampleView()); 159 radio_button_example.GetExampleView());
154 160
155 examples::ScrollViewExample scroll_view_example(this); 161 examples::ScrollViewExample scroll_view_example(this);
156 tabbed_pane->AddTab(scroll_view_example.GetExampleTitle(), 162 tabbed_pane->AddTab(scroll_view_example.GetExampleTitle(),
157 scroll_view_example.GetExampleView()); 163 scroll_view_example.GetExampleView());
158 164
159 examples::SingleSplitViewExample single_split_view_example(this); 165 examples::SingleSplitViewExample single_split_view_example(this);
160 tabbed_pane->AddTab(single_split_view_example.GetExampleTitle(), 166 tabbed_pane->AddTab(single_split_view_example.GetExampleTitle(),
161 single_split_view_example.GetExampleView()); 167 single_split_view_example.GetExampleView());
162 168
169
sky 2011/09/08 14:27:11 remove both of these lines.
Gajen 2011/09/09 13:58:02 Done.
170
163 #if defined(OS_WIN) 171 #if defined(OS_WIN)
164 examples::TableExample table_example(this); 172 examples::TableExample table_example(this);
165 tabbed_pane->AddTab(table_example.GetExampleTitle(), 173 tabbed_pane->AddTab(table_example.GetExampleTitle(),
166 table_example.GetExampleView()); 174 table_example.GetExampleView());
167 #endif 175 #endif
168 176
169 examples::Table2Example table2_example(this); 177 examples::Table2Example table2_example(this);
170 tabbed_pane->AddTab(table2_example.GetExampleTitle(), 178 tabbed_pane->AddTab(table2_example.GetExampleTitle(),
171 table2_example.GetExampleView()); 179 table2_example.GetExampleView());
172 180
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 CommandLine::ForCurrentProcess()->HasSwitch("use-pure-views")); 212 CommandLine::ForCurrentProcess()->HasSwitch("use-pure-views"));
205 213
206 examples::ExamplesMain main; 214 examples::ExamplesMain main;
207 main.Run(); 215 main.Run();
208 216
209 #if defined(OS_WIN) 217 #if defined(OS_WIN)
210 OleUninitialize(); 218 OleUninitialize();
211 #endif 219 #endif
212 return 0; 220 return 0;
213 } 221 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698