| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 #if defined(USE_X11) | 49 #if defined(USE_X11) |
| 50 // This demo uses InProcessContextFactory which uses X on a separate Gpu | 50 // This demo uses InProcessContextFactory which uses X on a separate Gpu |
| 51 // thread. | 51 // thread. |
| 52 gfx::InitializeThreadedX11(); | 52 gfx::InitializeThreadedX11(); |
| 53 #endif | 53 #endif |
| 54 | 54 |
| 55 gfx::GLSurface::InitializeOneOff(); | 55 gfx::GLSurface::InitializeOneOff(); |
| 56 | 56 |
| 57 // The ContextFactory must exist before any Compositors are created. | 57 // The ContextFactory must exist before any Compositors are created. |
| 58 bool context_factory_for_test = false; | |
| 59 scoped_ptr<ui::InProcessContextFactory> context_factory( | 58 scoped_ptr<ui::InProcessContextFactory> context_factory( |
| 60 new ui::InProcessContextFactory(context_factory_for_test)); | 59 new ui::InProcessContextFactory()); |
| 61 context_factory->set_use_test_surface(false); | 60 context_factory->set_use_test_surface(false); |
| 62 | 61 |
| 63 base::MessageLoopForUI message_loop; | 62 base::MessageLoopForUI message_loop; |
| 64 | 63 |
| 65 base::i18n::InitializeICU(); | 64 base::i18n::InitializeICU(); |
| 66 | 65 |
| 67 ui::RegisterPathProvider(); | 66 ui::RegisterPathProvider(); |
| 68 | 67 |
| 69 base::FilePath ui_test_pak_path; | 68 base::FilePath ui_test_pak_path; |
| 70 DCHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); | 69 DCHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 } | 101 } |
| 103 | 102 |
| 104 ui::ShutdownInputMethod(); | 103 ui::ShutdownInputMethod(); |
| 105 | 104 |
| 106 #if defined(USE_AURA) | 105 #if defined(USE_AURA) |
| 107 aura::Env::DeleteInstance(); | 106 aura::Env::DeleteInstance(); |
| 108 #endif | 107 #endif |
| 109 | 108 |
| 110 return 0; | 109 return 0; |
| 111 } | 110 } |
| OLD | NEW |