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

Unified Diff: ppapi/cpp/input_event.cc

Issue 10873074: ppapi: Make sure the touch-event interface is detected correctly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 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
Index: ppapi/cpp/input_event.cc
diff --git a/ppapi/cpp/input_event.cc b/ppapi/cpp/input_event.cc
index 67c358a9a8eeba56fdb86e29ae5c12c5c9c44ce8..1f368b07c04f6be7c9068bf5daf4892bcf37651d 100644
--- a/ppapi/cpp/input_event.cc
+++ b/ppapi/cpp/input_event.cc
@@ -238,6 +238,17 @@ TouchInputEvent::TouchInputEvent(const InputEvent& event) : InputEvent() {
}
}
+TouchInputEvent::TouchInputEvent(const InstanceHandle& instance,
+ PP_InputEvent_Type type,
+ PP_TimeTicks time_stamp,
+ uint32_t modifiers) {
+ // Type check the input event before setting it.
+ if (!has_interface<PPB_TouchInputEvent_1_0>())
+ return;
+ PassRefFromConstructor(get_interface<PPB_TouchInputEvent_1_0>()->Create(
+ instance.pp_instance(), type, time_stamp, modifiers));
+}
+
void TouchInputEvent::AddTouchPoint(PP_TouchListType list,
PP_TouchPoint point) {
if (!has_interface<PPB_TouchInputEvent_1_0>())

Powered by Google App Engine
This is Rietveld 408576698