Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: mash/wm/root_window_controller.cc

Issue 1882423004: Move shell service to toplevel shell namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mash/wm/root_window_controller.h ('k') | mash/wm/window_manager_application.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « mash/wm/root_window_controller.h ('k') | mash/wm/window_manager_application.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698