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..8ef8311e6a6505367f36449cfba1f2829f580c6d 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 set yet. |
bshe
2013/01/25 21:46:34
Just curiosity, if we skip the installation here,
oshima
2013/01/25 21:51:49
This can be called during the boot, before the bac
Daniel Erat
2013/01/26 15:52:30
nit: s/hasn't set/hasn't been set/
oshima
2013/01/26 23:10:42
Done.
|
+ 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: { |
oshima
2013/01/25 21:22:52
removing default as desktop_background_mode_ is en
|
+ case BACKGROUND_NONE: |
bshe
2013/01/25 21:46:34
nit: Could you wrap the following with {} to be co
oshima
2013/01/25 21:51:49
{} is necessary when you create variables, which d
Daniel Erat
2013/01/26 15:52:30
I'd vote for leaving out the curly brackets.
|
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. |