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

Unified Diff: ash/desktop_background/desktop_background_controller.cc

Issue 12079002: Minimize black screen during the boot with multi displays (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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 | « ash/desktop_background/desktop_background_controller.h ('k') | ash/display/display_change_observer_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/desktop_background/desktop_background_controller.cc
diff --git a/ash/desktop_background/desktop_background_controller.cc b/ash/desktop_background/desktop_background_controller.cc
index 84da8b0d635c4c345ab0546492e3ef67b9a44722..2a72b224a0d26cece18a7dd3e5ec333ebae08d28 100644
--- a/ash/desktop_background/desktop_background_controller.cc
+++ b/ash/desktop_background/desktop_background_controller.cc
@@ -132,7 +132,7 @@ class DesktopBackgroundController::WallpaperLoader
DesktopBackgroundController::DesktopBackgroundController()
: locked_(false),
- desktop_background_mode_(BACKGROUND_SOLID_COLOR),
+ desktop_background_mode_(BACKGROUND_NONE),
background_color_(kTransparentColor),
weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
}
@@ -180,6 +180,10 @@ int DesktopBackgroundController::GetWallpaperIDR() const {
void DesktopBackgroundController::OnRootWindowAdded(
aura::RootWindow* root_window) {
+ // The background hasn't been set yet.
+ if (desktop_background_mode_ == BACKGROUND_NONE)
+ return;
+
// Handle resolution change for "built-in" images.
if (BACKGROUND_IMAGE == desktop_background_mode_ &&
current_wallpaper_.get()) {
@@ -347,9 +351,9 @@ void DesktopBackgroundController::InstallDesktopController(
component = new internal::DesktopBackgroundWidgetController(layer);
break;
}
- default: {
+ case BACKGROUND_NONE:
NOTREACHED();
- }
+ return;
}
// Ensure we're only observing the root window once. Don't rely on a window
// property check as those can be cleared by tests resetting the background.
« no previous file with comments | « ash/desktop_background/desktop_background_controller.h ('k') | ash/display/display_change_observer_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698