summaryrefslogtreecommitdiffstats
path: root/chrome/browser/web_drop_target.h
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-30 23:51:39 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-30 23:51:39 +0000
commit1057da7cbd8fe6257c667f346001b7e59902ea12 (patch)
tree50da926edf5c54a187bcbdf7c24ad61f5782c961 /chrome/browser/web_drop_target.h
parentb16cc2ef8a7fd77707c88ae5a12ff2146f9ae401 (diff)
downloadchromium_src-1057da7cbd8fe6257c667f346001b7e59902ea12.zip
chromium_src-1057da7cbd8fe6257c667f346001b7e59902ea12.tar.gz
chromium_src-1057da7cbd8fe6257c667f346001b7e59902ea12.tar.bz2
When acting as a drop target, the webview keeps a cache of
the drop data so we don't have to send it over the IPC for each drag move. However, if a page load happens during the drop, the webview changes and we lose the cached data. To handle this, we keep track of which RVH we're dragging over and if it changes, we re-send the drop data. Review URL: http://codereview.chromium.org/8744 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4249 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/web_drop_target.h')
-rw-r--r--chrome/browser/web_drop_target.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/chrome/browser/web_drop_target.h b/chrome/browser/web_drop_target.h
index 45b4c4e..28f4073 100644
--- a/chrome/browser/web_drop_target.h
+++ b/chrome/browser/web_drop_target.h
@@ -9,6 +9,7 @@
#include "base/scoped_ptr.h"
class InterstitialDropTarget;
+class RenderViewHost;
class WebContents;
///////////////////////////////////////////////////////////////////////////////
@@ -52,14 +53,20 @@ class WebDropTarget : public BaseDropTarget {
// Our associated WebContents.
WebContents* web_contents_;
- // A special drop target handler for when we try to d&d while an interstitial
- // page is showing.
- scoped_ptr<InterstitialDropTarget> interstitial_drop_target_;
+ // We 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. WARNING:
+ // this pointer should never be dereferenced. We only use it for comparing
+ // pointers.
+ RenderViewHost* current_rvh_;
// Used to determine what cursor we should display when dragging over web
// content area. This can be updated async during a drag operation.
bool is_drop_target_;
+ // A special drop target handler for when we try to d&d while an interstitial
+ // page is showing.
+ scoped_ptr<InterstitialDropTarget> interstitial_drop_target_;
+
DISALLOW_EVIL_CONSTRUCTORS(WebDropTarget);
};