Index: content/browser/browser_plugin/browser_plugin_embedder.h |
diff --git a/content/browser/browser_plugin/browser_plugin_embedder.h b/content/browser/browser_plugin/browser_plugin_embedder.h |
index 9c04a1f256431945790b594a1371fa4e372b5b13..1b6c8b248a090dd579b621b223b436d465ab37d9 100644 |
--- a/content/browser/browser_plugin/browser_plugin_embedder.h |
+++ b/content/browser/browser_plugin/browser_plugin_embedder.h |
@@ -16,8 +16,10 @@ |
#include <map> |
+#include "base/memory/weak_ptr.h" |
#include "content/public/browser/web_contents.h" |
#include "content/public/browser/web_contents_observer.h" |
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" |
struct BrowserPluginHostMsg_Attach_Params; |
struct BrowserPluginHostMsg_ResizeGuest_Params; |
@@ -28,6 +30,7 @@ class Point; |
namespace content { |
+class BrowserPluginGuest; |
class BrowserPluginGuestManager; |
class BrowserPluginHostFactory; |
class WebContentsImpl; |
@@ -56,6 +59,24 @@ class CONTENT_EXPORT BrowserPluginEmbedder : public WebContentsObserver { |
virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; |
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
+ void DragSourceEndedAt(int client_x, int client_y, int screen_x, |
+ int screen_y, WebKit::WebDragOperation operation); |
+ |
+ void DragSourceMovedTo(int client_x, int client_y, |
+ int screen_x, int screen_y); |
+ |
+ void OnUpdateDragCursor(bool* handled); |
+ |
+ void DragEnteredGuest(BrowserPluginGuest* guest); |
+ |
+ void DragLeftGuest(BrowserPluginGuest* guest); |
+ |
+ void StartDrag(BrowserPluginGuest* guest); |
+ |
+ void StopDrag(BrowserPluginGuest* guest); |
+ |
+ void SystemDragEnded(); |
+ |
private: |
friend class TestBrowserPluginEmbedder; |
@@ -86,6 +107,17 @@ class CONTENT_EXPORT BrowserPluginEmbedder : public WebContentsObserver { |
// Next request id for BrowserPluginMsg_PluginAtPositionRequest query. |
int next_get_render_view_request_id_; |
+ // Used to correctly update the cursor when dragging over a guest, and to |
+ // handle a race condition when dropping onto the guest that started the drag |
+ // (the race is that the dragend message arrives before the drop message so |
+ // the drop never takes place). |
+ // crbug.com/233571 |
+ base::WeakPtr<BrowserPluginGuest> guest_dragging_over_; |
+ |
+ // Pointer to the guest that started the drag, used to forward necessary drag |
+ // status messages to the correct guest. |
+ base::WeakPtr<BrowserPluginGuest> guest_started_drag_; |
+ |
DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder); |
}; |