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

Unified Diff: ash/shelf/shelf_tooltip_manager.h

Issue 1937673002: Close mash shelf tooltips on touches outside the shelf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 years, 7 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/shelf/shelf_tooltip_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_tooltip_manager.h
diff --git a/ash/shelf/shelf_tooltip_manager.h b/ash/shelf/shelf_tooltip_manager.h
index cc28b6b401a755cbd7d5c39518518f5369e8996a..14cda1e55138f9f1e15ca4aac1d9e1146d4173da 100644
--- a/ash/shelf/shelf_tooltip_manager.h
+++ b/ash/shelf/shelf_tooltip_manager.h
@@ -9,10 +9,10 @@
#include "ash/shelf/shelf_layout_manager_observer.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
-#include "base/strings/string16.h"
#include "base/timer/timer.h"
#include "ui/aura/window_observer.h"
#include "ui/events/event_handler.h"
+#include "ui/views/pointer_watcher.h"
namespace views {
class BubbleDialogDelegateView;
@@ -31,6 +31,7 @@ class ShelfViewTest;
// ShelfTooltipManager manages the tooltip bubble that appears for shelf items.
class ASH_EXPORT ShelfTooltipManager : public ui::EventHandler,
public aura::WindowObserver,
+ public views::PointerWatcher,
public ShelfLayoutManagerObserver {
public:
explicit ShelfTooltipManager(ShelfView* shelf_view);
@@ -62,6 +63,12 @@ class ASH_EXPORT ShelfTooltipManager : public ui::EventHandler,
// aura::WindowObserver overrides:
void OnWindowDestroying(aura::Window* window) override;
+ // views::PointerWatcher overrides:
+ void OnMousePressed(const ui::MouseEvent& event,
+ const gfx::Point& location_in_screen) override;
+ void OnTouchPressed(const ui::TouchEvent& event,
+ const gfx::Point& location_in_screen) override;
+
// ShelfLayoutManagerObserver overrides:
void WillDeleteShelf() override;
void WillChangeVisibilityState(ShelfVisibilityState new_state) override;
« no previous file with comments | « no previous file | ash/shelf/shelf_tooltip_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698