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

Unified Diff: ash/wm/panel_layout_manager.h

Issue 10173016: Stack panels so that part of them will always be visible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: \n cleanup Created 8 years, 8 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 | « no previous file | ash/wm/panel_layout_manager.cc » ('j') | ash/wm/panel_layout_manager.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/panel_layout_manager.h
diff --git a/ash/wm/panel_layout_manager.h b/ash/wm/panel_layout_manager.h
index 8ec53d592157edf29fd1ae21f6dc48ec461b32b3..317cfbc48b956ce002a3b3a24785be28bb17e14d 100644
--- a/ash/wm/panel_layout_manager.h
+++ b/ash/wm/panel_layout_manager.h
@@ -13,6 +13,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "ui/aura/layout_manager.h"
+#include "ui/aura/window_observer.h"
namespace aura {
class Window;
@@ -37,7 +38,8 @@ namespace internal {
// panel_container->SetLayoutManager(new PanelLayoutManager(panel_container));
class ASH_EXPORT PanelLayoutManager : public aura::LayoutManager,
- public ash::LauncherIconObserver {
+ public ash::LauncherIconObserver,
+ public aura::WindowObserver {
public:
explicit PanelLayoutManager(aura::Window* panel_container);
virtual ~PanelLayoutManager();
@@ -59,25 +61,36 @@ class ASH_EXPORT PanelLayoutManager : public aura::LayoutManager,
virtual void SetChildBounds(aura::Window* child,
const gfx::Rect& requested_bounds) OVERRIDE;
- // Overriden from ash::LauncherIconObserver
+ // Overridden from ash::LauncherIconObserver
virtual void OnLauncherIconPositionsChanged() OVERRIDE;
+ // Overridden from aura::WindowObserver
+ virtual void OnWindowPropertyChanged(
+ aura::Window* window, const void* key, intptr_t old) OVERRIDE;
+
private:
typedef std::list<aura::Window*> PanelList;
// Called whenever the panel layout might change.
void Relayout();
+ // Called whenever the panel stacking order needs to be updated (e.g. focus
+ // changes or a panel is moved).
+ void UpdateStacking(aura::Window* active_window);
+
// Parent window associated with this layout manager.
aura::Window* panel_container_;
// Protect against recursive calls to Relayout().
bool in_layout_;
// Ordered list of unowned pointers to panel windows.
PanelList panel_windows_;
-
+ // The panel being dragged.
aura::Window* dragged_panel_;
-
+ // The launcher we are observing for launcher icon changes.
Launcher* launcher_;
+ // The last active panel. Used to maintain stacking even if no panels are
+ // currently focused.
+ aura::Window* last_active_panel_;
DISALLOW_COPY_AND_ASSIGN(PanelLayoutManager);
};
« no previous file with comments | « no previous file | ash/wm/panel_layout_manager.cc » ('j') | ash/wm/panel_layout_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698