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

Unified Diff: ash/common/shelf/shelf_tooltip_manager.cc

Issue 2183163002: mus: Change PointerWatcher to observe all pointer events, with moves optional. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 4 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
Index: ash/common/shelf/shelf_tooltip_manager.cc
diff --git a/ash/common/shelf/shelf_tooltip_manager.cc b/ash/common/shelf/shelf_tooltip_manager.cc
index 6a6db00c4a769cd9cf7c1db4193e008412ffab9e..644640c37a9f4e241a7b3ca35862a5dd4ad455f4 100644
--- a/ash/common/shelf/shelf_tooltip_manager.cc
+++ b/ash/common/shelf/shelf_tooltip_manager.cc
@@ -198,18 +198,13 @@ void ShelfTooltipManager::ShowTooltipWithDelay(views::View* view) {
}
}
-void ShelfTooltipManager::OnMousePressed(const ui::MouseEvent& event,
- const gfx::Point& location_in_screen,
- views::Widget* target) {
- // Close on any mouse press events inside or outside the tooltip.
- Close();
-}
-
-void ShelfTooltipManager::OnTouchPressed(const ui::TouchEvent& event,
- const gfx::Point& location_in_screen,
- views::Widget* target) {
- // Close on any touch press events inside or outside the tooltip.
- Close();
+void ShelfTooltipManager::OnPointerEventObserved(
+ const ui::PointerEvent& event,
+ const gfx::Point& location_in_screen,
+ views::Widget* target) {
+ // Close on any press events inside or outside the tooltip.
+ if (event.type() == ui::ET_POINTER_DOWN)
+ Close();
}
void ShelfTooltipManager::OnMouseEvent(ui::MouseEvent* event) {

Powered by Google App Engine
This is Rietveld 408576698