| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "components/mus/ws/window_manager_display_root.h" |
| 6 |
| 7 #include "components/mus/ws/display_manager.h" |
| 8 #include "components/mus/ws/server_window.h" |
| 9 #include "components/mus/ws/window_server.h" |
| 10 |
| 11 namespace mus { |
| 12 namespace ws { |
| 13 |
| 14 WindowManagerDisplayRoot::WindowManagerDisplayRoot(Display* display) |
| 15 : display_(display) { |
| 16 root_.reset(window_server()->CreateServerWindow( |
| 17 window_server()->display_manager()->GetAndAdvanceNextRootId(), |
| 18 ServerWindow::Properties())); |
| 19 // Our root is always a child of the Display's root. Do this |
| 20 // before the WindowTree has been created so that the client doesn't get |
| 21 // notified of the add, bounds change and visibility change. |
| 22 root_->SetBounds(gfx::Rect(display->root_window()->bounds().size())); |
| 23 root_->SetVisible(true); |
| 24 display->root_window()->Add(root_.get()); |
| 25 } |
| 26 |
| 27 WindowManagerDisplayRoot::~WindowManagerDisplayRoot() {} |
| 28 |
| 29 WindowServer* WindowManagerDisplayRoot::window_server() { |
| 30 return display_->window_server(); |
| 31 } |
| 32 |
| 33 } // namespace ws |
| 34 } // namespace mus |
| OLD | NEW |