Chromium Code Reviews| 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/wallpaper/wallpaper_controller.h" | 5 #include "ash/wallpaper/wallpaper_controller.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 409 bool WallpaperController::MoveToUnlockedContainer() { | 409 bool WallpaperController::MoveToUnlockedContainer() { |
| 410 if (!locked_) | 410 if (!locked_) |
| 411 return false; | 411 return false; |
| 412 | 412 |
| 413 locked_ = false; | 413 locked_ = false; |
| 414 return ReparentWallpaper(GetWallpaperContainerId(false)); | 414 return ReparentWallpaper(GetWallpaperContainerId(false)); |
| 415 } | 415 } |
| 416 | 416 |
| 417 void WallpaperController::GetInternalDisplayCompositorLock() { | 417 void WallpaperController::GetInternalDisplayCompositorLock() { |
| 418 if (display::Display::HasInternalDisplay()) { | 418 if (display::Display::HasInternalDisplay()) { |
| 419 compositor_lock_ = | 419 aura::Window* root_window = |
| 420 Shell::Get() | 420 Shell::Get()->window_tree_host_manager()->GetRootWindowForDisplayId( |
| 421 ->window_tree_host_manager() | 421 display::Display::InternalDisplayId()); |
|
oshima
2017/05/11 21:03:45
can you use ShellPort::GetRootWindowForDisplayId ?
wutao
2017/05/11 21:34:35
sg.
BTW, It seems the code wraps aura::Window with
sadrul
2017/05/11 23:41:12
Actually, we are trying to get rid of WmWindow. So
| |
| 422 ->GetRootWindowForDisplayId(display::Display::InternalDisplayId()) | 422 if (root_window) { |
| 423 ->layer() | 423 compositor_lock_ = |
| 424 ->GetCompositor() | 424 root_window->layer()->GetCompositor()->GetCompositorLock( |
| 425 ->GetCompositorLock(this, base::TimeDelta::FromMilliseconds( | 425 this, |
| 426 kCompositorLockTimeoutMs)); | 426 base::TimeDelta::FromMilliseconds(kCompositorLockTimeoutMs)); |
| 427 } | |
| 427 } | 428 } |
| 428 } | 429 } |
| 429 | 430 |
| 430 void WallpaperController::CompositorLockTimedOut() { | 431 void WallpaperController::CompositorLockTimedOut() { |
| 431 compositor_lock_.reset(); | 432 compositor_lock_.reset(); |
| 432 } | 433 } |
| 433 | 434 |
| 434 } // namespace ash | 435 } // namespace ash |
| OLD | NEW |