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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc

Issue 2621303004: Keep track of coalesced events in main thread event queue (Closed)
Patch Set: Rebase Created 3 years, 11 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 unified diff | Download patch
OLDNEW
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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <tuple> 10 #include <tuple>
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 void AckLastSentInputEventIfNecessary(InputEventAckState ack_result) { 667 void AckLastSentInputEventIfNecessary(InputEventAckState ack_result) {
668 if (!sink_->message_count()) 668 if (!sink_->message_count())
669 return; 669 return;
670 670
671 InputMsg_HandleInputEvent::Param params; 671 InputMsg_HandleInputEvent::Param params;
672 if (!InputMsg_HandleInputEvent::Read( 672 if (!InputMsg_HandleInputEvent::Read(
673 sink_->GetMessageAt(sink_->message_count() - 1), &params)) { 673 sink_->GetMessageAt(sink_->message_count() - 1), &params)) {
674 return; 674 return;
675 } 675 }
676 676
677 InputEventDispatchType dispatch_type = std::get<2>(params); 677 InputEventDispatchType dispatch_type = std::get<3>(params);
678 if (dispatch_type == InputEventDispatchType::DISPATCH_TYPE_NON_BLOCKING) 678 if (dispatch_type == InputEventDispatchType::DISPATCH_TYPE_NON_BLOCKING)
679 return; 679 return;
680 680
681 const blink::WebInputEvent* event = std::get<0>(params); 681 const blink::WebInputEvent* event = std::get<0>(params);
682 SendTouchEventACK(event->type(), ack_result, 682 SendTouchEventACK(event->type(), ack_result,
683 WebInputEventTraits::GetUniqueTouchEventId(*event)); 683 WebInputEventTraits::GetUniqueTouchEventId(*event));
684 } 684 }
685 685
686 const ui::MotionEventAura& pointer_state() { 686 const ui::MotionEventAura& pointer_state() {
687 return view_->pointer_state_for_test(); 687 return view_->pointer_state_for_test();
(...skipping 4071 matching lines...) Expand 10 before | Expand all | Expand 10 after
4759 // There is no composition in the beginning. 4759 // There is no composition in the beginning.
4760 EXPECT_FALSE(has_composition_text()); 4760 EXPECT_FALSE(has_composition_text());
4761 SetHasCompositionTextToTrue(); 4761 SetHasCompositionTextToTrue();
4762 view->ImeCancelComposition(); 4762 view->ImeCancelComposition();
4763 // The composition must have been canceled. 4763 // The composition must have been canceled.
4764 EXPECT_FALSE(has_composition_text()); 4764 EXPECT_FALSE(has_composition_text());
4765 } 4765 }
4766 } 4766 }
4767 4767
4768 } // namespace content 4768 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698