| 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 <queue> | 10 #include <queue> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
| 18 #include "components/test_runner/web_task.h" | |
| 19 #include "third_party/WebKit/public/platform/WebDragData.h" | 18 #include "third_party/WebKit/public/platform/WebDragData.h" |
| 20 #include "third_party/WebKit/public/platform/WebInputEventResult.h" | 19 #include "third_party/WebKit/public/platform/WebInputEventResult.h" |
| 21 #include "third_party/WebKit/public/platform/WebPoint.h" | 20 #include "third_party/WebKit/public/platform/WebPoint.h" |
| 22 #include "third_party/WebKit/public/web/WebDragOperation.h" | 21 #include "third_party/WebKit/public/web/WebDragOperation.h" |
| 23 #include "third_party/WebKit/public/web/WebInputEvent.h" | 22 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 24 #include "third_party/WebKit/public/web/WebTouchPoint.h" | 23 #include "third_party/WebKit/public/web/WebTouchPoint.h" |
| 25 | 24 |
| 26 namespace blink { | 25 namespace blink { |
| 27 class WebFrame; | 26 class WebFrame; |
| 28 class WebView; | 27 class WebView; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 void DoDragDrop(const blink::WebDragData&, blink::WebDragOperationsMask); | 61 void DoDragDrop(const blink::WebDragData&, blink::WebDragOperationsMask); |
| 63 | 62 |
| 64 void MouseDown(int button_number, int modifiers); | 63 void MouseDown(int button_number, int modifiers); |
| 65 void MouseUp(int button_number, int modifiers); | 64 void MouseUp(int button_number, int modifiers); |
| 66 void SetMouseButtonState(int button_number, int modifiers); | 65 void SetMouseButtonState(int button_number, int modifiers); |
| 67 | 66 |
| 68 void KeyDown(const std::string& code_str, | 67 void KeyDown(const std::string& code_str, |
| 69 int modifiers, | 68 int modifiers, |
| 70 KeyLocationCode location); | 69 KeyLocationCode location); |
| 71 | 70 |
| 72 WebTaskList* mutable_task_list() { return &task_list_; } | |
| 73 | |
| 74 void set_send_wheel_gestures(bool send_wheel_gestures) { | 71 void set_send_wheel_gestures(bool send_wheel_gestures) { |
| 75 send_wheel_gestures_ = send_wheel_gestures; | 72 send_wheel_gestures_ = send_wheel_gestures; |
| 76 } | 73 } |
| 77 | 74 |
| 78 private: | 75 private: |
| 79 friend class EventSenderBindings; | 76 friend class EventSenderBindings; |
| 80 | 77 |
| 81 struct SavedEvent { | 78 struct SavedEvent { |
| 82 enum SavedEventType { | 79 enum SavedEventType { |
| 83 TYPE_UNSPECIFIED, | 80 TYPE_UNSPECIFIED, |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 int wm_key_down_; | 233 int wm_key_down_; |
| 237 int wm_key_up_; | 234 int wm_key_up_; |
| 238 int wm_char_; | 235 int wm_char_; |
| 239 int wm_dead_char_; | 236 int wm_dead_char_; |
| 240 int wm_sys_key_down_; | 237 int wm_sys_key_down_; |
| 241 int wm_sys_key_up_; | 238 int wm_sys_key_up_; |
| 242 int wm_sys_char_; | 239 int wm_sys_char_; |
| 243 int wm_sys_dead_char_; | 240 int wm_sys_dead_char_; |
| 244 #endif | 241 #endif |
| 245 | 242 |
| 246 WebTaskList task_list_; | |
| 247 | |
| 248 TestInterfaces* interfaces_; | 243 TestInterfaces* interfaces_; |
| 249 WebTestDelegate* delegate_; | 244 WebTestDelegate* delegate_; |
| 250 blink::WebView* view_; | 245 blink::WebView* view_; |
| 251 | 246 |
| 252 bool send_wheel_gestures_; | 247 bool send_wheel_gestures_; |
| 253 bool force_layout_on_events_; | 248 bool force_layout_on_events_; |
| 254 | 249 |
| 255 // When set to true (the default value), we batch mouse move and mouse up | 250 // When set to true (the default value), we batch mouse move and mouse up |
| 256 // events so we can simulate drag & drop. | 251 // events so we can simulate drag & drop. |
| 257 bool is_drag_mode_; | 252 bool is_drag_mode_; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 double last_event_timestamp_; | 296 double last_event_timestamp_; |
| 302 | 297 |
| 303 base::WeakPtrFactory<EventSender> weak_factory_; | 298 base::WeakPtrFactory<EventSender> weak_factory_; |
| 304 | 299 |
| 305 DISALLOW_COPY_AND_ASSIGN(EventSender); | 300 DISALLOW_COPY_AND_ASSIGN(EventSender); |
| 306 }; | 301 }; |
| 307 | 302 |
| 308 } // namespace test_runner | 303 } // namespace test_runner |
| 309 | 304 |
| 310 #endif // COMPONENTS_TEST_RUNNER_EVENT_SENDER_H_ | 305 #endif // COMPONENTS_TEST_RUNNER_EVENT_SENDER_H_ |
| OLD | NEW |