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

Unified Diff: ash/launcher/launcher_tooltip_manager.h

Issue 10701051: Polish launcher tooltip visibility (2nd try). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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 | « ash/launcher/launcher.cc ('k') | ash/launcher/launcher_tooltip_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « ash/launcher/launcher.cc ('k') | ash/launcher/launcher_tooltip_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698