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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« 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