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

Unified Diff: ui/events/event.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 | « ui/events/event.h ('k') | ui/events/event_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event.cc
diff --git a/ui/events/event.cc b/ui/events/event.cc
index df38f38365ace7a3d8adbd89ea72bf7d493385ae..db28bc6d1766dfea35b1b3ca89ec013d33fe9700 100644
--- a/ui/events/event.cc
+++ b/ui/events/event.cc
@@ -116,6 +116,16 @@ Event::~Event() {
ReleaseCopiedNativeEvent(native_event_);
}
+GestureEvent* Event::AsGestureEvent() {
+ CHECK(IsGestureEvent());
+ return static_cast<GestureEvent*>(this);
+}
+
+const GestureEvent* Event::AsGestureEvent() const {
+ CHECK(IsGestureEvent());
+ return static_cast<const GestureEvent*>(this);
+}
+
bool Event::HasNativeEvent() const {
base::NativeEvent null_event;
std::memset(&null_event, 0, sizeof(null_event));
« no previous file with comments | « ui/events/event.h ('k') | ui/events/event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698