Index: ash/launcher/launcher_tooltip_manager.h |
diff --git a/ash/launcher/launcher_tooltip_manager.h b/ash/launcher/launcher_tooltip_manager.h |
index 5451ccfcd766bdf6755b246d737bf97c651f2694..673380c9e07e62cabb3d2f94b2a6c472fea2be9a 100644 |
--- a/ash/launcher/launcher_tooltip_manager.h |
+++ b/ash/launcher/launcher_tooltip_manager.h |
@@ -7,6 +7,7 @@ |
#pragma once |
#include "ash/ash_export.h" |
+#include "ash/wm/shelf_layout_manager.h" |
#include "ash/wm/shelf_types.h" |
#include "base/basictypes.h" |
#include "base/string16.h" |
@@ -25,6 +26,7 @@ class Label; |
namespace ash { |
namespace test { |
+class LauncherTooltipManagerTest; |
class LauncherViewTest; |
} |
@@ -32,10 +34,11 @@ namespace internal { |
// LauncherTooltipManager manages the tooltip balloon poping up on launcher |
// items. |
-class ASH_EXPORT LauncherTooltipManager { |
+class ASH_EXPORT LauncherTooltipManager : public ShelfLayoutManager::Observer { |
public: |
- LauncherTooltipManager(ShelfAlignment alignment); |
- ~LauncherTooltipManager(); |
+ LauncherTooltipManager(ShelfAlignment alignment, |
+ ShelfLayoutManager* shelf_layout_manager); |
+ virtual ~LauncherTooltipManager(); |
// Called when the bubble is closed. |
void OnBubbleClosed(views::BubbleDelegateView* view); |
@@ -63,9 +66,18 @@ class ASH_EXPORT LauncherTooltipManager { |
// Returns true if the tooltip is currently visible. |
bool IsVisible(); |
+protected: |
+ // ShelfLayoutManager::Observer overrides: |
+ virtual void WillDeleteShelf() OVERRIDE; |
+ virtual void WillChangeVisibilityState( |
+ ShelfLayoutManager::VisibilityState new_state) OVERRIDE; |
+ virtual void OnAutoHideStateChanged( |
+ ShelfLayoutManager::AutoHideState new_state) OVERRIDE; |
+ |
private: |
class LauncherTooltipBubble; |
friend class test::LauncherViewTest; |
+ friend class test::LauncherTooltipManagerTest; |
void ShowInternal(); |
void CreateBubble(views::View* anchor, const string16& text); |
@@ -76,6 +88,8 @@ class ASH_EXPORT LauncherTooltipManager { |
ShelfAlignment alignment_; |
scoped_ptr<base::Timer> timer_; |
+ ShelfLayoutManager* shelf_layout_manager_; |
+ |
DISALLOW_COPY_AND_ASSIGN(LauncherTooltipManager); |
}; |