| 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..f64b4545656c7aa53005ee7fbdacc3ce03687c50 100644
|
| --- a/ash/wm/root_window_layout_manager.cc
|
| +++ b/ash/wm/root_window_layout_manager.cc
|
| @@ -15,24 +15,32 @@ namespace internal {
|
| // RootWindowLayoutManager, public:
|
|
|
| RootWindowLayoutManager::RootWindowLayoutManager(aura::Window* owner)
|
| - : owner_(owner),
|
| - background_widget_(NULL) {
|
| + : owner_(owner) {
|
| + for (int i = 0; i < kShellWindowCount; i++)
|
| + background_widget_[i] = NULL;
|
| }
|
|
|
| RootWindowLayoutManager::~RootWindowLayoutManager() {
|
| }
|
|
|
| -void RootWindowLayoutManager::SetBackgroundWidget(views::Widget* widget) {
|
| - if (widget == background_widget_)
|
| +void RootWindowLayoutManager::SetBackgroundWidget(views::Widget* widget,
|
| + int container_id) {
|
| + if (widget == background_widget_[container_id])
|
| return;
|
| // Close now so that the focus manager will be deleted before shutdown.
|
| - if (background_widget_)
|
| - background_widget_->CloseNow();
|
| - background_widget_ = widget;
|
| + if (background_widget_[container_id])
|
| + background_widget_[container_id]->CloseNow();
|
| + background_widget_[container_id] = widget;
|
| }
|
|
|
| -void RootWindowLayoutManager::SetBackgroundLayer(ui::Layer* layer) {
|
| - background_layer_.reset(layer);
|
| +void RootWindowLayoutManager::SetBackgroundLayer(ui::Layer* layer,
|
| + int container_id) {
|
| + background_layer_[container_id].reset(layer);
|
| +}
|
| +
|
| +void RootWindowLayoutManager::DropBackgroundForContainer(int container_id) {
|
| + SetBackgroundLayer(NULL, container_id);
|
| + SetBackgroundWidget(NULL, container_id);
|
| }
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
| @@ -51,11 +59,12 @@ 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);
|
| + for (int i = 0; i < kShellWindowCount; i++) {
|
| + if (background_widget_[i])
|
| + background_widget_[i]->SetBounds(fullscreen_bounds);
|
| + if (background_layer_[i].get())
|
| + background_layer_[i]->SetBounds(fullscreen_bounds);
|
| + }
|
| }
|
|
|
| void RootWindowLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
|
|
|