OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_TEST_RUNNER_EVENT_SENDER_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_EVENT_SENDER_H_ |
6 #define COMPONENTS_TEST_RUNNER_EVENT_SENDER_H_ | 6 #define COMPONENTS_TEST_RUNNER_EVENT_SENDER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 explicit EventSender(WebTestProxyBase*); | 53 explicit EventSender(WebTestProxyBase*); |
54 virtual ~EventSender(); | 54 virtual ~EventSender(); |
55 | 55 |
56 void Reset(); | 56 void Reset(); |
57 void Install(blink::WebLocalFrame*); | 57 void Install(blink::WebLocalFrame*); |
58 | 58 |
59 void SetContextMenuData(const blink::WebContextMenuData&); | 59 void SetContextMenuData(const blink::WebContextMenuData&); |
60 | 60 |
61 void DoDragDrop(const blink::WebDragData&, blink::WebDragOperationsMask); | 61 void DoDragDrop(const blink::WebDragData&, blink::WebDragOperationsMask); |
62 | 62 |
| 63 void set_send_wheel_gestures(bool send_wheel_gestures) { |
| 64 send_wheel_gestures_ = send_wheel_gestures; |
| 65 } |
| 66 |
63 private: | 67 private: |
64 friend class EventSenderBindings; | 68 friend class EventSenderBindings; |
65 | 69 |
66 void MouseDown(int button_number, int modifiers); | 70 void MouseDown(int button_number, int modifiers); |
67 void MouseUp(int button_number, int modifiers); | 71 void MouseUp(int button_number, int modifiers); |
68 void PointerDown(int button_number, | 72 void PointerDown(int button_number, |
69 int modifiers, | 73 int modifiers, |
70 blink::WebPointerProperties::PointerType, | 74 blink::WebPointerProperties::PointerType, |
71 int pointerId); | 75 int pointerId); |
72 void PointerUp(int button_number, | 76 void PointerUp(int button_number, |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 int wm_sys_char_; | 248 int wm_sys_char_; |
245 int wm_sys_dead_char_; | 249 int wm_sys_dead_char_; |
246 #endif | 250 #endif |
247 | 251 |
248 WebTestProxyBase* web_test_proxy_base_; | 252 WebTestProxyBase* web_test_proxy_base_; |
249 TestInterfaces* interfaces(); | 253 TestInterfaces* interfaces(); |
250 WebTestDelegate* delegate(); | 254 WebTestDelegate* delegate(); |
251 const blink::WebView* view() const; | 255 const blink::WebView* view() const; |
252 blink::WebView* view(); | 256 blink::WebView* view(); |
253 | 257 |
| 258 bool send_wheel_gestures_; |
254 bool force_layout_on_events_; | 259 bool force_layout_on_events_; |
255 | 260 |
256 // When set to true (the default value), we batch mouse move and mouse up | 261 // When set to true (the default value), we batch mouse move and mouse up |
257 // events so we can simulate drag & drop. | 262 // events so we can simulate drag & drop. |
258 bool is_drag_mode_; | 263 bool is_drag_mode_; |
259 | 264 |
260 int touch_modifiers_; | 265 int touch_modifiers_; |
261 bool touch_cancelable_; | 266 bool touch_cancelable_; |
262 std::vector<blink::WebTouchPoint> touch_points_; | 267 std::vector<blink::WebTouchPoint> touch_points_; |
263 | 268 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 double last_event_timestamp_; | 319 double last_event_timestamp_; |
315 | 320 |
316 base::WeakPtrFactory<EventSender> weak_factory_; | 321 base::WeakPtrFactory<EventSender> weak_factory_; |
317 | 322 |
318 DISALLOW_COPY_AND_ASSIGN(EventSender); | 323 DISALLOW_COPY_AND_ASSIGN(EventSender); |
319 }; | 324 }; |
320 | 325 |
321 } // namespace test_runner | 326 } // namespace test_runner |
322 | 327 |
323 #endif // COMPONENTS_TEST_RUNNER_EVENT_SENDER_H_ | 328 #endif // COMPONENTS_TEST_RUNNER_EVENT_SENDER_H_ |
OLD | NEW |