| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // This file contains the definition for EventSendingController. | 5 // This file contains the definition for EventSendingController. |
| 6 // | 6 // |
| 7 // Some notes about drag and drop handling: | 7 // Some notes about drag and drop handling: |
| 8 // Windows drag and drop goes through a system call to DoDragDrop. At that | 8 // Windows drag and drop goes through a system call to DoDragDrop. At that |
| 9 // point, program control is given to Windows which then periodically makes | 9 // point, program control is given to Windows which then periodically makes |
| 10 // callbacks into the webview. This won't work for layout tests, so instead, | 10 // callbacks into the webview. This won't work for layout tests, so instead, |
| 11 // we queue up all the mouse move and mouse up events. When the test tries to | 11 // we queue up all the mouse move and mouse up events. When the test tries to |
| 12 // start a drag (by calling EvenSendingController::DoDragDrop), we take the | 12 // start a drag (by calling EvenSendingController::DoDragDrop), we take the |
| 13 // events in the queue and replay them. | 13 // events in the queue and replay them. |
| 14 // The behavior of queuing events and replaying them can be disabled by a | 14 // The behavior of queuing events and replaying them can be disabled by a |
| 15 // layout test by setting eventSender.dragMode to false. | 15 // layout test by setting eventSender.dragMode to false. |
| 16 | 16 |
| 17 #include "webkit/tools/test_shell/event_sending_controller.h" | |
| 18 | |
| 19 #include <queue> | |
| 20 | |
| 21 // TODO(darin): This is very wrong. We should not be including WebCore headers | 17 // TODO(darin): This is very wrong. We should not be including WebCore headers |
| 22 // directly like this!! | 18 // directly like this!! |
| 23 #include "config.h" | 19 #include "config.h" |
| 24 #include "KeyboardCodes.h" | 20 #include "KeyboardCodes.h" |
| 25 | 21 |
| 22 #undef LOG |
| 23 |
| 24 #include "webkit/tools/test_shell/event_sending_controller.h" |
| 25 |
| 26 #include <queue> |
| 27 |
| 26 #include "base/compiler_specific.h" | 28 #include "base/compiler_specific.h" |
| 27 #include "base/logging.h" | 29 #include "base/logging.h" |
| 28 #include "base/message_loop.h" | 30 #include "base/message_loop.h" |
| 29 #include "base/string_util.h" | 31 #include "base/string_util.h" |
| 30 #include "base/time.h" | 32 #include "base/time.h" |
| 31 #include "webkit/api/public/WebDragData.h" | 33 #include "webkit/api/public/WebDragData.h" |
| 32 #include "webkit/api/public/WebPoint.h" | 34 #include "webkit/api/public/WebPoint.h" |
| 33 #include "webkit/glue/webview.h" | 35 #include "webkit/glue/webview.h" |
| 34 #include "webkit/tools/test_shell/test_shell.h" | 36 #include "webkit/tools/test_shell/test_shell.h" |
| 35 | 37 |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 | 594 |
| 593 void EventSendingController::fireKeyboardEventsToElement( | 595 void EventSendingController::fireKeyboardEventsToElement( |
| 594 const CppArgumentList& args, CppVariant* result) { | 596 const CppArgumentList& args, CppVariant* result) { |
| 595 result->SetNull(); | 597 result->SetNull(); |
| 596 } | 598 } |
| 597 | 599 |
| 598 void EventSendingController::clearKillRing( | 600 void EventSendingController::clearKillRing( |
| 599 const CppArgumentList& args, CppVariant* result) { | 601 const CppArgumentList& args, CppVariant* result) { |
| 600 result->SetNull(); | 602 result->SetNull(); |
| 601 } | 603 } |
| OLD | NEW |