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

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: Post-review fix #2 Created 8 years, 5 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/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..2435741a7e7d5c8919823622a035cc31c1be0a4b 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(
Nikita (slow) 2012/07/28 01:25:25 Sorry, I wasn't clear enough. This code is more re
Denis Kuznetsov (DE-MUC) 2012/07/30 15:40:02 Done.
+ internal::kWindowDesktopComponent);
+ if (background)
+ background->SetBounds(fullscreen_bounds);
}
void RootWindowLayoutManager::OnWindowAddedToLayout(aura::Window* child) {

Powered by Google App Engine
This is Rietveld 408576698