| 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 "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| 11 #include "content/common/input/did_overscroll_params.h" | 11 #include "content/common/input/did_overscroll_params.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 "third_party/WebKit/public/web/WebInputEvent.h" | 14 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 14 #include "ui/base/ui_base_types.h" | 15 #include "ui/base/ui_base_types.h" |
| 15 | 16 |
| 16 namespace blink { | 17 namespace blink { |
| 17 struct WebFloatPoint; | 18 struct WebFloatPoint; |
| 18 struct WebFloatSize; | 19 struct WebFloatSize; |
| 19 } | 20 } |
| 20 | 21 |
| 21 namespace ui { | 22 namespace ui { |
| 22 class LatencyInfo; | 23 class LatencyInfo; |
| 23 } | 24 } |
| 24 | 25 |
| 25 namespace content { | 26 namespace content { |
| 26 | 27 |
| 27 class RenderWidget; | 28 class RenderWidget; |
| 28 class RenderWidgetInputHandlerDelegate; | 29 class RenderWidgetInputHandlerDelegate; |
| 29 | 30 |
| 30 // RenderWidgetInputHandler is an IPC-agnostic input handling class. | 31 // RenderWidgetInputHandler is an IPC-agnostic input handling class. |
| 31 // IPC transport code should live in RenderWidget or RenderWidgetMusConnection. | 32 // IPC transport code should live in RenderWidget or RenderWidgetMusConnection. |
| 32 class CONTENT_EXPORT RenderWidgetInputHandler { | 33 class CONTENT_EXPORT RenderWidgetInputHandler { |
| 33 public: | 34 public: |
| 34 RenderWidgetInputHandler(RenderWidgetInputHandlerDelegate* delegate, | 35 RenderWidgetInputHandler(RenderWidgetInputHandlerDelegate* delegate, |
| 35 RenderWidget* widget); | 36 RenderWidget* widget); |
| 36 ~RenderWidgetInputHandler(); | 37 ~RenderWidgetInputHandler(); |
| 37 | 38 |
| 38 // Handle input events from the input event provider. | 39 // Handle input events from the input event provider. |
| 39 void HandleInputEvent(const blink::WebInputEvent& input_event, | 40 void HandleInputEvent(const blink::WebInputEvent& input_event, |
| 40 const ui::LatencyInfo& latency_info); | 41 const ui::LatencyInfo& latency_info, |
| 42 InputEventDispatchType dispatch_type); |
| 41 | 43 |
| 42 // Handle overscroll from Blink. | 44 // Handle overscroll from Blink. |
| 43 void DidOverscrollFromBlink( | 45 void DidOverscrollFromBlink( |
| 44 const blink::WebFloatSize& unusedDelta, | 46 const blink::WebFloatSize& unusedDelta, |
| 45 const blink::WebFloatSize& accumulatedRootOverScroll, | 47 const blink::WebFloatSize& accumulatedRootOverScroll, |
| 46 const blink::WebFloatPoint& position, | 48 const blink::WebFloatPoint& position, |
| 47 const blink::WebFloatSize& velocity); | 49 const blink::WebFloatSize& velocity); |
| 48 | 50 |
| 49 // When paused in debugger, we send ack for mouse event early. This ensures | 51 // When paused in debugger, we send ack for mouse event early. This ensures |
| 50 // that we continue receiving mouse moves and pass them to debugger. Returns | 52 // that we continue receiving mouse moves and pass them to debugger. Returns |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 bool ignore_ack_for_mouse_move_from_debugger_; | 105 bool ignore_ack_for_mouse_move_from_debugger_; |
| 104 | 106 |
| 105 scoped_ptr<InputEventAck> pending_input_event_ack_; | 107 scoped_ptr<InputEventAck> pending_input_event_ack_; |
| 106 | 108 |
| 107 DISALLOW_COPY_AND_ASSIGN(RenderWidgetInputHandler); | 109 DISALLOW_COPY_AND_ASSIGN(RenderWidgetInputHandler); |
| 108 }; | 110 }; |
| 109 | 111 |
| 110 } // namespace content | 112 } // namespace content |
| 111 | 113 |
| 112 #endif // CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_ | 114 #endif // CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_ |
| OLD | NEW |