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 WmWindow* root_window = ShellPort::Get()->GetRootWindowForDisplayId( |
| 420 Shell::Get() | 420 display::Display::InternalDisplayId()); |
| 421 ->window_tree_host_manager() | 421 if (root_window) { |
| 422 ->GetRootWindowForDisplayId(display::Display::InternalDisplayId()) | 422 compositor_lock_ = |
| 423 ->layer() | 423 root_window->aura_window() |
|
oshima
2017/05/11 22:29:26
GetLayer()
wutao
2017/05/11 22:39:28
Done.
| |
| 424 ->GetCompositor() | 424 ->layer() |
| 425 ->GetCompositorLock(this, base::TimeDelta::FromMilliseconds( | 425 ->GetCompositor() |
| 426 kCompositorLockTimeoutMs)); | 426 ->GetCompositorLock(this, base::TimeDelta::FromMilliseconds( |
| 427 kCompositorLockTimeoutMs)); | |
| 428 } | |
| 427 } | 429 } |
| 428 } | 430 } |
| 429 | 431 |
| 430 void WallpaperController::CompositorLockTimedOut() { | 432 void WallpaperController::CompositorLockTimedOut() { |
| 431 compositor_lock_.reset(); | 433 compositor_lock_.reset(); |
| 432 } | 434 } |
| 433 | 435 |
| 434 } // namespace ash | 436 } // namespace ash |
| OLD | NEW |