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

Unified Diff: chrome/browser/ui/views/frame/browser_root_view.cc

Issue 395563002: Make RootView::DispatchGestureEvent() non-virtual (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed nit Created 6 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 | « chrome/browser/ui/views/frame/browser_root_view.h ('k') | ui/events/event.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_root_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_root_view.cc b/chrome/browser/ui/views/frame/browser_root_view.cc
index 6ac54d94e37a60e78e28cc2e515e358b00624ca1..af29b07a0125b3e659ae820dc552d594a1f8bdf4 100644
--- a/chrome/browser/ui/views/frame/browser_root_view.cc
+++ b/chrome/browser/ui/views/frame/browser_root_view.cc
@@ -151,14 +151,17 @@ bool BrowserRootView::OnMouseWheel(const ui::MouseWheelEvent& event) {
return RootView::OnMouseWheel(event);
}
-void BrowserRootView::DispatchGestureEvent(ui::GestureEvent* event) {
- if (event->type() == ui::ET_GESTURE_TAP &&
- event->location().y() <= 0 &&
- event->location().x() <= browser_view_->GetBounds().width()) {
- TouchUMA::RecordGestureAction(TouchUMA::GESTURE_ROOTVIEWTOP_TAP);
+ui::EventDispatchDetails BrowserRootView::OnEventFromSource(ui::Event* event) {
+ if (event->IsGestureEvent()) {
+ ui::GestureEvent* gesture_event = event->AsGestureEvent();
+ if (gesture_event->type() == ui::ET_GESTURE_TAP &&
+ gesture_event->location().y() <= 0 &&
+ gesture_event->location().x() <= browser_view_->GetBounds().width()) {
+ TouchUMA::RecordGestureAction(TouchUMA::GESTURE_ROOTVIEWTOP_TAP);
+ }
}
- RootView::DispatchGestureEvent(event);
+ return RootView::OnEventFromSource(event);
}
bool BrowserRootView::ShouldForwardToTabStrip(
« no previous file with comments | « chrome/browser/ui/views/frame/browser_root_view.h ('k') | ui/events/event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698