Index: ash/wm/panel_layout_manager.h |
diff --git a/ash/wm/panel_layout_manager.h b/ash/wm/panel_layout_manager.h |
index 11f9502c59410c8afaa9d8b69a1cd6ca933bf454..2b1f76d1cbc62b6f1e198b1db9bff7aae63bbcfa 100644 |
--- a/ash/wm/panel_layout_manager.h |
+++ b/ash/wm/panel_layout_manager.h |
@@ -12,6 +12,8 @@ |
#include "ash/launcher/launcher_icon_observer.h" |
#include "base/basictypes.h" |
#include "base/compiler_specific.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "base/memory/weak_ptr.h" |
#include "ui/aura/layout_manager.h" |
#include "ui/aura/window_observer.h" |
@@ -23,6 +25,10 @@ namespace gfx { |
class Rect; |
} |
+namespace views { |
+class Widget; |
+} |
+ |
namespace ash { |
class Launcher; |
@@ -78,6 +84,17 @@ class ASH_EXPORT PanelLayoutManager : public aura::LayoutManager, |
// changes or a panel is moved). |
void UpdateStacking(aura::Window* active_panel); |
+ // Trigger a delayed task to update the callout. We use this because |
+ // otherwise, ShadowController::OnWindowPropertyChanged may be invoked after |
+ // we've already updated the callout, causing the drop shadow to be stacked on |
+ // top of the callout rather than the other way around. |
+ // TODO(dcheng): Possibly a bug in the shadow controller. If a window is |
+ // focused but not stacked at the top, I don't think its shadow should be |
+ // drawn on top of "higher" windows. |
+ void UpdateCallout(aura::Window* active_window); |
+ // Don't call this directly. Only UpdateCallout() should call this method. |
sky
2012/04/27 15:42:42
nit: newline between 94/95. In fact typical style
|
+ void ShowCalloutHelper(aura::Window* active_panel); |
+ |
// Parent window associated with this layout manager. |
aura::Window* panel_container_; |
// Protect against recursive calls to Relayout(). |
@@ -91,6 +108,9 @@ class ASH_EXPORT PanelLayoutManager : public aura::LayoutManager, |
// The last active panel. Used to maintain stacking even if no panels are |
// currently focused. |
aura::Window* last_active_panel_; |
+ // Manage the callout for the focused panel, if any. |
+ scoped_ptr<views::Widget> callout_widget_; |
+ base::WeakPtrFactory<PanelLayoutManager> weak_factory_; |
DISALLOW_COPY_AND_ASSIGN(PanelLayoutManager); |
}; |