summaryrefslogtreecommitdiffstats
path: root/ppapi/cpp
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-30 05:49:26 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-30 05:49:26 +0000
commita549359b293776b642fd7303bfcc469b3bfe7fa5 (patch)
tree0d2a323a04934964614030b677e35303234ae98e /ppapi/cpp
parent15808d130f00e0545cf0f31fedfdd6669c8a2517 (diff)
downloadchromium_src-a549359b293776b642fd7303bfcc469b3bfe7fa5.zip
chromium_src-a549359b293776b642fd7303bfcc469b3bfe7fa5.tar.gz
chromium_src-a549359b293776b642fd7303bfcc469b3bfe7fa5.tar.bz2
ppapi: Make sure the touch-event interface is detected correctly.
BUG=145235 Review URL: https://chromiumcodereview.appspot.com/10873074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154085 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/cpp')
-rw-r--r--ppapi/cpp/input_event.cc11
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>())