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

Unified Diff: content/browser/web_contents/web_drag_dest_mac.h

Issue 2509933002: Drag-and-drop: Target drag messages (the sequel). (Closed)
Patch Set: Addressed additional comments by avi@, dcheng@. Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/web_drag_dest_mac.h
diff --git a/content/browser/web_contents/web_drag_dest_mac.h b/content/browser/web_contents/web_drag_dest_mac.h
index 2598ee0e886d265a7f0759a8574e7c91ef1c10c9..cab64ff4d55cd5187c015a0ac1fa6a853c68b687 100644
--- a/content/browser/web_contents/web_drag_dest_mac.h
+++ b/content/browser/web_contents/web_drag_dest_mac.h
@@ -9,9 +9,11 @@
#include "base/strings/string16.h"
#include "content/common/content_export.h"
#include "content/public/common/drop_data.h"
+#include "ui/gfx/geometry/point.h"
namespace content {
class RenderViewHost;
+class RenderWidgetHostImpl;
class WebContentsImpl;
class WebDragDestDelegate;
}
@@ -35,6 +37,9 @@ CONTENT_EXPORT
// allow the drop.
NSDragOperation currentOperation_;
+ // Tracks the current RenderWidgetHost we're dragging over.
+ base::WeakPtr<content::RenderWidgetHostImpl> currentRWHForDrag_;
+
// Keep track of the render view host we're dragging over. If it changes
// during a drag, we need to re-send the DragEnter message.
RenderViewHostIdentifier currentRVH_;
@@ -67,8 +72,12 @@ CONTENT_EXPORT
- (void)draggingExited:(id<NSDraggingInfo>)info;
- (NSDragOperation)draggingUpdated:(id<NSDraggingInfo>)info
view:(NSView*)view;
-- (BOOL)performDragOperation:(id<NSDraggingInfo>)info
- view:(NSView*)view;
+- (BOOL)performDragOperation:(id<NSDraggingInfo>)info view:(NSView*)view;
+
+// Helper to call WebWidgetHostInputEventRouter::GetRenderWidgetHostAtPoint().
+- (content::RenderWidgetHostImpl*)
+GetRenderWidgetHostAtPoint:(const NSPoint&)viewPoint
+ transformedPt:(gfx::Point*)transformedPt;
@end
« no previous file with comments | « content/browser/web_contents/web_contents_view_mac.mm ('k') | content/browser/web_contents/web_drag_dest_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698