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

Side by Side Diff: content/renderer/input/input_handler_manager.cc

Issue 2917713002: Teach input_handler_proxy about once callbacks. (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | ui/events/blink/event_with_callback.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
220 220
221 TRACE_EVENT1("input,rail", "InputHandlerManager::HandleInputEvent", 221 TRACE_EVENT1("input,rail", "InputHandlerManager::HandleInputEvent",
222 "result", "EventSentToInputHandlerProxy"); 222 "result", "EventSentToInputHandlerProxy");
223 InputHandlerProxy* proxy = it->second->input_handler_proxy(); 223 InputHandlerProxy* proxy = it->second->input_handler_proxy();
224 proxy->HandleInputEventWithLatencyInfo( 224 proxy->HandleInputEventWithLatencyInfo(
225 std::move(input_event), latency_info, 225 std::move(input_event), latency_info,
226 base::Bind(&InputHandlerManager::DidHandleInputEventAndOverscroll, 226 base::BindOnce(&InputHandlerManager::DidHandleInputEventAndOverscroll,
227 weak_ptr_factory_.GetWeakPtr(), callback)); 227 weak_ptr_factory_.GetWeakPtr(), callback));
228 } 228 }
229 229
230 void InputHandlerManager::QueueClosureForMainThreadEventQueue( 230 void InputHandlerManager::QueueClosureForMainThreadEventQueue(
231 int routing_id, 231 int routing_id,
232 const base::Closure& closure) { 232 const base::Closure& closure) {
233 client_->QueueClosureForMainThreadEventQueue(routing_id, closure); 233 client_->QueueClosureForMainThreadEventQueue(routing_id, closure);
234 } 234 }
235 235
236 void InputHandlerManager::DidHandleInputEventAndOverscroll( 236 void InputHandlerManager::DidHandleInputEventAndOverscroll(
237 const InputEventAckStateCallback& callback, 237 const InputEventAckStateCallback& callback,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 void InputHandlerManager::DispatchNonBlockingEventToMainThread( 276 void InputHandlerManager::DispatchNonBlockingEventToMainThread(
277 int routing_id, 277 int routing_id,
278 ui::WebScopedInputEvent event, 278 ui::WebScopedInputEvent event,
279 const ui::LatencyInfo& latency_info) { 279 const ui::LatencyInfo& latency_info) {
280 DCHECK(task_runner_->BelongsToCurrentThread()); 280 DCHECK(task_runner_->BelongsToCurrentThread());
281 client_->DispatchNonBlockingEventToMainThread(routing_id, std::move(event), 281 client_->DispatchNonBlockingEventToMainThread(routing_id, std::move(event),
282 latency_info); 282 latency_info);
283 } 283 }
284 284
285 } // namespace content 285 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | ui/events/blink/event_with_callback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698