OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/i18n/icu_util.h" | 9 #include "base/i18n/icu_util.h" |
10 #include "base/macros.h" | 10 #include "base/macros.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/power_monitor/power_monitor.h" | 13 #include "base/power_monitor/power_monitor.h" |
14 #include "base/power_monitor/power_monitor_device_source.h" | 14 #include "base/power_monitor/power_monitor_device_source.h" |
15 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
17 #include "cc/surfaces/surface_manager.h" | 17 #include "components/display_compositor/display_compositor.h" |
18 #include "third_party/skia/include/core/SkBlendMode.h" | 18 #include "third_party/skia/include/core/SkBlendMode.h" |
19 #include "ui/aura/client/default_capture_client.h" | 19 #include "ui/aura/client/default_capture_client.h" |
20 #include "ui/aura/client/window_parenting_client.h" | 20 #include "ui/aura/client/window_parenting_client.h" |
21 #include "ui/aura/env.h" | 21 #include "ui/aura/env.h" |
22 #include "ui/aura/test/test_focus_client.h" | 22 #include "ui/aura/test/test_focus_client.h" |
23 #include "ui/aura/test/test_screen.h" | 23 #include "ui/aura/test/test_screen.h" |
24 #include "ui/aura/window.h" | 24 #include "ui/aura/window.h" |
25 #include "ui/aura/window_delegate.h" | 25 #include "ui/aura/window_delegate.h" |
26 #include "ui/aura/window_tree_host.h" | 26 #include "ui/aura/window_tree_host.h" |
27 #include "ui/base/hit_test.h" | 27 #include "ui/base/hit_test.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 #endif | 133 #endif |
134 | 134 |
135 gl::init::InitializeGLOneOff(); | 135 gl::init::InitializeGLOneOff(); |
136 | 136 |
137 #if defined(OS_WIN) | 137 #if defined(OS_WIN) |
138 display::win::SetDefaultDeviceScaleFactor(1.0f); | 138 display::win::SetDefaultDeviceScaleFactor(1.0f); |
139 #endif | 139 #endif |
140 | 140 |
141 // The ContextFactory must exist before any Compositors are created. | 141 // The ContextFactory must exist before any Compositors are created. |
142 bool context_factory_for_test = false; | 142 bool context_factory_for_test = false; |
143 cc::SurfaceManager surface_manager; | 143 |
| 144 display_compositor::DisplayCompositor display_compositor; |
144 std::unique_ptr<ui::InProcessContextFactory> context_factory( | 145 std::unique_ptr<ui::InProcessContextFactory> context_factory( |
145 new ui::InProcessContextFactory(context_factory_for_test, | 146 new ui::InProcessContextFactory(context_factory_for_test, |
146 &surface_manager)); | 147 &display_compositor)); |
147 context_factory->set_use_test_surface(false); | 148 context_factory->set_use_test_surface(false); |
148 | 149 |
149 // Create the message-loop here before creating the root window. | 150 // Create the message-loop here before creating the root window. |
150 base::MessageLoopForUI message_loop; | 151 base::MessageLoopForUI message_loop; |
151 | 152 |
152 base::PowerMonitor power_monitor( | 153 base::PowerMonitor power_monitor( |
153 base::WrapUnique(new base::PowerMonitorDeviceSource)); | 154 base::WrapUnique(new base::PowerMonitorDeviceSource)); |
154 | 155 |
155 std::unique_ptr<aura::Env> env = aura::Env::CreateInstance(); | 156 std::unique_ptr<aura::Env> env = aura::Env::CreateInstance(); |
156 env->set_context_factory(context_factory.get()); | 157 env->set_context_factory(context_factory.get()); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 int main(int argc, char** argv) { | 205 int main(int argc, char** argv) { |
205 base::CommandLine::Init(argc, argv); | 206 base::CommandLine::Init(argc, argv); |
206 | 207 |
207 // The exit manager is in charge of calling the dtors of singleton objects. | 208 // The exit manager is in charge of calling the dtors of singleton objects. |
208 base::AtExitManager exit_manager; | 209 base::AtExitManager exit_manager; |
209 | 210 |
210 base::i18n::InitializeICU(); | 211 base::i18n::InitializeICU(); |
211 | 212 |
212 return DemoMain(); | 213 return DemoMain(); |
213 } | 214 } |
OLD | NEW |