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

Unified Diff: ash/wm/panel_layout_manager.h

Issue 9808026: Layout panels on top of their launcher icons (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ununsed constanrs removed Created 8 years, 9 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/panel_layout_manager.h
diff --git a/ash/wm/panel_layout_manager.h b/ash/wm/panel_layout_manager.h
index 6951c296822cdf8882ecb9cc47be3442fd39b1fb..8d302e55a990d3ac592401fa0622ded01e2e314e 100644
--- a/ash/wm/panel_layout_manager.h
+++ b/ash/wm/panel_layout_manager.h
@@ -9,9 +9,12 @@
#include <list>
#include "ash/ash_export.h"
+#include "ash/launcher/launcher_icons_observer.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/memory/scoped_ptr.h"
#include "ui/aura/layout_manager.h"
+#include "ui/aura/window_observer.h"
namespace aura {
class Window;
@@ -22,6 +25,8 @@ class Rect;
}
namespace ash {
+class Launcher;
+
namespace internal {
// PanelLayoutManager is responsible for organizing panels within the
@@ -43,6 +48,8 @@ class ASH_EXPORT PanelLayoutManager : public aura::LayoutManager {
void ToggleMinimize(aura::Window* panel);
+ void SetLauncher(ash::Launcher* launcher);
sky 2012/03/23 21:41:14 If this positions things above the launcher, doesn
+
// Overridden from aura::LayoutManager:
virtual void OnWindowResized() OVERRIDE;
virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE;
@@ -53,6 +60,18 @@ class ASH_EXPORT PanelLayoutManager : public aura::LayoutManager {
const gfx::Rect& requested_bounds) OVERRIDE;
private:
+ class LauncherIconsObserver : public ash::LauncherIconsObserver {
sky 2012/03/23 21:41:14 Don't inline all this.
+ public:
+ LauncherIconsObserver(PanelLayoutManager* layout_manager)
+ : layout_manager_(layout_manager) {}
sky 2012/03/23 21:41:14 indent 4.
+
+ virtual void OnLauncherIconPositionsChanged() OVERRIDE {
+ layout_manager_->Relayout();
+ }
+ private:
+ PanelLayoutManager* layout_manager_;
+ };
+
typedef std::list<aura::Window*> PanelList;
// Called whenever the panel layout might change.
@@ -67,6 +86,8 @@ class ASH_EXPORT PanelLayoutManager : public aura::LayoutManager {
aura::Window* dragged_panel_;
+ LauncherIconsObserver launcher_icons_observer_;
+
DISALLOW_COPY_AND_ASSIGN(PanelLayoutManager);
};

Powered by Google App Engine
This is Rietveld 408576698