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

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

Issue 1725353003: Eliminate mojo::Shell client lib class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@15connector
Patch Set: . Created 4 years, 9 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.cc ('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 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 "mash/wm/window_manager.h" 5 #include "mash/wm/window_manager.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "components/mus/common/types.h" 10 #include "components/mus/common/types.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 // TODO(sky): constrain and validate properties before passing to server. 107 // TODO(sky): constrain and validate properties before passing to server.
108 mus::Window* window = root->connection()->NewWindow(properties); 108 mus::Window* window = root->connection()->NewWindow(properties);
109 window->SetBounds(CalculateDefaultBounds(window)); 109 window->SetBounds(CalculateDefaultBounds(window));
110 110
111 mojom::Container container = GetRequestedContainer(window); 111 mojom::Container container = GetRequestedContainer(window);
112 root_controller_->GetWindowForContainer(container)->AddChild(window); 112 root_controller_->GetWindowForContainer(container)->AddChild(window);
113 113
114 if (provide_non_client_frame) { 114 if (provide_non_client_frame) {
115 // NonClientFrameController deletes itself when |window| is destroyed. 115 // NonClientFrameController deletes itself when |window| is destroyed.
116 new NonClientFrameController(root_controller_->GetShell(), window, 116 new NonClientFrameController(root_controller_->GetConnector(), window,
117 root_controller_->window_manager_client()); 117 root_controller_->window_manager_client());
118 } 118 }
119 119
120 root_controller_->IncrementWindowCount(); 120 root_controller_->IncrementWindowCount();
121 121
122 return window; 122 return window;
123 } 123 }
124 124
125 void WindowManager::OnTreeChanging(const TreeChangeParams& params) { 125 void WindowManager::OnTreeChanging(const TreeChangeParams& params) {
126 DCHECK(root_controller_); 126 DCHECK(root_controller_);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 void WindowManager::ScreenlockStateChanged(bool locked) { 167 void WindowManager::ScreenlockStateChanged(bool locked) {
168 // Hide USER_PRIVATE windows when the screen is locked. 168 // Hide USER_PRIVATE windows when the screen is locked.
169 mus::Window* window = root_controller_->GetWindowForContainer( 169 mus::Window* window = root_controller_->GetWindowForContainer(
170 mash::wm::mojom::Container::USER_PRIVATE); 170 mash::wm::mojom::Container::USER_PRIVATE);
171 window->SetVisible(!locked); 171 window->SetVisible(!locked);
172 } 172 }
173 173
174 } // namespace wm 174 } // namespace wm
175 } // namespace mash 175 } // namespace mash
OLDNEW
« no previous file with comments | « mash/wm/root_window_controller.cc ('k') | mash/wm/window_manager_application.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698