Index: base/base_drag_source.h |
diff --git a/base/base_drag_source.h b/base/base_drag_source.h |
index dea89aff0228813a8806237d34f57dfe6d49558d..3a4a94cd1cd8a0c380c5582a52f0c5e31f2ce439 100644 |
--- a/base/base_drag_source.h |
+++ b/base/base_drag_source.h |
@@ -23,6 +23,13 @@ class BaseDragSource : public IDropSource { |
BaseDragSource(); |
virtual ~BaseDragSource() { } |
+ // Stop the drag operation at the next chance we get. This doesn't |
+ // synchronously stop the drag (since Windows is controlling that), |
+ // but lets us tell Windows to cancel the drag the next chance we get. |
+ void CancelDrag() { |
+ cancel_drag_ = true; |
+ } |
+ |
// IDropSource implementation: |
HRESULT __stdcall QueryContinueDrag(BOOL escape_pressed, DWORD key_state); |
HRESULT __stdcall GiveFeedback(DWORD effect); |
@@ -40,6 +47,9 @@ class BaseDragSource : public IDropSource { |
private: |
LONG ref_count_; |
+ // Set to true if we want to cancel the drag operation. |
+ bool cancel_drag_; |
+ |
DISALLOW_EVIL_CONSTRUCTORS(BaseDragSource); |
}; |