| Index: content/common/input/web_input_event_traits.cc
|
| diff --git a/content/common/input/web_input_event_traits.cc b/content/common/input/web_input_event_traits.cc
|
| index 6ca962b5720d9741d2b6bc4d4d251f7e9a86b9ec..13356d2cbc4b2d7d6efb6c22b564b12641147d73 100644
|
| --- a/content/common/input/web_input_event_traits.cc
|
| +++ b/content/common/input/web_input_event_traits.cc
|
| @@ -9,6 +9,7 @@
|
|
|
| #include "base/logging.h"
|
| #include "base/strings/stringprintf.h"
|
| +#include "content/common/input_messages.h"
|
|
|
| using base::StringAppendF;
|
| using base::SStringPrintf;
|
| @@ -487,4 +488,33 @@ bool WebInputEventTraits::IgnoresAckDisposition(const WebInputEvent& event) {
|
| }
|
| }
|
|
|
| +scoped_ptr<IPC::Message> WebInputEventTraits::CreateAckIfNecessary(
|
| + const blink::WebInputEvent& event,
|
| + const content::InputEventAckState ack_state,
|
| + const ui::LatencyInfo& latency_info,
|
| + scoped_ptr<DidOverscrollParams> overscroll_params,
|
| + int routing_id) {
|
| + scoped_ptr<IPC::Message> response;
|
| + if (event.type == WebInputEvent::TouchMove) {
|
| + const WebTouchEvent& touch = static_cast<const WebTouchEvent&>(event);
|
| + if (!touch.cancelable) {
|
| + response = scoped_ptr<IPC::Message>(
|
| + new InputHostMsg_HandleUncancelableTouchMoveEvent_ACK(routing_id));
|
| + }
|
| + }
|
| +
|
| + const bool send_ack = !WebInputEventTraits::IgnoresAckDisposition(event);
|
| + if (send_ack) {
|
| + DCHECK(!response);
|
| + InputHostMsg_HandleInputEvent_ACK_Params ack;
|
| + ack.type = event.type;
|
| + ack.state = ack_state;
|
| + ack.latency = latency_info;
|
| + ack.overscroll = overscroll_params.Pass();
|
| + response = scoped_ptr<IPC::Message>(
|
| + new InputHostMsg_HandleInputEvent_ACK(routing_id, ack));
|
| + }
|
| + return response.Pass();
|
| +}
|
| +
|
| } // namespace content
|
|
|