Index: ash/wm/root_window_layout_manager.h |
diff --git a/ash/wm/root_window_layout_manager.h b/ash/wm/root_window_layout_manager.h |
index 78eee2b83bfb0d76437a7e964b059c94940e369f..2e5a4cebf0c21fd405af0217af74614ae99be43b 100644 |
--- a/ash/wm/root_window_layout_manager.h |
+++ b/ash/wm/root_window_layout_manager.h |
@@ -5,6 +5,7 @@ |
#ifndef ASH_WM_ROOT_WINDOW_LAYOUT_MANAGER_H_ |
#define ASH_WM_ROOT_WINDOW_LAYOUT_MANAGER_H_ |
+#include "ash/shell_window_ids.h" |
#include "base/basictypes.h" |
#include "base/compiler_specific.h" |
#include "base/memory/scoped_ptr.h" |
@@ -33,17 +34,25 @@ class RootWindowLayoutManager : public aura::LayoutManager { |
explicit RootWindowLayoutManager(aura::Window* owner); |
virtual ~RootWindowLayoutManager(); |
- views::Widget* background_widget() { return background_widget_; } |
- ui::Layer* background_layer() { return background_layer_.get(); } |
+ views::Widget* background_widget() { |
+ return background_widget_[kShellWindowId_DesktopBackgroundContainer]; |
+ } |
+ ui::Layer* background_layer() { |
+ return background_layer_[kShellWindowId_DesktopBackgroundContainer].get(); |
+ } |
- // Sets the background to |widget|. Closes and destroys the old widget if it |
- // exists and differs from the new widget. |
- void SetBackgroundWidget(views::Widget* widget); |
+ // Sets the background in container |container_id| to |widget|. |
+ // Closes and destroys the old widget for that container if it exists and |
+ // differs from the new widget. |
+ void SetBackgroundWidget(views::Widget* widget, int container_id); |
- // Sets a background layer, taking ownership of |layer|. This is provided as |
- // a lightweight alternative to SetBackgroundWidget(); layers can be simple |
- // colored quads instead of being textured. |
- void SetBackgroundLayer(ui::Layer* layer); |
+ // Sets a background layer for container |container_id|, taking ownership of |
+ // |layer|. This is provided as a lightweight alternative to |
+ // SetBackgroundWidget(); layers can be simple colored quads instead of being |
+ // textured. |
+ void SetBackgroundLayer(ui::Layer* layer, int container_id); |
+ |
+ void DropBackgroundForContainer(int container_id); |
// Overridden from aura::LayoutManager: |
virtual void OnWindowResized() OVERRIDE; |
@@ -58,9 +67,9 @@ class RootWindowLayoutManager : public aura::LayoutManager { |
private: |
aura::Window* owner_; |
- // May be NULL if we're not painting a background. |
- views::Widget* background_widget_; |
- scoped_ptr<ui::Layer> background_layer_; |
+ // May be NULL if we're not painting a background for that container. |
+ views::Widget* background_widget_[kShellWindowCount]; |
sky
2012/07/20 23:57:04
I don't understand this. Why do we need a backgrou
Denis Kuznetsov (DE-MUC)
2012/07/23 14:01:09
I'd say we have a kind of technical debt here: it
|
+ scoped_ptr<ui::Layer> background_layer_[kShellWindowCount]; |
DISALLOW_COPY_AND_ASSIGN(RootWindowLayoutManager); |
}; |