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/server_window_drawn_tracker.h" | 5 #include "services/ui/ws/server_window_drawn_tracker.h" |
6 | 6 |
7 #include "components/mus/ws/server_window.h" | 7 #include "services/ui/ws/server_window.h" |
8 #include "components/mus/ws/server_window_drawn_tracker_observer.h" | 8 #include "services/ui/ws/server_window_drawn_tracker_observer.h" |
9 | 9 |
10 namespace mus { | 10 namespace mus { |
11 | 11 |
12 namespace ws { | 12 namespace ws { |
13 | 13 |
14 ServerWindowDrawnTracker::ServerWindowDrawnTracker( | 14 ServerWindowDrawnTracker::ServerWindowDrawnTracker( |
15 ServerWindow* window, | 15 ServerWindow* window, |
16 ServerWindowDrawnTrackerObserver* observer) | 16 ServerWindowDrawnTrackerObserver* observer) |
17 : window_(window), observer_(observer), drawn_(window->IsDrawn()) { | 17 : window_(window), observer_(observer), drawn_(window->IsDrawn()) { |
18 AddObservers(); | 18 AddObservers(); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 } | 127 } |
128 | 128 |
129 void ServerWindowDrawnTracker::OnWindowVisibilityChanged(ServerWindow* window) { | 129 void ServerWindowDrawnTracker::OnWindowVisibilityChanged(ServerWindow* window) { |
130 const bool is_drawn = window_->IsDrawn(); | 130 const bool is_drawn = window_->IsDrawn(); |
131 SetDrawn(is_drawn ? nullptr : window->parent(), is_drawn); | 131 SetDrawn(is_drawn ? nullptr : window->parent(), is_drawn); |
132 } | 132 } |
133 | 133 |
134 } // namespace ws | 134 } // namespace ws |
135 | 135 |
136 } // namespace mus | 136 } // namespace mus |
OLD | NEW |