OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include "webkit/tools/test_shell/drag_delegate.h" | 5 #include "webkit/tools/test_shell/drag_delegate.h" |
6 | 6 |
7 #include "webkit/api/public/WebPoint.h" | 7 #include "webkit/api/public/WebPoint.h" |
8 #include "webkit/glue/webview.h" | 8 #include "webkit/glue/webview.h" |
9 | 9 |
10 using WebKit::WebPoint; | 10 using WebKit::WebPoint; |
(...skipping 17 matching lines...) Expand all Loading... |
28 } // anonymous namespace | 28 } // anonymous namespace |
29 | 29 |
30 void TestDragDelegate::OnDragSourceCancel() { | 30 void TestDragDelegate::OnDragSourceCancel() { |
31 OnDragSourceDrop(); | 31 OnDragSourceDrop(); |
32 } | 32 } |
33 | 33 |
34 void TestDragDelegate::OnDragSourceDrop() { | 34 void TestDragDelegate::OnDragSourceDrop() { |
35 gfx::Point client; | 35 gfx::Point client; |
36 gfx::Point screen; | 36 gfx::Point screen; |
37 GetCursorPositions(source_hwnd_, &client, &screen); | 37 GetCursorPositions(source_hwnd_, &client, &screen); |
38 webview_->DragSourceEndedAt(client, screen); | 38 webview_->DragSourceEndedAt(client, screen, WebKit::WebDragOperationCopy); |
| 39 // TODO(snej): Pass the real drag operation instead |
39 } | 40 } |
40 | 41 |
41 void TestDragDelegate::OnDragSourceMove() { | 42 void TestDragDelegate::OnDragSourceMove() { |
42 gfx::Point client; | 43 gfx::Point client; |
43 gfx::Point screen; | 44 gfx::Point screen; |
44 GetCursorPositions(source_hwnd_, &client, &screen); | 45 GetCursorPositions(source_hwnd_, &client, &screen); |
45 webview_->DragSourceMovedTo(client, screen); | 46 webview_->DragSourceMovedTo(client, screen); |
46 } | 47 } |
OLD | NEW |