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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // This demo uses InProcessContextFactory which uses X on a separate Gpu | 46 // This demo uses InProcessContextFactory which uses X on a separate Gpu |
47 // thread. | 47 // thread. |
48 gfx::InitializeThreadedX11(); | 48 gfx::InitializeThreadedX11(); |
49 #endif | 49 #endif |
50 | 50 |
51 gfx::GLSurface::InitializeOneOff(); | 51 gfx::GLSurface::InitializeOneOff(); |
52 | 52 |
53 // The ContextFactory must exist before any Compositors are created. | 53 // The ContextFactory must exist before any Compositors are created. |
54 scoped_ptr<ui::InProcessContextFactory> context_factory( | 54 scoped_ptr<ui::InProcessContextFactory> context_factory( |
55 new ui::InProcessContextFactory()); | 55 new ui::InProcessContextFactory()); |
56 ui::ContextFactory::SetInstance(context_factory.get()); | |
57 | 56 |
58 base::MessageLoopForUI message_loop; | 57 base::MessageLoopForUI message_loop; |
59 | 58 |
60 base::i18n::InitializeICU(); | 59 base::i18n::InitializeICU(); |
61 | 60 |
62 ui::RegisterPathProvider(); | 61 ui::RegisterPathProvider(); |
63 | 62 |
64 base::FilePath ui_test_pak_path; | 63 base::FilePath ui_test_pak_path; |
65 DCHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); | 64 DCHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); |
66 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); | 65 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); |
(...skipping 22 matching lines...) Expand all Loading... |
89 | 88 |
90 ui::ResourceBundle::CleanupSharedInstance(); | 89 ui::ResourceBundle::CleanupSharedInstance(); |
91 } | 90 } |
92 | 91 |
93 ui::ShutdownInputMethod(); | 92 ui::ShutdownInputMethod(); |
94 | 93 |
95 aura::Env::DeleteInstance(); | 94 aura::Env::DeleteInstance(); |
96 | 95 |
97 return 0; | 96 return 0; |
98 } | 97 } |
OLD | NEW |