OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/shell.h" | 5 #include "ash/shell.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
262 int64_t display_id) { | 262 int64_t display_id) { |
263 CHECK(HasInstance()); | 263 CHECK(HasInstance()); |
264 WmWindow* root_window = | 264 WmWindow* root_window = |
265 instance_->shell_port_->GetRootWindowForDisplayId(display_id); | 265 instance_->shell_port_->GetRootWindowForDisplayId(display_id); |
266 return root_window ? root_window->GetRootWindowController() : nullptr; | 266 return root_window ? root_window->GetRootWindowController() : nullptr; |
267 } | 267 } |
268 | 268 |
269 // static | 269 // static |
270 aura::Window* Shell::GetPrimaryRootWindow() { | 270 aura::Window* Shell::GetPrimaryRootWindow() { |
271 CHECK(HasInstance()); | 271 CHECK(HasInstance()); |
272 return instance_->shell_port_->GetPrimaryRootWindow()->aura_window(); | 272 WmWindow* wm_window = instance_->shell_port_->GetPrimaryRootWindow(); |
varkha
2017/05/10 22:23:59
Not for this CL - WmWindow should probably go away
| |
273 return wm_window ? wm_window->aura_window() : nullptr; | |
273 } | 274 } |
274 | 275 |
275 // static | 276 // static |
276 aura::Window* Shell::GetRootWindowForNewWindows() { | 277 aura::Window* Shell::GetRootWindowForNewWindows() { |
277 CHECK(Shell::HasInstance()); | 278 CHECK(Shell::HasInstance()); |
278 return WmWindow::GetAuraWindow(Shell::GetWmRootWindowForNewWindows()); | 279 return WmWindow::GetAuraWindow(Shell::GetWmRootWindowForNewWindows()); |
279 } | 280 } |
280 | 281 |
281 // static | 282 // static |
282 WmWindow* Shell::GetWmRootWindowForNewWindows() { | 283 WmWindow* Shell::GetWmRootWindowForNewWindows() { |
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1263 void Shell::OnPrefServiceInitialized( | 1264 void Shell::OnPrefServiceInitialized( |
1264 std::unique_ptr<::PrefService> pref_service) { | 1265 std::unique_ptr<::PrefService> pref_service) { |
1265 if (!instance_) | 1266 if (!instance_) |
1266 return; | 1267 return; |
1267 // |pref_service_| is null if can't connect to Chrome (as happens when | 1268 // |pref_service_| is null if can't connect to Chrome (as happens when |
1268 // running mash outside of chrome --mash and chrome isn't built). | 1269 // running mash outside of chrome --mash and chrome isn't built). |
1269 pref_service_ = std::move(pref_service); | 1270 pref_service_ = std::move(pref_service); |
1270 } | 1271 } |
1271 | 1272 |
1272 } // namespace ash | 1273 } // namespace ash |
OLD | NEW |