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

Side by Side Diff: components/mus/mus_app.cc

Issue 1979323002: mus: Show USER_PRIVATE window container during views tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@widgetinteractive
Patch Set: rebase, fix linux Created 4 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/mus/mus_app.h" 5 #include "components/mus/mus_app.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/memory/ptr_util.h" 11 #include "base/memory/ptr_util.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/threading/platform_thread.h" 13 #include "base/threading/platform_thread.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 #include "components/mus/common/args.h" 15 #include "components/mus/common/switches.h"
16 #include "components/mus/gles2/gpu_impl.h" 16 #include "components/mus/gles2/gpu_impl.h"
17 #include "components/mus/ws/display.h" 17 #include "components/mus/ws/display.h"
18 #include "components/mus/ws/display_binding.h" 18 #include "components/mus/ws/display_binding.h"
19 #include "components/mus/ws/display_manager.h" 19 #include "components/mus/ws/display_manager.h"
20 #include "components/mus/ws/platform_screen.h" 20 #include "components/mus/ws/platform_screen.h"
21 #include "components/mus/ws/user_display_manager.h" 21 #include "components/mus/ws/user_display_manager.h"
22 #include "components/mus/ws/window_server.h" 22 #include "components/mus/ws/window_server.h"
23 #include "components/mus/ws/window_server_test_impl.h" 23 #include "components/mus/ws/window_server_test_impl.h"
24 #include "components/mus/ws/window_tree.h" 24 #include "components/mus/ws/window_tree.h"
25 #include "components/mus/ws/window_tree_binding.h" 25 #include "components/mus/ws/window_tree_binding.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 void MusApp::Initialize(shell::Connector* connector, 131 void MusApp::Initialize(shell::Connector* connector,
132 const shell::Identity& identity, 132 const shell::Identity& identity,
133 uint32_t id) { 133 uint32_t id) {
134 platform_display_init_params_.connector = connector; 134 platform_display_init_params_.connector = connector;
135 platform_display_init_params_.surfaces_state = new SurfacesState; 135 platform_display_init_params_.surfaces_state = new SurfacesState;
136 136
137 base::PlatformThread::SetName("mus"); 137 base::PlatformThread::SetName("mus");
138 tracing_.Initialize(connector, identity.name()); 138 tracing_.Initialize(connector, identity.name());
139 TRACE_EVENT0("mus", "MusApp::Initialize started"); 139 TRACE_EVENT0("mus", "MusApp::Initialize started");
140 140
141 test_config_ = 141 test_config_ = base::CommandLine::ForCurrentProcess()->HasSwitch(
142 base::CommandLine::ForCurrentProcess()->HasSwitch(kUseTestConfig); 142 switches::kUseTestConfig);
143 #if defined(USE_X11) 143 #if defined(USE_X11)
144 XInitThreads(); 144 XInitThreads();
145 if (test_config_) 145 if (test_config_)
146 ui::test::SetUseOverrideRedirectWindowByDefault(true); 146 ui::test::SetUseOverrideRedirectWindowByDefault(true);
147 #endif 147 #endif
148 148
149 InitializeResources(connector); 149 InitializeResources(connector);
150 150
151 #if defined(USE_OZONE) 151 #if defined(USE_OZONE)
152 // The ozone platform can provide its own event source. So initialize the 152 // The ozone platform can provide its own event source. So initialize the
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 platform_display_init_params_.display_bounds = bounds; 283 platform_display_init_params_.display_bounds = bounds;
284 platform_display_init_params_.display_id = id; 284 platform_display_init_params_.display_id = id;
285 285
286 // Display manages its own lifetime. 286 // Display manages its own lifetime.
287 ws::Display* host_impl = 287 ws::Display* host_impl =
288 new ws::Display(window_server_.get(), platform_display_init_params_); 288 new ws::Display(window_server_.get(), platform_display_init_params_);
289 host_impl->Init(nullptr); 289 host_impl->Init(nullptr);
290 } 290 }
291 291
292 } // namespace mus 292 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/common/switches.cc ('k') | components/mus/public/cpp/tests/window_server_shelltest_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698