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> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "base/time/time.h" | 11 #include "base/time/time.h" |
11 #include "content/common/input/did_overscroll_params.h" | 12 #include "content/common/input/did_overscroll_params.h" |
12 #include "content/common/input/input_event_ack.h" | 13 #include "content/common/input/input_event_ack.h" |
13 #include "content/common/input/input_event_dispatch_type.h" | 14 #include "content/common/input/input_event_dispatch_type.h" |
14 #include "third_party/WebKit/public/web/WebInputEvent.h" | 15 #include "third_party/WebKit/public/web/WebInputEvent.h" |
15 #include "ui/base/ui_base_types.h" | 16 #include "ui/base/ui_base_types.h" |
16 | 17 |
17 namespace blink { | 18 namespace blink { |
18 struct WebFloatPoint; | 19 struct WebFloatPoint; |
19 struct WebFloatSize; | 20 struct WebFloatSize; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 82 |
82 RenderWidget* const widget_; | 83 RenderWidget* const widget_; |
83 | 84 |
84 // Are we currently handling an input event? | 85 // Are we currently handling an input event? |
85 bool handling_input_event_; | 86 bool handling_input_event_; |
86 | 87 |
87 // Used to intercept overscroll notifications while an event is being | 88 // Used to intercept overscroll notifications while an event is being |
88 // handled. If the event causes overscroll, the overscroll metadata can be | 89 // handled. If the event causes overscroll, the overscroll metadata can be |
89 // bundled in the event ack, saving an IPC. Note that we must continue | 90 // bundled in the event ack, saving an IPC. Note that we must continue |
90 // supporting overscroll IPC notifications due to fling animation updates. | 91 // supporting overscroll IPC notifications due to fling animation updates. |
91 scoped_ptr<DidOverscrollParams>* handling_event_overscroll_; | 92 std::unique_ptr<DidOverscrollParams>* handling_event_overscroll_; |
92 | 93 |
93 // Type of the input event we are currently handling. | 94 // Type of the input event we are currently handling. |
94 blink::WebInputEvent::Type handling_event_type_; | 95 blink::WebInputEvent::Type handling_event_type_; |
95 | 96 |
96 ui::MenuSourceType context_menu_source_type_; | 97 ui::MenuSourceType context_menu_source_type_; |
97 | 98 |
98 // Indicates if the next sequence of Char events should be suppressed or not. | 99 // Indicates if the next sequence of Char events should be suppressed or not. |
99 bool suppress_next_char_events_; | 100 bool suppress_next_char_events_; |
100 | 101 |
101 // The time spent in input handlers this frame. Used to throttle input acks. | 102 // The time spent in input handlers this frame. Used to throttle input acks. |
102 base::TimeDelta total_input_handling_time_this_frame_; | 103 base::TimeDelta total_input_handling_time_this_frame_; |
103 | 104 |
104 // Whether we should not send ack for the current mouse move. | 105 // Whether we should not send ack for the current mouse move. |
105 bool ignore_ack_for_mouse_move_from_debugger_; | 106 bool ignore_ack_for_mouse_move_from_debugger_; |
106 | 107 |
107 scoped_ptr<InputEventAck> pending_input_event_ack_; | 108 std::unique_ptr<InputEventAck> pending_input_event_ack_; |
108 | 109 |
109 DISALLOW_COPY_AND_ASSIGN(RenderWidgetInputHandler); | 110 DISALLOW_COPY_AND_ASSIGN(RenderWidgetInputHandler); |
110 }; | 111 }; |
111 | 112 |
112 } // namespace content | 113 } // namespace content |
113 | 114 |
114 #endif // CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_ | 115 #endif // CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_ |
OLD | NEW |