| Index: ppapi/cpp/input_event.cc
|
| diff --git a/ppapi/cpp/input_event.cc b/ppapi/cpp/input_event.cc
|
| index 90f41fa2b8fbaeb99a51990a221a27dac8d3ac25..31885892de888812d9f6767bf1a9c9f12fc64fee 100644
|
| --- a/ppapi/cpp/input_event.cc
|
| +++ b/ppapi/cpp/input_event.cc
|
| @@ -324,14 +324,32 @@ TouchPoint TouchInputEvent::GetTouchById(PP_TouchListType list,
|
| uint32_t id) const {
|
| if (!has_interface<PPB_TouchInputEvent_1_0>())
|
| return TouchPoint();
|
| - return TouchPoint(get_interface<PPB_TouchInputEvent_1_0>()->
|
| - GetTouchById(pp_resource(), list, id));
|
| +
|
| + if (has_interface<PPB_TouchInputEvent_1_1>()) {
|
| + return TouchPoint(
|
| + get_interface<PPB_TouchInputEvent_1_1>()->GetTouchById(pp_resource(),
|
| + list, id),
|
| + get_interface<PPB_TouchInputEvent_1_1>()->GetTouchTiltById(
|
| + pp_resource(), list, id));
|
| + }
|
| +
|
| + return TouchPoint(get_interface<PPB_TouchInputEvent_1_0>()->GetTouchById(
|
| + pp_resource(), list, id));
|
| }
|
|
|
| TouchPoint TouchInputEvent::GetTouchByIndex(PP_TouchListType list,
|
| uint32_t index) const {
|
| if (!has_interface<PPB_TouchInputEvent_1_0>())
|
| return TouchPoint();
|
| +
|
| + if (has_interface<PPB_TouchInputEvent_1_1>()) {
|
| + return TouchPoint(
|
| + get_interface<PPB_TouchInputEvent_1_1>()->GetTouchByIndex(pp_resource(),
|
| + list, index),
|
| + get_interface<PPB_TouchInputEvent_1_1>()->GetTouchTiltByIndex(
|
| + pp_resource(), list, index));
|
| + }
|
| +
|
| return TouchPoint(get_interface<PPB_TouchInputEvent_1_0>()->
|
| GetTouchByIndex(pp_resource(), list, index));
|
| }
|
|
|