OLD | NEW |
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 "mash/wm/root_window_controller.h" | 5 #include "mash/wm/root_window_controller.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "components/mus/common/util.h" | 10 #include "components/mus/common/util.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 void RootWindowController::Destroy() { | 56 void RootWindowController::Destroy() { |
57 // See class description for details on lifetime. | 57 // See class description for details on lifetime. |
58 if (root_) { | 58 if (root_) { |
59 delete root_->connection(); | 59 delete root_->connection(); |
60 } else { | 60 } else { |
61 // This case only happens if we're destroyed before OnEmbed(). | 61 // This case only happens if we're destroyed before OnEmbed(). |
62 delete this; | 62 delete this; |
63 } | 63 } |
64 } | 64 } |
65 | 65 |
66 mojo::Connector* RootWindowController::GetConnector() { | 66 shell::Connector* RootWindowController::GetConnector() { |
67 return app_->connector(); | 67 return app_->connector(); |
68 } | 68 } |
69 | 69 |
70 mus::Window* RootWindowController::GetWindowForContainer( | 70 mus::Window* RootWindowController::GetWindowForContainer( |
71 mojom::Container container) { | 71 mojom::Container container) { |
72 return root_->GetChildByLocalId(ContainerToLocalId(container)); | 72 return root_->GetChildByLocalId(ContainerToLocalId(container)); |
73 } | 73 } |
74 | 74 |
75 bool RootWindowController::WindowIsContainer(const mus::Window* window) const { | 75 bool RootWindowController::WindowIsContainer(const mus::Window* window) const { |
76 return window && window->parent() == root_; | 76 return window && window->parent() == root_; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 CreateContainer(mojom::Container::BUBBLES, mojom::Container::ROOT); | 195 CreateContainer(mojom::Container::BUBBLES, mojom::Container::ROOT); |
196 CreateContainer(mojom::Container::SYSTEM_MODAL_WINDOWS, | 196 CreateContainer(mojom::Container::SYSTEM_MODAL_WINDOWS, |
197 mojom::Container::ROOT); | 197 mojom::Container::ROOT); |
198 CreateContainer(mojom::Container::KEYBOARD, mojom::Container::ROOT); | 198 CreateContainer(mojom::Container::KEYBOARD, mojom::Container::ROOT); |
199 CreateContainer(mojom::Container::MENUS, mojom::Container::ROOT); | 199 CreateContainer(mojom::Container::MENUS, mojom::Container::ROOT); |
200 CreateContainer(mojom::Container::TOOLTIPS, mojom::Container::ROOT); | 200 CreateContainer(mojom::Container::TOOLTIPS, mojom::Container::ROOT); |
201 } | 201 } |
202 | 202 |
203 } // namespace wm | 203 } // namespace wm |
204 } // namespace mash | 204 } // namespace mash |
OLD | NEW |