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

Unified Diff: content/browser/browser_plugin/browser_plugin_embedder.h

Issue 12086095: Fixed drag and drop into and out of Browser Plugin. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Splitting up patch Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/browser_plugin/browser_plugin_embedder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « no previous file | content/browser/browser_plugin/browser_plugin_embedder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698