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

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: TODOs removed 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/views/controls/menu/menu_host_root_view.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..f388211178d033fd752bfa0d6350a9a257ffcaf4 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()) {
sky 2014/07/15 20:53:11 I'm not a fan of the static_casts all through out
tdanderson 2014/07/15 21:31:24 Yes, I agree that isolating the static_casts in th
+ ui::GestureEvent* gesture_event = static_cast<ui::GestureEvent*>(event);
+ 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/views/controls/menu/menu_host_root_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698