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

Side by Side Diff: content/renderer/mus/compositor_mus_connection_unittest.cc

Issue 2573073003: Collapse the API surface on WebInputEvent via accessor functions. (Closed)
Patch Set: Fix nits 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/renderer/mus/compositor_mus_connection.h" 5 #include "content/renderer/mus/compositor_mus_connection.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 : RenderWidgetInputHandler(render_widget, render_widget), 200 : RenderWidgetInputHandler(render_widget, render_widget),
201 delegate_(nullptr), 201 delegate_(nullptr),
202 state_(InputEventAckState::INPUT_EVENT_ACK_STATE_UNKNOWN) {} 202 state_(InputEventAckState::INPUT_EVENT_ACK_STATE_UNKNOWN) {}
203 203
204 void TestRenderWidgetInputHandler::HandleInputEvent( 204 void TestRenderWidgetInputHandler::HandleInputEvent(
205 const blink::WebInputEvent& input_event, 205 const blink::WebInputEvent& input_event,
206 const ui::LatencyInfo& latency_info, 206 const ui::LatencyInfo& latency_info,
207 InputEventDispatchType dispatch_type) { 207 InputEventDispatchType dispatch_type) {
208 if (delegate_) { 208 if (delegate_) {
209 std::unique_ptr<InputEventAck> ack(new InputEventAck( 209 std::unique_ptr<InputEventAck> ack(new InputEventAck(
210 InputEventAckSource::COMPOSITOR_THREAD, input_event.type, state_)); 210 InputEventAckSource::COMPOSITOR_THREAD, input_event.type(), state_));
211 delegate_->OnInputEventAck(std::move(ack)); 211 delegate_->OnInputEventAck(std::move(ack));
212 } 212 }
213 } 213 }
214 214
215 } // namespace 215 } // namespace
216 216
217 // Test suite for CompositorMusConnection, this does not setup a full renderer 217 // Test suite for CompositorMusConnection, this does not setup a full renderer
218 // environment. This does not establish a connection to a mus server, nor does 218 // environment. This does not establish a connection to a mus server, nor does
219 // it initialize one. 219 // it initialize one.
220 class CompositorMusConnectionTest : public testing::Test { 220 class CompositorMusConnectionTest : public testing::Test {
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 EXPECT_FALSE(ack_callback.get()); 493 EXPECT_FALSE(ack_callback.get());
494 494
495 VerifyAndRunQueues(true, true); 495 VerifyAndRunQueues(true, true);
496 496
497 // The ack callback should have been called 497 // The ack callback should have been called
498 EXPECT_TRUE(test_callback->called()); 498 EXPECT_TRUE(test_callback->called());
499 EXPECT_EQ(EventResult::HANDLED, test_callback->result()); 499 EXPECT_EQ(EventResult::HANDLED, test_callback->result());
500 } 500 }
501 501
502 } // namespace content 502 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/input/render_widget_input_handler.cc ('k') | content/renderer/pepper/event_conversion.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698