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

Unified Diff: ppapi/cpp/input_event.cc

Issue 7834007: Add comment to PPB_MouseInputEvent version 1.1 that GetMovement hasn't been supported. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 632b1eccd93652f9f15e227e28bb9fdbf342756c..f843615043e5d3b55d80c1a96660309125d9170e 100644
--- a/ppapi/cpp/input_event.cc
+++ b/ppapi/cpp/input_event.cc
@@ -90,14 +90,29 @@ MouseInputEvent::MouseInputEvent(Instance* instance,
uint32_t modifiers,
PP_InputEvent_MouseButton mouse_button,
const Point& mouse_position,
+ int32_t click_count) {
+ // Type check the input event before setting it.
+ if (!has_interface<PPB_MouseInputEvent>())
+ return;
+ PassRefFromConstructor(get_interface<PPB_MouseInputEvent>()->Create(
+ instance->pp_instance(), type, time_stamp, modifiers, mouse_button,
+ &mouse_position.pp_point(), click_count));
+}
+
+MouseInputEvent::MouseInputEvent(Instance* instance,
+ PP_InputEvent_Type type,
+ PP_TimeTicks time_stamp,
+ uint32_t modifiers,
+ PP_InputEvent_MouseButton mouse_button,
+ const Point& mouse_position,
int32_t click_count,
- const Point& mouse_movement) {
+ const Point& /*mouse_movement*/) {
// Type check the input event before setting it.
if (!has_interface<PPB_MouseInputEvent>())
return;
PassRefFromConstructor(get_interface<PPB_MouseInputEvent>()->Create(
instance->pp_instance(), type, time_stamp, modifiers, mouse_button,
- &mouse_position.pp_point(), click_count, &mouse_movement.pp_point()));
+ &mouse_position.pp_point(), click_count));
}
PP_InputEvent_MouseButton MouseInputEvent::GetButton() const {
@@ -118,12 +133,6 @@ int32_t MouseInputEvent::GetClickCount() const {
return get_interface<PPB_MouseInputEvent>()->GetClickCount(pp_resource());
}
-Point MouseInputEvent::GetMovement() const {
- if (!has_interface<PPB_MouseInputEvent>())
- return Point();
- return get_interface<PPB_MouseInputEvent>()->GetMovement(pp_resource());
-}
-
// WheelInputEvent -------------------------------------------------------------
WheelInputEvent::WheelInputEvent() : InputEvent() {

Powered by Google App Engine
This is Rietveld 408576698