OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/app_paths.h" | 7 #include "app/app_paths.h" |
8 #include "app/resource_bundle.h" | |
9 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
10 #include "base/command_line.h" | 9 #include "base/command_line.h" |
11 #include "base/i18n/icu_util.h" | 10 #include "base/i18n/icu_util.h" |
12 #include "base/process_util.h" | 11 #include "base/process_util.h" |
| 12 #include "ui/base/resource/resource_bundle.h" |
| 13 #include "ui/base/ui_base_paths.h" |
13 #include "views/controls/label.h" | 14 #include "views/controls/label.h" |
14 #include "views/controls/button/text_button.h" | 15 #include "views/controls/button/text_button.h" |
15 #include "views/examples/button_example.h" | 16 #include "views/examples/button_example.h" |
16 #include "views/examples/combobox_example.h" | 17 #include "views/examples/combobox_example.h" |
17 #include "views/examples/message_box_example.h" | 18 #include "views/examples/message_box_example.h" |
18 #include "views/examples/menu_example.h" | 19 #include "views/examples/menu_example.h" |
19 #include "views/examples/radio_button_example.h" | 20 #include "views/examples/radio_button_example.h" |
20 #include "views/examples/scroll_view_example.h" | 21 #include "views/examples/scroll_view_example.h" |
21 #include "views/examples/single_split_view_example.h" | 22 #include "views/examples/single_split_view_example.h" |
22 // Slider is not yet ported to Windows. | 23 // Slider is not yet ported to Windows. |
(...skipping 27 matching lines...) Expand all Loading... |
50 status_label_->SetText(status); | 51 status_label_->SetText(status); |
51 } | 52 } |
52 | 53 |
53 void ExamplesMain::Run() { | 54 void ExamplesMain::Run() { |
54 base::EnableTerminationOnHeapCorruption(); | 55 base::EnableTerminationOnHeapCorruption(); |
55 | 56 |
56 // The exit manager is in charge of calling the dtors of singleton objects. | 57 // The exit manager is in charge of calling the dtors of singleton objects. |
57 base::AtExitManager exit_manager; | 58 base::AtExitManager exit_manager; |
58 | 59 |
59 app::RegisterPathProvider(); | 60 app::RegisterPathProvider(); |
| 61 ui::RegisterPathProvider(); |
60 | 62 |
61 icu_util::Initialize(); | 63 icu_util::Initialize(); |
62 | 64 |
63 ResourceBundle::InitSharedInstance("en-US"); | 65 ResourceBundle::InitSharedInstance("en-US"); |
64 | 66 |
65 MessageLoop main_message_loop(MessageLoop::TYPE_UI); | 67 MessageLoop main_message_loop(MessageLoop::TYPE_UI); |
66 | 68 |
67 // Creates a window with the tabbed pane for each examples, and | 69 // Creates a window with the tabbed pane for each examples, and |
68 // a label to print messages from each examples. | 70 // a label to print messages from each examples. |
69 DCHECK(contents_ == NULL) << "Run called more than once."; | 71 DCHECK(contents_ == NULL) << "Run called more than once."; |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 | 170 |
169 CommandLine::Init(argc, argv); | 171 CommandLine::Init(argc, argv); |
170 examples::ExamplesMain main; | 172 examples::ExamplesMain main; |
171 main.Run(); | 173 main.Run(); |
172 | 174 |
173 #if defined(OS_WIN) | 175 #if defined(OS_WIN) |
174 OleUninitialize(); | 176 OleUninitialize(); |
175 #endif | 177 #endif |
176 return 0; | 178 return 0; |
177 } | 179 } |
OLD | NEW |