diff options
Diffstat (limited to 'ppapi/cpp')
-rw-r--r-- | ppapi/cpp/input_event.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ppapi/cpp/input_event.cc b/ppapi/cpp/input_event.cc index 67c358a..1f368b0 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>()) |