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

Unified Diff: ash/common/system/tray/tray_event_filter.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/common/system/tray/tray_event_filter.h ('k') | ash/pointer_watcher_delegate_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/tray_event_filter.cc
diff --git a/ash/common/system/tray/tray_event_filter.cc b/ash/common/system/tray/tray_event_filter.cc
index 3b277ccf184456965bfa1ee9e23c71eec44d9635..2e87f2cdaa8d7d44ab5ca8af79ee8d10d5c84d0e 100644
--- a/ash/common/system/tray/tray_event_filter.cc
+++ b/ash/common/system/tray/tray_event_filter.cc
@@ -34,16 +34,13 @@ void TrayEventFilter::RemoveWrapper(TrayBubbleWrapper* wrapper) {
WmShell::Get()->RemovePointerWatcher(this);
}
-void TrayEventFilter::OnMousePressed(const ui::MouseEvent& event,
- const gfx::Point& location_in_screen,
- views::Widget* target) {
- ProcessPressedEvent(location_in_screen, target);
-}
-
-void TrayEventFilter::OnTouchPressed(const ui::TouchEvent& event,
- const gfx::Point& location_in_screen,
- views::Widget* target) {
- ProcessPressedEvent(location_in_screen, target);
+void TrayEventFilter::OnPointerEventObserved(
+ const ui::LocatedEvent& event,
+ const gfx::Point& location_in_screen,
+ views::Widget* target) {
+ if (event.type() == ui::ET_MOUSE_PRESSED ||
+ event.type() == ui::ET_TOUCH_PRESSED)
+ ProcessPressedEvent(location_in_screen, target);
}
void TrayEventFilter::ProcessPressedEvent(const gfx::Point& location_in_screen,
« no previous file with comments | « ash/common/system/tray/tray_event_filter.h ('k') | ash/pointer_watcher_delegate_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698