OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 void AckLastSentInputEventIfNecessary(InputEventAckState ack_result) { | 459 void AckLastSentInputEventIfNecessary(InputEventAckState ack_result) { |
460 if (!sink_->message_count()) | 460 if (!sink_->message_count()) |
461 return; | 461 return; |
462 | 462 |
463 InputMsg_HandleInputEvent::Param params; | 463 InputMsg_HandleInputEvent::Param params; |
464 if (!InputMsg_HandleInputEvent::Read( | 464 if (!InputMsg_HandleInputEvent::Read( |
465 sink_->GetMessageAt(sink_->message_count() - 1), ¶ms)) { | 465 sink_->GetMessageAt(sink_->message_count() - 1), ¶ms)) { |
466 return; | 466 return; |
467 } | 467 } |
468 | 468 |
469 if (WebInputEventTraits::IgnoresAckDisposition(*get<0>(params))) | 469 if (!WebInputEventTraits::WillReceiveAckFromRenderer(*get<0>(params))) |
470 return; | 470 return; |
471 | 471 |
472 SendInputEventACK(get<0>(params)->type, ack_result); | 472 SendInputEventACK(get<0>(params)->type, ack_result); |
473 } | 473 } |
474 | 474 |
475 protected: | 475 protected: |
476 // If true, then calls RWH::Shutdown() instead of deleting RWH. | 476 // If true, then calls RWH::Shutdown() instead of deleting RWH. |
477 bool widget_host_uses_shutdown_to_destroy_; | 477 bool widget_host_uses_shutdown_to_destroy_; |
478 | 478 |
479 bool is_guest_view_hack_; | 479 bool is_guest_view_hack_; |
(...skipping 2883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3363 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 3363 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
3364 EXPECT_EQ(OVERSCROLL_NONE, overscroll_mode()); | 3364 EXPECT_EQ(OVERSCROLL_NONE, overscroll_mode()); |
3365 EXPECT_EQ(15.f, overscroll_delta_x()); | 3365 EXPECT_EQ(15.f, overscroll_delta_x()); |
3366 EXPECT_EQ(-5.f, overscroll_delta_y()); | 3366 EXPECT_EQ(-5.f, overscroll_delta_y()); |
3367 SimulateGestureFlingStartEvent(0.f, 0.1f, blink::WebGestureDeviceTouchpad); | 3367 SimulateGestureFlingStartEvent(0.f, 0.1f, blink::WebGestureDeviceTouchpad); |
3368 EXPECT_EQ(0.f, overscroll_delta_x()); | 3368 EXPECT_EQ(0.f, overscroll_delta_x()); |
3369 EXPECT_EQ(0.f, overscroll_delta_y()); | 3369 EXPECT_EQ(0.f, overscroll_delta_y()); |
3370 } | 3370 } |
3371 | 3371 |
3372 } // namespace content | 3372 } // namespace content |
OLD | NEW |