summaryrefslogtreecommitdiff
path: root/chromium/ppapi/cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-09-18 14:34:04 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-10-04 11:15:27 +0000
commite6430e577f105ad8813c92e75c54660c4985026e (patch)
tree88115e5d1fb471fea807111924dcccbeadbf9e4f /chromium/ppapi/cpp
parent53d399fe6415a96ea6986ec0d402a9c07da72453 (diff)
downloadqtwebengine-chromium-e6430e577f105ad8813c92e75c54660c4985026e.tar.gz
BASELINE: Update Chromium to 61.0.3163.99
Change-Id: I8452f34574d88ca2b27af9bd56fc9ff3f16b1367 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/ppapi/cpp')
-rw-r--r--chromium/ppapi/cpp/input_event.cc27
-rw-r--r--chromium/ppapi/cpp/private/platform_verification.cc21
-rw-r--r--chromium/ppapi/cpp/private/platform_verification.h1
-rw-r--r--chromium/ppapi/cpp/touch_point.h12
4 files changed, 53 insertions, 8 deletions
diff --git a/chromium/ppapi/cpp/input_event.cc b/chromium/ppapi/cpp/input_event.cc
index 90f41fa2b8f..2bd3ec71c6b 100644
--- a/chromium/ppapi/cpp/input_event.cc
+++ b/chromium/ppapi/cpp/input_event.cc
@@ -39,6 +39,11 @@ template <> const char* interface_name<PPB_TouchInputEvent_1_0>() {
return PPB_TOUCH_INPUT_EVENT_INTERFACE_1_0;
}
+template <>
+const char* interface_name<PPB_TouchInputEvent_1_4>() {
+ return PPB_TOUCH_INPUT_EVENT_INTERFACE_1_4;
+}
+
template <> const char* interface_name<PPB_IMEInputEvent_1_0>() {
return PPB_IME_INPUT_EVENT_INTERFACE_1_0;
}
@@ -324,14 +329,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_4>()) {
+ return TouchPoint(
+ get_interface<PPB_TouchInputEvent_1_4>()->GetTouchById(pp_resource(),
+ list, id),
+ get_interface<PPB_TouchInputEvent_1_4>()->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_4>()) {
+ return TouchPoint(
+ get_interface<PPB_TouchInputEvent_1_4>()->GetTouchByIndex(pp_resource(),
+ list, index),
+ get_interface<PPB_TouchInputEvent_1_4>()->GetTouchTiltByIndex(
+ pp_resource(), list, index));
+ }
+
return TouchPoint(get_interface<PPB_TouchInputEvent_1_0>()->
GetTouchByIndex(pp_resource(), list, index));
}
diff --git a/chromium/ppapi/cpp/private/platform_verification.cc b/chromium/ppapi/cpp/private/platform_verification.cc
index e199a7199d1..e3c29563a3f 100644
--- a/chromium/ppapi/cpp/private/platform_verification.cc
+++ b/chromium/ppapi/cpp/private/platform_verification.cc
@@ -15,16 +15,17 @@ namespace pp {
namespace {
-template <> const char* interface_name<PPB_PlatformVerification_Private_0_2>() {
- return PPB_PLATFORMVERIFICATION_PRIVATE_INTERFACE_0_2;
+template <>
+const char* interface_name<PPB_PlatformVerification_Private_0_3>() {
+ return PPB_PLATFORMVERIFICATION_PRIVATE_INTERFACE_0_3;
}
inline bool HasInterface() {
- return has_interface<PPB_PlatformVerification_Private_0_2>();
+ return has_interface<PPB_PlatformVerification_Private_0_3>();
}
-inline const PPB_PlatformVerification_Private_0_2* GetInterface() {
- return get_interface<PPB_PlatformVerification_Private_0_2>();
+inline const PPB_PlatformVerification_Private_0_3* GetInterface() {
+ return get_interface<PPB_PlatformVerification_Private_0_3>();
}
} // namespace
@@ -54,4 +55,14 @@ int32_t PlatformVerification::ChallengePlatform(
callback.pp_completion_callback());
}
+int32_t PlatformVerification::GetStorageId(Var* storage_id,
+ const CompletionCallback& callback) {
+ if (!HasInterface())
+ return callback.MayForce(PP_ERROR_NOINTERFACE);
+
+ return GetInterface()->GetStorageId(
+ pp_resource(), const_cast<PP_Var*>(&storage_id->pp_var()),
+ callback.pp_completion_callback());
+}
+
} // namespace pp
diff --git a/chromium/ppapi/cpp/private/platform_verification.h b/chromium/ppapi/cpp/private/platform_verification.h
index a9f73fa2472..ac97a0e1fd3 100644
--- a/chromium/ppapi/cpp/private/platform_verification.h
+++ b/chromium/ppapi/cpp/private/platform_verification.h
@@ -26,6 +26,7 @@ class PlatformVerification : public Resource {
Var* signed_data_signature,
Var* platform_key_certificate,
const CompletionCallback& callback);
+ int32_t GetStorageId(Var* storage_id, const CompletionCallback& callback);
};
} // namespace pp
diff --git a/chromium/ppapi/cpp/touch_point.h b/chromium/ppapi/cpp/touch_point.h
index 66c512ba7d5..2dc8951563a 100644
--- a/chromium/ppapi/cpp/touch_point.h
+++ b/chromium/ppapi/cpp/touch_point.h
@@ -18,7 +18,11 @@ class TouchPoint {
public:
TouchPoint() : touch_point_(PP_MakeTouchPoint()) {}
- TouchPoint(const PP_TouchPoint& point) : touch_point_(point) {}
+ TouchPoint(const PP_TouchPoint& point)
+ : touch_point_(point), tilt_(PP_MakeFloatPoint(0, 0)) {}
+
+ TouchPoint(const PP_TouchPoint& point, const PP_FloatPoint& tilt)
+ : touch_point_(point), tilt_(tilt) {}
/// @return The identifier for this TouchPoint. This corresponds to the order
/// in which the points were pressed. For example, the first point to be
@@ -47,8 +51,14 @@ class TouchPoint {
/// the value is not guaranteed to stay within that range.
float pressure() const { return touch_point_.pressure; }
+ /// @return The tilt of this touchpoint. This is a float point. Values of x
+ /// and y are between 0 and 90, with 0 indicating 0 degrees and 90 indicating
+ // 90 degrees.
+ PP_FloatPoint tilt() const { return tilt_; }
+
private:
PP_TouchPoint touch_point_;
+ PP_FloatPoint tilt_;
};
} // namespace pp