OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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" | 8 #include "app/resource_bundle.h" |
9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
10 #include "base/i18n/icu_util.h" | 10 #include "base/i18n/icu_util.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 // The exit manager is in charge of calling the dtors of singleton objects. | 38 // The exit manager is in charge of calling the dtors of singleton objects. |
39 base::AtExitManager exit_manager; | 39 base::AtExitManager exit_manager; |
40 | 40 |
41 app::RegisterPathProvider(); | 41 app::RegisterPathProvider(); |
42 | 42 |
43 icu_util::Initialize(); | 43 icu_util::Initialize(); |
44 | 44 |
45 // This requires chrome to be built first right now. | 45 // This requires chrome to be built first right now. |
46 // TODO(oshima): fix build to include resource file. | 46 // TODO(oshima): fix build to include resource file. |
47 ResourceBundle::InitSharedInstance(L"en-US"); | 47 ResourceBundle::InitSharedInstance(L"en-US"); |
48 ResourceBundle::GetSharedInstance().LoadThemeResources(); | |
49 | 48 |
50 MessageLoop main_message_loop(MessageLoop::TYPE_UI); | 49 MessageLoop main_message_loop(MessageLoop::TYPE_UI); |
51 | 50 |
52 // Creates a window with the tabbed pane for each examples, and | 51 // Creates a window with the tabbed pane for each examples, and |
53 // a label to print messages from each examples. | 52 // a label to print messages from each examples. |
54 DCHECK(contents_ == NULL) << "Run called more than once."; | 53 DCHECK(contents_ == NULL) << "Run called more than once."; |
55 contents_ = new views::View(); | 54 contents_ = new views::View(); |
56 contents_->set_background(views::Background::CreateStandardPanelBackground()); | 55 contents_->set_background(views::Background::CreateStandardPanelBackground()); |
57 views::GridLayout* layout = new views::GridLayout(contents_); | 56 views::GridLayout* layout = new views::GridLayout(contents_); |
58 contents_->SetLayoutManager(layout); | 57 contents_->SetLayoutManager(layout); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 | 118 |
120 CommandLine::Init(argc, argv); | 119 CommandLine::Init(argc, argv); |
121 examples::ExamplesMain main; | 120 examples::ExamplesMain main; |
122 main.Run(); | 121 main.Run(); |
123 | 122 |
124 #if defined(OS_WIN) | 123 #if defined(OS_WIN) |
125 OleUninitialize(); | 124 OleUninitialize(); |
126 #endif | 125 #endif |
127 return 0; | 126 return 0; |
128 } | 127 } |
OLD | NEW |