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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 void RootWindowController::Destroy() { | 61 void RootWindowController::Destroy() { |
62 // See class description for details on lifetime. | 62 // See class description for details on lifetime. |
63 if (root_) { | 63 if (root_) { |
64 delete root_->connection(); | 64 delete root_->connection(); |
65 } else { | 65 } else { |
66 // This case only happens if we're destroyed before OnEmbed(). | 66 // This case only happens if we're destroyed before OnEmbed(). |
67 delete this; | 67 delete this; |
68 } | 68 } |
69 } | 69 } |
70 | 70 |
71 mojo::Shell* RootWindowController::GetShell() { | 71 mojo::shell::mojom::Shell* RootWindowController::GetShell() { |
72 return app_->app()->shell(); | 72 return app_->app()->shell(); |
73 } | 73 } |
74 | 74 |
75 mus::Window* RootWindowController::GetWindowForContainer( | 75 mus::Window* RootWindowController::GetWindowForContainer( |
76 mojom::Container container) { | 76 mojom::Container container) { |
77 const mus::Id window_id = root_->connection()->GetConnectionId() << 16 | | 77 const mus::Id window_id = root_->connection()->GetConnectionId() << 16 | |
78 static_cast<uint16_t>(container); | 78 static_cast<uint16_t>(container); |
79 return root_->GetChildById(window_id); | 79 return root_->GetChildById(window_id); |
80 } | 80 } |
81 | 81 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 mojom::Container::LOGIN_WINDOWS); | 204 mojom::Container::LOGIN_WINDOWS); |
205 CreateContainer(mojom::Container::SYSTEM_MODAL_WINDOWS, | 205 CreateContainer(mojom::Container::SYSTEM_MODAL_WINDOWS, |
206 mojom::Container::ROOT); | 206 mojom::Container::ROOT); |
207 CreateContainer(mojom::Container::KEYBOARD, mojom::Container::ROOT); | 207 CreateContainer(mojom::Container::KEYBOARD, mojom::Container::ROOT); |
208 CreateContainer(mojom::Container::MENUS, mojom::Container::ROOT); | 208 CreateContainer(mojom::Container::MENUS, mojom::Container::ROOT); |
209 CreateContainer(mojom::Container::TOOLTIPS, mojom::Container::ROOT); | 209 CreateContainer(mojom::Container::TOOLTIPS, mojom::Container::ROOT); |
210 } | 210 } |
211 | 211 |
212 } // namespace wm | 212 } // namespace wm |
213 } // namespace mash | 213 } // namespace mash |
OLD | NEW |