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

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

Issue 2712743007: Use 'delegating constructor' in WindowManagerWindowTreeFactory (Closed)
Patch Set: 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 | « no previous file | 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_manager_window_tree_factory.h" 5 #include "services/ui/ws/window_manager_window_tree_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "services/ui/ws/window_manager_window_tree_factory_set.h" 8 #include "services/ui/ws/window_manager_window_tree_factory_set.h"
9 #include "services/ui/ws/window_server.h" 9 #include "services/ui/ws/window_server.h"
10 #include "services/ui/ws/window_tree.h" 10 #include "services/ui/ws/window_tree.h"
11 11
12 namespace ui { 12 namespace ui {
13 namespace ws { 13 namespace ws {
14 14
15 WindowManagerWindowTreeFactory::WindowManagerWindowTreeFactory( 15 WindowManagerWindowTreeFactory::WindowManagerWindowTreeFactory(
16 WindowManagerWindowTreeFactorySet* window_manager_window_tree_factory_set, 16 WindowManagerWindowTreeFactorySet* window_manager_window_tree_factory_set,
17 const UserId& user_id, 17 const UserId& user_id,
18 mojo::InterfaceRequest<mojom::WindowManagerWindowTreeFactory> request) 18 mojo::InterfaceRequest<mojom::WindowManagerWindowTreeFactory> request)
19 : window_manager_window_tree_factory_set_( 19 : WindowManagerWindowTreeFactory(window_manager_window_tree_factory_set,
20 window_manager_window_tree_factory_set), 20 user_id) {
21 user_id_(user_id),
22 binding_(this),
23 window_tree_(nullptr) {
24 if (request.is_pending()) 21 if (request.is_pending())
25 binding_.Bind(std::move(request)); 22 binding_.Bind(std::move(request));
26 } 23 }
27 24
28 WindowManagerWindowTreeFactory::~WindowManagerWindowTreeFactory() {} 25 WindowManagerWindowTreeFactory::~WindowManagerWindowTreeFactory() {}
29 26
30 void WindowManagerWindowTreeFactory::CreateWindowTree( 27 void WindowManagerWindowTreeFactory::CreateWindowTree(
31 mojom::WindowTreeRequest window_tree_request, 28 mojom::WindowTreeRequest window_tree_request,
32 mojom::WindowTreeClientPtr window_tree_client) { 29 mojom::WindowTreeClientPtr window_tree_client) {
33 // CreateWindowTree() can only be called once, so there is no reason to keep 30 // CreateWindowTree() can only be called once, so there is no reason to keep
(...skipping 21 matching lines...) Expand all
55 void WindowManagerWindowTreeFactory::SetWindowTree(WindowTree* window_tree) { 52 void WindowManagerWindowTreeFactory::SetWindowTree(WindowTree* window_tree) {
56 DCHECK(!window_tree_); 53 DCHECK(!window_tree_);
57 window_tree_ = window_tree; 54 window_tree_ = window_tree;
58 55
59 window_manager_window_tree_factory_set_ 56 window_manager_window_tree_factory_set_
60 ->OnWindowManagerWindowTreeFactoryReady(this); 57 ->OnWindowManagerWindowTreeFactoryReady(this);
61 } 58 }
62 59
63 } // namespace ws 60 } // namespace ws
64 } // namespace ui 61 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698