OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "base/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/i18n/icu_util.h" | 8 #include "base/i18n/icu_util.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "ui/aura/env.h" | 23 #include "ui/aura/env.h" |
24 #include "ui/wm/core/wm_state.h" | 24 #include "ui/wm/core/wm_state.h" |
25 #endif | 25 #endif |
26 | 26 |
27 #if !defined(OS_CHROMEOS) && defined(USE_AURA) | 27 #if !defined(OS_CHROMEOS) && defined(USE_AURA) |
28 #include "ui/views/widget/desktop_aura/desktop_screen.h" | 28 #include "ui/views/widget/desktop_aura/desktop_screen.h" |
29 #endif | 29 #endif |
30 | 30 |
31 #if defined(OS_WIN) | 31 #if defined(OS_WIN) |
32 #include "ui/base/win/scoped_ole_initializer.h" | 32 #include "ui/base/win/scoped_ole_initializer.h" |
| 33 #include "ui/gfx/win/direct_write.h" |
33 #endif | 34 #endif |
34 | 35 |
35 #if defined(USE_X11) | 36 #if defined(USE_X11) |
36 #include "ui/gfx/x/x11_connection.h" | 37 #include "ui/gfx/x/x11_connection.h" |
37 #endif | 38 #endif |
38 | 39 |
39 int main(int argc, char** argv) { | 40 int main(int argc, char** argv) { |
40 #if defined(OS_WIN) | 41 #if defined(OS_WIN) |
41 ui::ScopedOleInitializer ole_initializer_; | 42 ui::ScopedOleInitializer ole_initializer_; |
42 #endif | 43 #endif |
(...skipping 18 matching lines...) Expand all Loading... |
61 base::MessageLoopForUI message_loop; | 62 base::MessageLoopForUI message_loop; |
62 | 63 |
63 base::i18n::InitializeICU(); | 64 base::i18n::InitializeICU(); |
64 | 65 |
65 ui::RegisterPathProvider(); | 66 ui::RegisterPathProvider(); |
66 | 67 |
67 base::FilePath ui_test_pak_path; | 68 base::FilePath ui_test_pak_path; |
68 DCHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); | 69 DCHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); |
69 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); | 70 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); |
70 | 71 |
| 72 #if defined(OS_WIN) |
| 73 gfx::win::MaybeInitializeDirectWrite(); |
| 74 #endif |
| 75 |
71 #if defined(USE_AURA) | 76 #if defined(USE_AURA) |
72 aura::Env::CreateInstance(true); | 77 aura::Env::CreateInstance(true); |
73 aura::Env::GetInstance()->set_context_factory(context_factory.get()); | 78 aura::Env::GetInstance()->set_context_factory(context_factory.get()); |
74 #endif | 79 #endif |
75 ui::InitializeInputMethodForTesting(); | 80 ui::InitializeInputMethodForTesting(); |
76 | 81 |
77 { | 82 { |
78 views::DesktopTestViewsDelegate views_delegate; | 83 views::DesktopTestViewsDelegate views_delegate; |
79 #if defined(USE_AURA) | 84 #if defined(USE_AURA) |
80 wm::WMState wm_state; | 85 wm::WMState wm_state; |
(...skipping 15 matching lines...) Expand all Loading... |
96 } | 101 } |
97 | 102 |
98 ui::ShutdownInputMethod(); | 103 ui::ShutdownInputMethod(); |
99 | 104 |
100 #if defined(USE_AURA) | 105 #if defined(USE_AURA) |
101 aura::Env::DeleteInstance(); | 106 aura::Env::DeleteInstance(); |
102 #endif | 107 #endif |
103 | 108 |
104 return 0; | 109 return 0; |
105 } | 110 } |
OLD | NEW |