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

Unified Diff: ash/desktop_background/desktop_background_widget_controller.cc

Issue 10982035: Reland - cros: Add CHECK for screen unlock problem (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: check only ~ScreenLocker Created 8 years, 3 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
Index: ash/desktop_background/desktop_background_widget_controller.cc
diff --git a/ash/desktop_background/desktop_background_widget_controller.cc b/ash/desktop_background/desktop_background_widget_controller.cc
index 9ad1f95ca19783dda14f1d558e93e36e8bc3a2c6..6b796d0ae0b7f867881bb82770a14ed827d8f5fb 100644
--- a/ash/desktop_background/desktop_background_widget_controller.cc
+++ b/ash/desktop_background/desktop_background_widget_controller.cc
@@ -49,17 +49,22 @@ void DesktopBackgroundWidgetController::SetBounds(gfx::Rect bounds) {
layer_->SetBounds(bounds);
}
-void DesktopBackgroundWidgetController::Reparent(aura::RootWindow* root_window,
+bool DesktopBackgroundWidgetController::Reparent(aura::RootWindow* root_window,
int src_container,
int dest_container) {
if (widget_) {
views::Widget::ReparentNativeView(widget_->GetNativeView(),
root_window->GetChildById(dest_container));
- } else if (layer_.get()) {
+ return true;
+ }
+ if (layer_.get()) {
ui::Layer* layer = layer_.get();
root_window->GetChildById(src_container)->layer()->Remove(layer);
root_window->GetChildById(dest_container)->layer()->Add(layer);
+ return true;
}
+ // Nothing to reparent.
+ return false;
}
ComponentWrapper::ComponentWrapper(
« no previous file with comments | « ash/desktop_background/desktop_background_widget_controller.h ('k') | chrome/browser/chromeos/login/screen_locker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698