OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_ | 5 #ifndef CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_ |
6 #define CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_ | 6 #define CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
12 #include "content/common/input/input_event_ack.h" | 12 #include "content/common/input/input_event_ack.h" |
13 #include "content/common/input/input_event_dispatch_type.h" | 13 #include "content/common/input/input_event_dispatch_type.h" |
14 #include "third_party/WebKit/public/platform/WebInputEvent.h" | 14 #include "third_party/WebKit/public/platform/CoalescedWebInputEvent.h" |
15 #include "ui/base/ui_base_types.h" | 15 #include "ui/base/ui_base_types.h" |
16 #include "ui/events/blink/did_overscroll_params.h" | 16 #include "ui/events/blink/did_overscroll_params.h" |
17 | 17 |
18 namespace blink { | 18 namespace blink { |
19 struct WebFloatPoint; | 19 struct WebFloatPoint; |
20 struct WebFloatSize; | 20 struct WebFloatSize; |
21 } | 21 } |
22 | 22 |
23 namespace ui { | 23 namespace ui { |
24 class LatencyInfo; | 24 class LatencyInfo; |
25 } | 25 } |
26 | 26 |
27 namespace content { | 27 namespace content { |
28 | 28 |
29 class RenderWidget; | 29 class RenderWidget; |
30 class RenderWidgetInputHandlerDelegate; | 30 class RenderWidgetInputHandlerDelegate; |
31 | 31 |
32 // RenderWidgetInputHandler is an IPC-agnostic input handling class. | 32 // RenderWidgetInputHandler is an IPC-agnostic input handling class. |
33 // IPC transport code should live in RenderWidget or RenderWidgetMusConnection. | 33 // IPC transport code should live in RenderWidget or RenderWidgetMusConnection. |
34 class CONTENT_EXPORT RenderWidgetInputHandler { | 34 class CONTENT_EXPORT RenderWidgetInputHandler { |
35 public: | 35 public: |
36 RenderWidgetInputHandler(RenderWidgetInputHandlerDelegate* delegate, | 36 RenderWidgetInputHandler(RenderWidgetInputHandlerDelegate* delegate, |
37 RenderWidget* widget); | 37 RenderWidget* widget); |
38 virtual ~RenderWidgetInputHandler(); | 38 virtual ~RenderWidgetInputHandler(); |
39 | 39 |
40 // Handle input events from the input event provider. | 40 // Handle input events from the input event provider. |
41 virtual void HandleInputEvent(const blink::WebInputEvent& input_event, | 41 virtual void HandleInputEvent( |
42 const ui::LatencyInfo& latency_info, | 42 const blink::CoalescedWebInputEvent& coalesced_event, |
43 InputEventDispatchType dispatch_type); | 43 const ui::LatencyInfo& latency_info, |
| 44 InputEventDispatchType dispatch_type); |
44 | 45 |
45 // Handle overscroll from Blink. | 46 // Handle overscroll from Blink. |
46 void DidOverscrollFromBlink( | 47 void DidOverscrollFromBlink( |
47 const blink::WebFloatSize& overscrollDelta, | 48 const blink::WebFloatSize& overscrollDelta, |
48 const blink::WebFloatSize& accumulatedOverscroll, | 49 const blink::WebFloatSize& accumulatedOverscroll, |
49 const blink::WebFloatPoint& position, | 50 const blink::WebFloatPoint& position, |
50 const blink::WebFloatSize& velocity); | 51 const blink::WebFloatSize& velocity); |
51 | 52 |
52 bool handling_input_event() const { return handling_input_event_; } | 53 bool handling_input_event() const { return handling_input_event_; } |
53 void set_handling_input_event(bool handling_input_event) { | 54 void set_handling_input_event(bool handling_input_event) { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 87 |
87 // Indicates if the next sequence of Char events should be suppressed or not. | 88 // Indicates if the next sequence of Char events should be suppressed or not. |
88 bool suppress_next_char_events_; | 89 bool suppress_next_char_events_; |
89 | 90 |
90 DISALLOW_COPY_AND_ASSIGN(RenderWidgetInputHandler); | 91 DISALLOW_COPY_AND_ASSIGN(RenderWidgetInputHandler); |
91 }; | 92 }; |
92 | 93 |
93 } // namespace content | 94 } // namespace content |
94 | 95 |
95 #endif // CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_ | 96 #endif // CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_ |
OLD | NEW |