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

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

Issue 12252016: Prevented connecting drag drop events to a SwappedOut RenderViewHost in WebContentsViewGtk (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Oops. Fix compile error. Created 7 years, 9 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
Index: content/browser/web_contents/web_drag_dest_gtk.h
diff --git a/content/browser/web_contents/web_drag_dest_gtk.h b/content/browser/web_contents/web_drag_dest_gtk.h
index d09c54f25168730558568529d4a3b8b3494b2212..fb9a6b3719d655057dceb5d3e6b12a33b32e5245 100644
--- a/content/browser/web_contents/web_drag_dest_gtk.h
+++ b/content/browser/web_contents/web_drag_dest_gtk.h
@@ -41,6 +41,8 @@ class CONTENT_EXPORT WebDragDestGtk {
WebDragDestDelegate* delegate() const { return delegate_; }
void set_delegate(WebDragDestDelegate* delegate) { delegate_ = delegate; }
+ GtkWidget* widget() const { return widget_; }
+
private:
RenderViewHostImpl* GetRenderViewHost() const;
@@ -90,11 +92,11 @@ class CONTENT_EXPORT WebDragDestGtk {
// got from the renderer.
bool is_drop_target_;
- // Handler ID for the destroy signal handler. We connect to the destroy
- // signal handler so that we won't call dest_unset on it after it is
- // destroyed, but we have to cancel the handler if we are destroyed before
- // |widget_| is.
- int destroy_handler_;
+ // Stores Handler IDs for the gtk signal handlers. We have to cancel the
+ // signal handlers when this WebDragDestGtk is deleted so that if, later on,
+ // we re-create the drag dest with the same widget, we don't get callbacks to
+ // deleted functions.
+ scoped_array<int> handlers_;
// A delegate that can receive drag information about drag events.
WebDragDestDelegate* delegate_;
« no previous file with comments | « content/browser/web_contents/web_contents_view_gtk.cc ('k') | content/browser/web_contents/web_drag_dest_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698