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 <memory> | 5 #include <memory> |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/i18n/icu_util.h" | 10 #include "base/i18n/icu_util.h" |
11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
14 #include "base/power_monitor/power_monitor.h" | 14 #include "base/power_monitor/power_monitor.h" |
15 #include "base/power_monitor/power_monitor_device_source.h" | 15 #include "base/power_monitor/power_monitor_device_source.h" |
16 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
18 #include "ui/base/ime/input_method_initializer.h" | 18 #include "ui/base/ime/input_method_initializer.h" |
19 #include "ui/base/material_design/material_design_controller.h" | 19 #include "ui/base/material_design/material_design_controller.h" |
20 #include "ui/base/resource/resource_bundle.h" | 20 #include "ui/base/resource/resource_bundle.h" |
21 #include "ui/base/ui_base_paths.h" | 21 #include "ui/base/ui_base_paths.h" |
22 #include "ui/compositor/test/in_process_context_factory.h" | 22 #include "ui/compositor/test/in_process_context_factory.h" |
23 #include "ui/display/screen.h" | 23 #include "ui/display/screen.h" |
24 #include "ui/gl/gl_surface.h" | 24 #include "ui/gl/init/gl_factory.h" |
25 #include "ui/views/examples/example_base.h" | 25 #include "ui/views/examples/example_base.h" |
26 #include "ui/views/examples/examples_window.h" | 26 #include "ui/views/examples/examples_window.h" |
27 #include "ui/views/test/desktop_test_views_delegate.h" | 27 #include "ui/views/test/desktop_test_views_delegate.h" |
28 | 28 |
29 #if defined(USE_AURA) | 29 #if defined(USE_AURA) |
30 #include "ui/aura/env.h" | 30 #include "ui/aura/env.h" |
31 #include "ui/wm/core/wm_state.h" | 31 #include "ui/wm/core/wm_state.h" |
32 #endif | 32 #endif |
33 | 33 |
34 #if !defined(OS_CHROMEOS) && defined(USE_AURA) | 34 #if !defined(OS_CHROMEOS) && defined(USE_AURA) |
(...skipping 17 matching lines...) Expand all Loading... |
52 base::CommandLine::Init(argc, argv); | 52 base::CommandLine::Init(argc, argv); |
53 | 53 |
54 base::AtExitManager at_exit; | 54 base::AtExitManager at_exit; |
55 | 55 |
56 #if defined(USE_X11) | 56 #if defined(USE_X11) |
57 // This demo uses InProcessContextFactory which uses X on a separate Gpu | 57 // This demo uses InProcessContextFactory which uses X on a separate Gpu |
58 // thread. | 58 // thread. |
59 gfx::InitializeThreadedX11(); | 59 gfx::InitializeThreadedX11(); |
60 #endif | 60 #endif |
61 | 61 |
62 gfx::GLSurface::InitializeOneOff(); | 62 gl::init::InitializeGLOneOff(); |
63 | 63 |
64 // The ContextFactory must exist before any Compositors are created. | 64 // The ContextFactory must exist before any Compositors are created. |
65 bool context_factory_for_test = false; | 65 bool context_factory_for_test = false; |
66 std::unique_ptr<ui::InProcessContextFactory> context_factory( | 66 std::unique_ptr<ui::InProcessContextFactory> context_factory( |
67 new ui::InProcessContextFactory(context_factory_for_test, nullptr)); | 67 new ui::InProcessContextFactory(context_factory_for_test, nullptr)); |
68 context_factory->set_use_test_surface(false); | 68 context_factory->set_use_test_surface(false); |
69 | 69 |
70 base::MessageLoopForUI message_loop; | 70 base::MessageLoopForUI message_loop; |
71 | 71 |
72 base::i18n::InitializeICU(); | 72 base::i18n::InitializeICU(); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 } | 112 } |
113 | 113 |
114 ui::ShutdownInputMethod(); | 114 ui::ShutdownInputMethod(); |
115 | 115 |
116 #if defined(USE_AURA) | 116 #if defined(USE_AURA) |
117 env.reset(); | 117 env.reset(); |
118 #endif | 118 #endif |
119 | 119 |
120 return 0; | 120 return 0; |
121 } | 121 } |
OLD | NEW |