| 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 #include "webkit/tools/test_shell/drop_delegate.h" | 5 #include "webkit/tools/test_shell/drop_delegate.h" |
| 6 | 6 |
| 7 #include "webkit/api/public/WebDragData.h" | 7 #include "webkit/api/public/WebDragData.h" |
| 8 #include "webkit/api/public/WebPoint.h" | 8 #include "webkit/api/public/WebPoint.h" |
| 9 #include "webkit/api/public/WebView.h" |
| 9 #include "webkit/glue/webdropdata.h" | 10 #include "webkit/glue/webdropdata.h" |
| 10 #include "webkit/glue/webview.h" | |
| 11 | 11 |
| 12 using WebKit::WebDragOperation; | 12 using WebKit::WebDragOperation; |
| 13 using WebKit::WebDragOperationCopy; | 13 using WebKit::WebDragOperationCopy; |
| 14 using WebKit::WebPoint; | 14 using WebKit::WebPoint; |
| 15 using WebKit::WebView; |
| 15 | 16 |
| 16 // BaseDropTarget methods ---------------------------------------------------- | 17 // BaseDropTarget methods ---------------------------------------------------- |
| 17 | 18 |
| 18 DWORD TestDropDelegate::OnDragEnter(IDataObject* data_object, | 19 DWORD TestDropDelegate::OnDragEnter(IDataObject* data_object, |
| 19 DWORD key_state, | 20 DWORD key_state, |
| 20 POINT cursor_position, | 21 POINT cursor_position, |
| 21 DWORD effect) { | 22 DWORD effect) { |
| 22 WebDropData drop_data; | 23 WebDropData drop_data; |
| 23 WebDropData::PopulateWebDropData(data_object, &drop_data); | 24 WebDropData::PopulateWebDropData(data_object, &drop_data); |
| 24 | 25 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 DWORD effect) { | 60 DWORD effect) { |
| 60 POINT client_pt = cursor_position; | 61 POINT client_pt = cursor_position; |
| 61 ScreenToClient(GetHWND(), &client_pt); | 62 ScreenToClient(GetHWND(), &client_pt); |
| 62 webview_->dragTargetDrop( | 63 webview_->dragTargetDrop( |
| 63 WebPoint(client_pt.x, client_pt.y), | 64 WebPoint(client_pt.x, client_pt.y), |
| 64 WebPoint(cursor_position.x, cursor_position.y)); | 65 WebPoint(cursor_position.x, cursor_position.y)); |
| 65 | 66 |
| 66 // webkit win port always returns DROPEFFECT_NONE | 67 // webkit win port always returns DROPEFFECT_NONE |
| 67 return DROPEFFECT_NONE; | 68 return DROPEFFECT_NONE; |
| 68 } | 69 } |
| OLD | NEW |