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

Unified Diff: ash/wm/root_window_layout_manager.cc

Issue 10810039: 2nd display should show the same background as login/lock screen: (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add OVERRIDE 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
diff --git a/ash/wm/root_window_layout_manager.cc b/ash/wm/root_window_layout_manager.cc
index 52c117e322a3f4b6285eef05326575ce8eb635f2..2b5df2f0714ecc9738cf39304340e4670c4612b7 100644
--- a/ash/wm/root_window_layout_manager.cc
+++ b/ash/wm/root_window_layout_manager.cc
@@ -4,6 +4,7 @@
#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"
@@ -15,25 +16,12 @@ namespace internal {
// RootWindowLayoutManager, public:
RootWindowLayoutManager::RootWindowLayoutManager(aura::Window* owner)
- : owner_(owner),
- background_widget_(NULL) {
+ : owner_(owner) {
}
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:
@@ -51,11 +39,10 @@ void RootWindowLayoutManager::OnWindowResized() {
for (j = (*i)->children().begin(); j != (*i)->children().end(); ++j)
(*j)->SetBounds(fullscreen_bounds);
}
-
- if (background_widget_)
- background_widget_->SetBounds(fullscreen_bounds);
- if (background_layer_.get())
- background_layer_->SetBounds(fullscreen_bounds);
+ internal::DesktopBackgroundWidgetController* background =
+ owner_->GetProperty(internal::kWindowDesktopComponent);
+ if (background)
+ background->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