| OLD | NEW |
| 1 // Copyright (c) 2010 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 #import "chrome/browser/ui/cocoa/tab_contents/web_contents_drag_source.h" | 5 #import "chrome/browser/ui/cocoa/tab_contents/web_contents_drag_source.h" |
| 6 | 6 |
| 7 #include "app/mac/nsimage_cache.h" | 7 #include "app/mac/nsimage_cache.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
| 10 #include "chrome/browser/renderer_host/render_view_host.h" | |
| 11 #include "chrome/browser/tab_contents/tab_contents.h" | |
| 12 #include "chrome/browser/tab_contents/tab_contents_view_mac.h" | 10 #include "chrome/browser/tab_contents/tab_contents_view_mac.h" |
| 11 #include "content/browser/renderer_host/render_view_host.h" |
| 12 #include "content/browser/tab_contents/tab_contents.h" |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 // Make a drag image from the drop data. | 16 // Make a drag image from the drop data. |
| 17 // TODO(feldstein): Make this work | 17 // TODO(feldstein): Make this work |
| 18 NSImage* MakeDragImage() { | 18 NSImage* MakeDragImage() { |
| 19 // TODO(feldstein): Just a stub for now. Make it do something (see, e.g., | 19 // TODO(feldstein): Just a stub for now. Make it do something (see, e.g., |
| 20 // WebKit/WebKit/mac/Misc/WebNSViewExtras.m: |-_web_DragImageForElement:...|). | 20 // WebKit/WebKit/mac/Misc/WebNSViewExtras.m: |-_web_DragImageForElement:...|). |
| 21 | 21 |
| 22 // Default to returning a generic image. | 22 // Default to returning a generic image. |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 if (rvh) { | 121 if (rvh) { |
| 122 NSPoint localPoint = [contentsView_ convertPoint:screenPoint fromView:nil]; | 122 NSPoint localPoint = [contentsView_ convertPoint:screenPoint fromView:nil]; |
| 123 FlipPointCoordinates(screenPoint, localPoint, contentsView_); | 123 FlipPointCoordinates(screenPoint, localPoint, contentsView_); |
| 124 rvh->DragSourceMovedTo(localPoint.x, localPoint.y, | 124 rvh->DragSourceMovedTo(localPoint.x, localPoint.y, |
| 125 screenPoint.x, screenPoint.y); | 125 screenPoint.x, screenPoint.y); |
| 126 } | 126 } |
| 127 } | 127 } |
| 128 | 128 |
| 129 @end // @implementation WebContentsDragSource | 129 @end // @implementation WebContentsDragSource |
| 130 | 130 |
| OLD | NEW |