| 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 "third_party/WebKit/WebKit/chromium/public/WebPoint.h" |
| 8 #include "webkit/api/public/WebView.h" | 8 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" |
| 9 | 9 |
| 10 using WebKit::WebPoint; | 10 using WebKit::WebPoint; |
| 11 using WebKit::WebView; | 11 using WebKit::WebView; |
| 12 | 12 |
| 13 namespace { | 13 namespace { |
| 14 | 14 |
| 15 void GetCursorPositions(HWND hwnd, gfx::Point* client, gfx::Point* screen) { | 15 void GetCursorPositions(HWND hwnd, gfx::Point* client, gfx::Point* screen) { |
| 16 // GetCursorPos will fail if the input desktop isn't the current desktop. | 16 // GetCursorPos will fail if the input desktop isn't the current desktop. |
| 17 // See http://b/1173534. (0,0) is wrong, but better than uninitialized. | 17 // See http://b/1173534. (0,0) is wrong, but better than uninitialized. |
| 18 POINT pos; | 18 POINT pos; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 39 webview_->dragSourceEndedAt(client, screen, WebKit::WebDragOperationCopy); | 39 webview_->dragSourceEndedAt(client, screen, WebKit::WebDragOperationCopy); |
| 40 // TODO(snej): Pass the real drag operation instead | 40 // TODO(snej): Pass the real drag operation instead |
| 41 } | 41 } |
| 42 | 42 |
| 43 void TestDragDelegate::OnDragSourceMove() { | 43 void TestDragDelegate::OnDragSourceMove() { |
| 44 gfx::Point client; | 44 gfx::Point client; |
| 45 gfx::Point screen; | 45 gfx::Point screen; |
| 46 GetCursorPositions(source_hwnd_, &client, &screen); | 46 GetCursorPositions(source_hwnd_, &client, &screen); |
| 47 webview_->dragSourceMovedTo(client, screen); | 47 webview_->dragSourceMovedTo(client, screen); |
| 48 } | 48 } |
| OLD | NEW |