diff options
-rw-r--r-- | content/browser/browser_plugin/browser_plugin_embedder.cc | 6 | ||||
-rw-r--r-- | content/browser/browser_plugin/browser_plugin_embedder.h | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/content/browser/browser_plugin/browser_plugin_embedder.cc b/content/browser/browser_plugin/browser_plugin_embedder.cc index 2160f23..e778efb 100644 --- a/content/browser/browser_plugin/browser_plugin_embedder.cc +++ b/content/browser/browser_plugin/browser_plugin_embedder.cc @@ -173,8 +173,10 @@ void BrowserPluginEmbedder::DragSourceMovedTo(int client_x, int client_y, } void BrowserPluginEmbedder::SystemDragEnded() { - if (guest_started_drag_.get() && - (guest_started_drag_.get() != guest_dragging_over_.get())) + // When the embedder's drag/drop operation ends, we need to pass the message + // to the guest that initiated the drag/drop operation. This will ensure that + // the guest's RVH state is reset properly. + if (guest_started_drag_.get()) guest_started_drag_->EndSystemDrag(); guest_started_drag_.reset(); guest_dragging_over_.reset(); diff --git a/content/browser/browser_plugin/browser_plugin_embedder.h b/content/browser/browser_plugin/browser_plugin_embedder.h index a163360..b4bddb8 100644 --- a/content/browser/browser_plugin/browser_plugin_embedder.h +++ b/content/browser/browser_plugin/browser_plugin_embedder.h @@ -93,6 +93,8 @@ class CONTENT_EXPORT BrowserPluginEmbedder : public WebContentsObserver { void StopDrag(BrowserPluginGuest* guest); + // Sends EndSystemDrag message to the guest that initiated the last drag/drop + // operation, if there's any. void SystemDragEnded(); private: |