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

Unified Diff: ash/shelf/shelf_tooltip_manager.cc

Issue 2180683003: NOSUBMIT: PointerWatcher observes all pointer events, with moves optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/shelf/shelf_tooltip_manager.h ('k') | ash/sysui/pointer_watcher_delegate_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_tooltip_manager.cc
diff --git a/ash/shelf/shelf_tooltip_manager.cc b/ash/shelf/shelf_tooltip_manager.cc
index 35a83a23d6808631583798d291725a3777f2df40..29ac76c263b2b1eda00cfb57e3f170701140ed03 100644
--- a/ash/shelf/shelf_tooltip_manager.cc
+++ b/ash/shelf/shelf_tooltip_manager.cc
@@ -173,18 +173,14 @@ 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::LocatedEvent& 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_MOUSE_PRESSED ||
+ event.type() == ui::ET_TOUCH_PRESSED)
+ Close();
}
void ShelfTooltipManager::OnEvent(ui::Event* event) {
« no previous file with comments | « ash/shelf/shelf_tooltip_manager.h ('k') | ash/sysui/pointer_watcher_delegate_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698