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

Side by Side Diff: content/renderer/input/input_handler_manager.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/input/input_handler_manager.h" 5 #include "content/renderer/input/input_handler_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 client_->ProcessRafAlignedInput(routing_id); 199 client_->ProcessRafAlignedInput(routing_id);
200 } 200 }
201 201
202 void InputHandlerManager::HandleInputEvent( 202 void InputHandlerManager::HandleInputEvent(
203 int routing_id, 203 int routing_id,
204 blink::WebScopedInputEvent input_event, 204 blink::WebScopedInputEvent input_event,
205 const ui::LatencyInfo& latency_info, 205 const ui::LatencyInfo& latency_info,
206 const InputEventAckStateCallback& callback) { 206 const InputEventAckStateCallback& callback) {
207 DCHECK(task_runner_->BelongsToCurrentThread()); 207 DCHECK(task_runner_->BelongsToCurrentThread());
208 TRACE_EVENT1("input,benchmark,rail", "InputHandlerManager::HandleInputEvent", 208 TRACE_EVENT1("input,benchmark,rail", "InputHandlerManager::HandleInputEvent",
209 "type", WebInputEvent::GetName(input_event->type)); 209 "type", WebInputEvent::GetName(input_event->type()));
210 210
211 auto it = input_handlers_.find(routing_id); 211 auto it = input_handlers_.find(routing_id);
212 if (it == input_handlers_.end()) { 212 if (it == input_handlers_.end()) {
213 TRACE_EVENT1("input,rail", "InputHandlerManager::HandleInputEvent", 213 TRACE_EVENT1("input,rail", "InputHandlerManager::HandleInputEvent",
214 "result", "NoInputHandlerFound"); 214 "result", "NoInputHandlerFound");
215 // Oops, we no longer have an interested input handler.. 215 // Oops, we no longer have an interested input handler..
216 callback.Run(INPUT_EVENT_ACK_STATE_NOT_CONSUMED, std::move(input_event), 216 callback.Run(INPUT_EVENT_ACK_STATE_NOT_CONSUMED, std::move(input_event),
217 latency_info, nullptr); 217 latency_info, nullptr);
218 return; 218 return;
219 } 219 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 void InputHandlerManager::DispatchNonBlockingEventToMainThread( 278 void InputHandlerManager::DispatchNonBlockingEventToMainThread(
279 int routing_id, 279 int routing_id,
280 blink::WebScopedInputEvent event, 280 blink::WebScopedInputEvent event,
281 const ui::LatencyInfo& latency_info) { 281 const ui::LatencyInfo& latency_info) {
282 DCHECK(task_runner_->BelongsToCurrentThread()); 282 DCHECK(task_runner_->BelongsToCurrentThread());
283 client_->DispatchNonBlockingEventToMainThread(routing_id, std::move(event), 283 client_->DispatchNonBlockingEventToMainThread(routing_id, std::move(event),
284 latency_info); 284 latency_info);
285 } 285 }
286 286
287 } // namespace content 287 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/input/input_event_filter_unittest.cc ('k') | content/renderer/input/main_thread_event_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698