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

Unified Diff: content/browser/renderer_host/input/mock_input_ack_handler.cc

Issue 250923004: Synthesize ctrl-wheel events on touchpad pinch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ensure scales never coalesce to 0 or Infinity Created 6 years, 8 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: content/browser/renderer_host/input/mock_input_ack_handler.cc
diff --git a/content/browser/renderer_host/input/mock_input_ack_handler.cc b/content/browser/renderer_host/input/mock_input_ack_handler.cc
index 0ab903f8c8494d5fbc92e5b83c4a85d64e0721fa..309280988555c29c7b20ce6de9a8caea65826e2a 100644
--- a/content/browser/renderer_host/input/mock_input_ack_handler.cc
+++ b/content/browser/renderer_host/input/mock_input_ack_handler.cc
@@ -18,10 +18,12 @@ using blink::WebTouchPoint;
namespace content {
MockInputAckHandler::MockInputAckHandler()
- : input_router_(NULL),
- ack_count_(0),
- unexpected_event_ack_called_(false),
- ack_state_(INPUT_EVENT_ACK_STATE_UNKNOWN) {}
+ : input_router_(NULL),
+ ack_count_(0),
+ unexpected_event_ack_called_(false),
+ ack_event_type_(WebInputEvent::Undefined),
+ ack_state_(INPUT_EVENT_ACK_STATE_UNKNOWN) {
+}
MockInputAckHandler::~MockInputAckHandler() {}
@@ -30,7 +32,7 @@ void MockInputAckHandler::OnKeyboardEventAck(
InputEventAckState ack_result) {
VLOG(1) << __FUNCTION__ << " called!";
acked_key_event_ = event;
- RecordAckCalled(ack_result);
+ RecordAckCalled(event.type, ack_result);
}
void MockInputAckHandler::OnWheelEventAck(
@@ -38,7 +40,7 @@ void MockInputAckHandler::OnWheelEventAck(
InputEventAckState ack_result) {
VLOG(1) << __FUNCTION__ << " called!";
acked_wheel_event_ = event.event;
- RecordAckCalled(ack_result);
+ RecordAckCalled(event.event.type, ack_result);
}
void MockInputAckHandler::OnTouchEventAck(
@@ -46,7 +48,7 @@ void MockInputAckHandler::OnTouchEventAck(
InputEventAckState ack_result) {
VLOG(1) << __FUNCTION__ << " called!";
acked_touch_event_ = event;
- RecordAckCalled(ack_result);
+ RecordAckCalled(event.event.type, ack_result);
if (touch_followup_event_)
input_router_->SendTouchEvent(*touch_followup_event_);
if (gesture_followup_event_)
@@ -58,7 +60,7 @@ void MockInputAckHandler::OnGestureEventAck(
InputEventAckState ack_result) {
VLOG(1) << __FUNCTION__ << " called!";
acked_gesture_event_ = event.event;
- RecordAckCalled(ack_result);
+ RecordAckCalled(event.event.type, ack_result);
}
void MockInputAckHandler::OnUnexpectedEventAck(UnexpectedEventAckType type) {
@@ -72,7 +74,9 @@ size_t MockInputAckHandler::GetAndResetAckCount() {
return ack_count;
}
-void MockInputAckHandler::RecordAckCalled(InputEventAckState ack_result) {
+void MockInputAckHandler::RecordAckCalled(blink::WebInputEvent::Type type,
+ InputEventAckState ack_result) {
+ ack_event_type_ = type;
++ack_count_;
ack_state_ = ack_result;
}

Powered by Google App Engine
This is Rietveld 408576698