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

Side by Side Diff: ui/events/blink/input_handler_proxy.h

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 | « ui/events/blink/event_with_callback.cc ('k') | ui/events/blink/input_handler_proxy.cc » ('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 #ifndef UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_H_ 5 #ifndef UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_H_
6 #define UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_H_ 6 #define UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 void set_smooth_scroll_enabled(bool value) { smooth_scroll_enabled_ = value; } 64 void set_smooth_scroll_enabled(bool value) { smooth_scroll_enabled_ = value; }
65 65
66 enum EventDisposition { 66 enum EventDisposition {
67 DID_HANDLE, 67 DID_HANDLE,
68 DID_NOT_HANDLE, 68 DID_NOT_HANDLE,
69 DID_NOT_HANDLE_NON_BLOCKING_DUE_TO_FLING, 69 DID_NOT_HANDLE_NON_BLOCKING_DUE_TO_FLING,
70 DID_HANDLE_NON_BLOCKING, 70 DID_HANDLE_NON_BLOCKING,
71 DROP_EVENT 71 DROP_EVENT
72 }; 72 };
73 using EventDispositionCallback = 73 using EventDispositionCallback =
74 base::Callback<void(EventDisposition, 74 base::OnceCallback<void(EventDisposition,
75 WebScopedInputEvent WebInputEvent, 75 WebScopedInputEvent WebInputEvent,
76 const LatencyInfo&, 76 const LatencyInfo&,
77 std::unique_ptr<ui::DidOverscrollParams>)>; 77 std::unique_ptr<ui::DidOverscrollParams>)>;
78 void HandleInputEventWithLatencyInfo( 78 void HandleInputEventWithLatencyInfo(WebScopedInputEvent event,
79 WebScopedInputEvent event, 79 const LatencyInfo& latency_info,
80 const LatencyInfo& latency_info, 80 EventDispositionCallback callback);
81 const EventDispositionCallback& callback);
82 EventDisposition HandleInputEvent(const blink::WebInputEvent& event); 81 EventDisposition HandleInputEvent(const blink::WebInputEvent& event);
83 82
84 // cc::InputHandlerClient implementation. 83 // cc::InputHandlerClient implementation.
85 void WillShutdown() override; 84 void WillShutdown() override;
86 void Animate(base::TimeTicks time) override; 85 void Animate(base::TimeTicks time) override;
87 void MainThreadHasStoppedFlinging() override; 86 void MainThreadHasStoppedFlinging() override;
88 void ReconcileElasticOverscrollAndRootScroll() override; 87 void ReconcileElasticOverscrollAndRootScroll() override;
89 void UpdateRootLayerStateForSynchronousInputHandler( 88 void UpdateRootLayerStateForSynchronousInputHandler(
90 const gfx::ScrollOffset& total_scroll_offset, 89 const gfx::ScrollOffset& total_scroll_offset,
91 const gfx::ScrollOffset& max_scroll_offset, 90 const gfx::ScrollOffset& max_scroll_offset,
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 bool has_ongoing_compositor_scroll_fling_pinch_; 259 bool has_ongoing_compositor_scroll_fling_pinch_;
261 260
262 std::unique_ptr<base::TickClock> tick_clock_; 261 std::unique_ptr<base::TickClock> tick_clock_;
263 262
264 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy); 263 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy);
265 }; 264 };
266 265
267 } // namespace ui 266 } // namespace ui
268 267
269 #endif // UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_H_ 268 #endif // UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_H_
OLDNEW
« no previous file with comments | « ui/events/blink/event_with_callback.cc ('k') | ui/events/blink/input_handler_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698