Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: webkit/tools/test_shell/drop_delegate.cc

Issue 3822007: Move BaseDropTarget and BaseDragSource from base to app/win. Remove the "Base... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/tools/test_shell/drop_delegate.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "third_party/WebKit/WebKit/chromium/public/WebDragData.h" 7 #include "third_party/WebKit/WebKit/chromium/public/WebDragData.h"
8 #include "third_party/WebKit/WebKit/chromium/public/WebPoint.h" 8 #include "third_party/WebKit/WebKit/chromium/public/WebPoint.h"
9 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" 9 #include "third_party/WebKit/WebKit/chromium/public/WebView.h"
10 #include "webkit/glue/webdropdata.h" 10 #include "webkit/glue/webdropdata.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 using WebKit::WebView;
16 16
17 // BaseDropTarget methods ---------------------------------------------------- 17 TestDropDelegate::TestDropDelegate(HWND source_hwnd, WebKit::WebView* webview)
18 : app::winDropTarget(source_hwnd),
19 webview_(webview) {
20 }
18 21
19 DWORD TestDropDelegate::OnDragEnter(IDataObject* data_object, 22 DWORD TestDropDelegate::OnDragEnter(IDataObject* data_object,
20 DWORD key_state, 23 DWORD key_state,
21 POINT cursor_position, 24 POINT cursor_position,
22 DWORD effect) { 25 DWORD effect) {
23 WebDropData drop_data; 26 WebDropData drop_data;
24 WebDropData::PopulateWebDropData(data_object, &drop_data); 27 WebDropData::PopulateWebDropData(data_object, &drop_data);
25 28
26 POINT client_pt = cursor_position; 29 POINT client_pt = cursor_position;
27 ScreenToClient(GetHWND(), &client_pt); 30 ScreenToClient(GetHWND(), &client_pt);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 DWORD effect) { 63 DWORD effect) {
61 POINT client_pt = cursor_position; 64 POINT client_pt = cursor_position;
62 ScreenToClient(GetHWND(), &client_pt); 65 ScreenToClient(GetHWND(), &client_pt);
63 webview_->dragTargetDrop( 66 webview_->dragTargetDrop(
64 WebPoint(client_pt.x, client_pt.y), 67 WebPoint(client_pt.x, client_pt.y),
65 WebPoint(cursor_position.x, cursor_position.y)); 68 WebPoint(cursor_position.x, cursor_position.y));
66 69
67 // webkit win port always returns DROPEFFECT_NONE 70 // webkit win port always returns DROPEFFECT_NONE
68 return DROPEFFECT_NONE; 71 return DROPEFFECT_NONE;
69 } 72 }
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/drop_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698