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

Unified Diff: ash/launcher/launcher_tooltip_manager.h

Issue 10808102: Add EventFilter for LauncherTooltip (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 | « no previous file | ash/launcher/launcher_tooltip_manager.cc » ('j') | ash/launcher/launcher_tooltip_manager.cc » ('J')
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 b32ec9888ff24020587a0e82fb22b442a18954dd..b2cb8c4c744487408eaa6fd28b978718b83d8d02 100644
--- a/ash/launcher/launcher_tooltip_manager.h
+++ b/ash/launcher/launcher_tooltip_manager.h
@@ -11,6 +11,7 @@
#include "base/basictypes.h"
#include "base/string16.h"
#include "ui/gfx/rect.h"
+#include "ui/aura/event_filter.h"
Daniel Erat 2012/07/24 16:39:50 nit: fix alphabetization
Jun Mukai 2012/07/25 07:10:05 Done.
#include "ui/views/bubble/bubble_border.h"
#include "ui/views/bubble/bubble_delegate.h"
@@ -30,13 +31,16 @@ class LauncherViewTest;
}
namespace internal {
+class LauncherView;
// LauncherTooltipManager manages the tooltip balloon poping up on launcher
// items.
-class ASH_EXPORT LauncherTooltipManager : public ShelfLayoutManager::Observer {
+class ASH_EXPORT LauncherTooltipManager : public aura::EventFilter,
+ public ShelfLayoutManager::Observer {
public:
LauncherTooltipManager(ShelfAlignment alignment,
- ShelfLayoutManager* shelf_layout_manager);
+ ShelfLayoutManager* shelf_layout_manager,
+ LauncherView* launcher_view);
virtual ~LauncherTooltipManager();
// Called when the bubble is closed.
@@ -66,6 +70,17 @@ class ASH_EXPORT LauncherTooltipManager : public ShelfLayoutManager::Observer {
bool IsVisible();
protected:
+ // aura::EventFilter overrides:
+ virtual bool PreHandleKeyEvent(aura::Window* target,
+ aura::KeyEvent* event) OVERRIDE;
+ virtual bool PreHandleMouseEvent(aura::Window* target,
+ aura::MouseEvent* event) OVERRIDE;
+ virtual ui::TouchStatus PreHandleTouchEvent(aura::Window* target,
+ aura::TouchEvent* event) OVERRIDE;
+ virtual ui::GestureStatus PreHandleGestureEvent(
+ aura::Window* target,
+ aura::GestureEvent* event) OVERRIDE;
+
// ShelfLayoutManager::Observer overrides:
virtual void WillDeleteShelf() OVERRIDE;
virtual void WillChangeVisibilityState(
@@ -82,12 +97,14 @@ protected:
void CreateBubble(views::View* anchor, const string16& text);
LauncherTooltipBubble* view_;
+ views::Widget* widget_;
views::View* anchor_;
string16 text_;
ShelfAlignment alignment_;
scoped_ptr<base::Timer> timer_;
ShelfLayoutManager* shelf_layout_manager_;
+ LauncherView* launcher_view_;
DISALLOW_COPY_AND_ASSIGN(LauncherTooltipManager);
};
« no previous file with comments | « no previous file | ash/launcher/launcher_tooltip_manager.cc » ('j') | ash/launcher/launcher_tooltip_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698