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

Unified Diff: ash/wallpaper/wallpaper_controller.cc

Issue 2875123002: Check internal display RootWindow before getting the compositor. (Closed)
Patch Set: Use ShellPort. Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wallpaper/wallpaper_controller.cc
diff --git a/ash/wallpaper/wallpaper_controller.cc b/ash/wallpaper/wallpaper_controller.cc
index 2991f51db0545ad44fd7796927d02d8112a4ec9a..dcd93e12b738bf30d16fdde883993de7b9092a06 100644
--- a/ash/wallpaper/wallpaper_controller.cc
+++ b/ash/wallpaper/wallpaper_controller.cc
@@ -416,14 +416,16 @@ bool WallpaperController::MoveToUnlockedContainer() {
void WallpaperController::GetInternalDisplayCompositorLock() {
if (display::Display::HasInternalDisplay()) {
- compositor_lock_ =
- Shell::Get()
- ->window_tree_host_manager()
- ->GetRootWindowForDisplayId(display::Display::InternalDisplayId())
- ->layer()
- ->GetCompositor()
- ->GetCompositorLock(this, base::TimeDelta::FromMilliseconds(
- kCompositorLockTimeoutMs));
+ WmWindow* root_window = ShellPort::Get()->GetRootWindowForDisplayId(
+ display::Display::InternalDisplayId());
+ if (root_window) {
+ compositor_lock_ =
+ root_window->aura_window()
oshima 2017/05/11 22:29:26 GetLayer()
wutao 2017/05/11 22:39:28 Done.
+ ->layer()
+ ->GetCompositor()
+ ->GetCompositorLock(this, base::TimeDelta::FromMilliseconds(
+ kCompositorLockTimeoutMs));
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698