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

Unified Diff: ash/wm/root_window_layout_manager.cc

Issue 10829173: Revert 149869 because it broke ash_unittests on win_aura and linux_chromeos. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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/wm/root_window_layout_manager.h ('k') | chrome/browser/chromeos/login/lock_window_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/root_window_layout_manager.cc
===================================================================
--- ash/wm/root_window_layout_manager.cc (revision 149877)
+++ ash/wm/root_window_layout_manager.cc (working copy)
@@ -4,7 +4,6 @@
#include "ash/wm/root_window_layout_manager.h"
-#include "ash/desktop_background/desktop_background_widget_controller.h"
#include "ui/aura/window.h"
#include "ui/compositor/layer.h"
#include "ui/views/widget/widget.h"
@@ -16,13 +15,26 @@
// RootWindowLayoutManager, public:
RootWindowLayoutManager::RootWindowLayoutManager(aura::Window* owner)
- : owner_(owner) {
+ : owner_(owner),
+ background_widget_(NULL) {
}
RootWindowLayoutManager::~RootWindowLayoutManager() {
}
+void RootWindowLayoutManager::SetBackgroundWidget(views::Widget* widget) {
+ if (widget == background_widget_)
+ return;
+ // Close now so that the focus manager will be deleted before shutdown.
+ if (background_widget_)
+ background_widget_->CloseNow();
+ background_widget_ = widget;
+}
+void RootWindowLayoutManager::SetBackgroundLayer(ui::Layer* layer) {
+ background_layer_.reset(layer);
+}
+
////////////////////////////////////////////////////////////////////////////////
// RootWindowLayoutManager, aura::LayoutManager implementation:
@@ -39,10 +51,11 @@
for (j = (*i)->children().begin(); j != (*i)->children().end(); ++j)
(*j)->SetBounds(fullscreen_bounds);
}
- internal::DesktopBackgroundWidgetController* background =
- owner_->GetProperty(internal::kWindowDesktopComponent);
- if (background)
- background->SetBounds(fullscreen_bounds);
+
+ if (background_widget_)
+ background_widget_->SetBounds(fullscreen_bounds);
+ if (background_layer_.get())
+ background_layer_->SetBounds(fullscreen_bounds);
}
void RootWindowLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
« no previous file with comments | « ash/wm/root_window_layout_manager.h ('k') | chrome/browser/chromeos/login/lock_window_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698