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

Unified Diff: ui/aura/window_tree_host.cc

Issue 2752303002: views/mus: Install a mus-friend ContextFactory for tests. (Closed)
Patch Set: . Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mash/test/mash_test_suite.cc ('k') | ui/compositor/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_tree_host.cc
diff --git a/ui/aura/window_tree_host.cc b/ui/aura/window_tree_host.cc
index a136f94f8c13668cb8fc1d6625c11cec28fc3d1b..1e2db75517902ee2f789ac34ee774236909b6fe0 100644
--- a/ui/aura/window_tree_host.cc
+++ b/ui/aura/window_tree_host.cc
@@ -249,11 +249,12 @@ void WindowTreeHost::CreateCompositor(const cc::FrameSinkId& frame_sink_id) {
DCHECK(context_factory);
ui::ContextFactoryPrivate* context_factory_private =
Env::GetInstance()->context_factory_private();
- compositor_.reset(new ui::Compositor(
- frame_sink_id.is_valid() ? frame_sink_id
- : context_factory_private->AllocateFrameSinkId(),
- context_factory, context_factory_private,
- base::ThreadTaskRunnerHandle::Get()));
+ compositor_.reset(
+ new ui::Compositor((!context_factory_private || frame_sink_id.is_valid())
+ ? frame_sink_id
+ : context_factory_private->AllocateFrameSinkId(),
+ context_factory, context_factory_private,
+ base::ThreadTaskRunnerHandle::Get()));
if (!dispatcher()) {
window()->Init(ui::LAYER_NOT_DRAWN);
window()->set_host(this);
« no previous file with comments | « mash/test/mash_test_suite.cc ('k') | ui/compositor/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698