OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/ws/operation.h" | 5 #include "services/ui/ws/operation.h" |
6 | 6 |
7 #include "components/mus/ws/window_server.h" | 7 #include "services/ui/ws/window_server.h" |
8 #include "components/mus/ws/window_tree.h" | 8 #include "services/ui/ws/window_tree.h" |
9 | 9 |
10 namespace mus { | 10 namespace mus { |
11 namespace ws { | 11 namespace ws { |
12 | 12 |
13 Operation::Operation(WindowTree* tree, | 13 Operation::Operation(WindowTree* tree, |
14 WindowServer* window_server, | 14 WindowServer* window_server, |
15 OperationType operation_type) | 15 OperationType operation_type) |
16 : window_server_(window_server), | 16 : window_server_(window_server), |
17 source_tree_id_(tree->id()), | 17 source_tree_id_(tree->id()), |
18 operation_type_(operation_type) { | 18 operation_type_(operation_type) { |
19 DCHECK(operation_type != OperationType::NONE); | 19 DCHECK(operation_type != OperationType::NONE); |
20 // Tell the window server about the operation currently in flight. The window | 20 // Tell the window server about the operation currently in flight. The window |
21 // server uses this information to suppress certain calls out to clients. | 21 // server uses this information to suppress certain calls out to clients. |
22 window_server_->PrepareForOperation(this); | 22 window_server_->PrepareForOperation(this); |
23 } | 23 } |
24 | 24 |
25 Operation::~Operation() { | 25 Operation::~Operation() { |
26 window_server_->FinishOperation(); | 26 window_server_->FinishOperation(); |
27 } | 27 } |
28 | 28 |
29 } // namespace ws | 29 } // namespace ws |
30 } // namespace mus | 30 } // namespace mus |
OLD | NEW |