| 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" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 const ui::LatencyInfo& latency_info, | 42 const ui::LatencyInfo& latency_info, |
| 43 InputEventDispatchType dispatch_type); | 43 InputEventDispatchType dispatch_type); |
| 44 | 44 |
| 45 // Handle overscroll from Blink. | 45 // Handle overscroll from Blink. |
| 46 void DidOverscrollFromBlink( | 46 void DidOverscrollFromBlink( |
| 47 const blink::WebFloatSize& overscrollDelta, | 47 const blink::WebFloatSize& overscrollDelta, |
| 48 const blink::WebFloatSize& accumulatedOverscroll, | 48 const blink::WebFloatSize& accumulatedOverscroll, |
| 49 const blink::WebFloatPoint& position, | 49 const blink::WebFloatPoint& position, |
| 50 const blink::WebFloatSize& velocity); | 50 const blink::WebFloatSize& velocity); |
| 51 | 51 |
| 52 // When paused in debugger, we send ack for mouse event early. This ensures | |
| 53 // that we continue receiving mouse moves and pass them to debugger. Returns | |
| 54 // whether we are paused in mouse move event and have sent the ack. | |
| 55 bool SendAckForMouseMoveFromDebugger(); | |
| 56 | |
| 57 // When resumed from pause in debugger while handling mouse move, | |
| 58 // we should not send an extra ack (see SendAckForMouseMoveFromDebugger). | |
| 59 void IgnoreAckForMouseMoveFromDebugger(); | |
| 60 | |
| 61 bool handling_input_event() const { return handling_input_event_; } | 52 bool handling_input_event() const { return handling_input_event_; } |
| 62 void set_handling_input_event(bool handling_input_event) { | 53 void set_handling_input_event(bool handling_input_event) { |
| 63 handling_input_event_ = handling_input_event; | 54 handling_input_event_ = handling_input_event; |
| 64 } | 55 } |
| 65 | 56 |
| 66 blink::WebInputEvent::Type handling_event_type() const { | 57 blink::WebInputEvent::Type handling_event_type() const { |
| 67 return handling_event_type_; | 58 return handling_event_type_; |
| 68 } | 59 } |
| 69 | 60 |
| 70 ui::MenuSourceType context_menu_source_type() const { | 61 ui::MenuSourceType context_menu_source_type() const { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 89 std::unique_ptr<ui::DidOverscrollParams>* handling_event_overscroll_; | 80 std::unique_ptr<ui::DidOverscrollParams>* handling_event_overscroll_; |
| 90 | 81 |
| 91 // Type of the input event we are currently handling. | 82 // Type of the input event we are currently handling. |
| 92 blink::WebInputEvent::Type handling_event_type_; | 83 blink::WebInputEvent::Type handling_event_type_; |
| 93 | 84 |
| 94 ui::MenuSourceType context_menu_source_type_; | 85 ui::MenuSourceType context_menu_source_type_; |
| 95 | 86 |
| 96 // Indicates if the next sequence of Char events should be suppressed or not. | 87 // Indicates if the next sequence of Char events should be suppressed or not. |
| 97 bool suppress_next_char_events_; | 88 bool suppress_next_char_events_; |
| 98 | 89 |
| 99 // Whether we should not send ack for the current mouse move. | |
| 100 bool ignore_ack_for_mouse_move_from_debugger_; | |
| 101 | |
| 102 DISALLOW_COPY_AND_ASSIGN(RenderWidgetInputHandler); | 90 DISALLOW_COPY_AND_ASSIGN(RenderWidgetInputHandler); |
| 103 }; | 91 }; |
| 104 | 92 |
| 105 } // namespace content | 93 } // namespace content |
| 106 | 94 |
| 107 #endif // CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_ | 95 #endif // CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_ |
| OLD | NEW |