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

Side by Side Diff: chrome/browser/tab_contents/web_drag_source.cc

Issue 149038: Fix for pressing escape during a drag and drop operation. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 | « chrome/browser/tab_contents/web_drag_source.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) 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 #if defined(OS_WIN) 5 #if defined(OS_WIN)
6 #include <atlbase.h> 6 #include <atlbase.h>
7 #include <atlapp.h> 7 #include <atlapp.h>
8 #include <atlmisc.h> 8 #include <atlmisc.h>
9 #endif 9 #endif
10 10
(...skipping 21 matching lines...) Expand all
32 /////////////////////////////////////////////////////////////////////////////// 32 ///////////////////////////////////////////////////////////////////////////////
33 // WebDragSource, public: 33 // WebDragSource, public:
34 34
35 WebDragSource::WebDragSource(gfx::NativeWindow source_wnd, 35 WebDragSource::WebDragSource(gfx::NativeWindow source_wnd,
36 RenderViewHost* render_view_host) 36 RenderViewHost* render_view_host)
37 : BaseDragSource(), 37 : BaseDragSource(),
38 source_wnd_(source_wnd), 38 source_wnd_(source_wnd),
39 render_view_host_(render_view_host) { 39 render_view_host_(render_view_host) {
40 } 40 }
41 41
42 void WebDragSource::OnDragSourceCancel() {
43 gfx::Point client;
44 gfx::Point screen;
45 GetCursorPositions(source_wnd_, &client, &screen);
46 render_view_host_->DragSourceEndedAt(client.x(), client.y(),
47 screen.x(), screen.y());
48 }
49
42 void WebDragSource::OnDragSourceDrop() { 50 void WebDragSource::OnDragSourceDrop() {
43 gfx::Point client; 51 gfx::Point client;
44 gfx::Point screen; 52 gfx::Point screen;
45 GetCursorPositions(source_wnd_, &client, &screen); 53 GetCursorPositions(source_wnd_, &client, &screen);
46 render_view_host_->DragSourceEndedAt(client.x(), client.y(), 54 render_view_host_->DragSourceEndedAt(client.x(), client.y(),
47 screen.x(), screen.y()); 55 screen.x(), screen.y());
48 } 56 }
49 57
50 void WebDragSource::OnDragSourceMove() { 58 void WebDragSource::OnDragSourceMove() {
51 gfx::Point client; 59 gfx::Point client;
52 gfx::Point screen; 60 gfx::Point screen;
53 GetCursorPositions(source_wnd_, &client, &screen); 61 GetCursorPositions(source_wnd_, &client, &screen);
54 render_view_host_->DragSourceMovedTo(client.x(), client.y(), 62 render_view_host_->DragSourceMovedTo(client.x(), client.y(),
55 screen.x(), screen.y()); 63 screen.x(), screen.y());
56 } 64 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/web_drag_source.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698