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

Side by Side Diff: services/ui/ws/window_tree_host_factory.cc

Issue 2497303002: Fix ws::Display initialization order. (Closed)
Patch Set: Fix use after move in test. Created 4 years, 1 month 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 | « services/ui/ws/user_display_manager_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "services/ui/ws/window_tree_host_factory.h" 5 #include "services/ui/ws/window_tree_host_factory.h"
6 6
7 #include "services/ui/ws/display.h" 7 #include "services/ui/ws/display.h"
8 #include "services/ui/ws/display_binding.h" 8 #include "services/ui/ws/display_binding.h"
9 #include "services/ui/ws/window_server.h" 9 #include "services/ui/ws/window_server.h"
10 10
(...skipping 12 matching lines...) Expand all
23 WindowTreeHostFactory::~WindowTreeHostFactory() {} 23 WindowTreeHostFactory::~WindowTreeHostFactory() {}
24 24
25 void WindowTreeHostFactory::AddBinding( 25 void WindowTreeHostFactory::AddBinding(
26 mojom::WindowTreeHostFactoryRequest request) { 26 mojom::WindowTreeHostFactoryRequest request) {
27 bindings_.AddBinding(this, std::move(request)); 27 bindings_.AddBinding(this, std::move(request));
28 } 28 }
29 29
30 void WindowTreeHostFactory::CreateWindowTreeHost( 30 void WindowTreeHostFactory::CreateWindowTreeHost(
31 mojom::WindowTreeHostRequest host, 31 mojom::WindowTreeHostRequest host,
32 mojom::WindowTreeClientPtr tree_client) { 32 mojom::WindowTreeClientPtr tree_client) {
33 Display* display = new Display(window_server_, platform_display_init_params_); 33 Display* display = new Display(window_server_);
34 std::unique_ptr<DisplayBindingImpl> display_binding( 34 std::unique_ptr<DisplayBindingImpl> display_binding(
35 new DisplayBindingImpl(std::move(host), display, user_id_, 35 new DisplayBindingImpl(std::move(host), display, user_id_,
36 std::move(tree_client), window_server_)); 36 std::move(tree_client), window_server_));
37 display->Init(std::move(display_binding)); 37 display->Init(platform_display_init_params_, std::move(display_binding));
38 } 38 }
39 39
40 } // namespace ws 40 } // namespace ws
41 } // namespace ui 41 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/user_display_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698