Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Side by Side Diff: ui/aura/demo/demo_main.cc

Issue 2688593002: WIP: Towards merging OffscreenCanvas and Mus code
Patch Set: Fix reflector unit test Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/aura/demo/DEPS ('k') | ui/compositor/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « ui/aura/demo/DEPS ('k') | ui/compositor/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698