michael@0: // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. michael@0: // Use of this source code is governed by a BSD-style license that can be michael@0: // found in the LICENSE file. michael@0: michael@0: #ifndef BASE_BASE_DRAG_SOURCE_H_ michael@0: #define BASE_BASE_DRAG_SOURCE_H_ michael@0: michael@0: #include michael@0: michael@0: #include "base/basictypes.h" michael@0: michael@0: /////////////////////////////////////////////////////////////////////////////// michael@0: // michael@0: // BaseDragSource michael@0: // michael@0: // A base IDropSource implementation. Handles notifications sent by an active michael@0: // drag-drop operation as the user mouses over other drop targets on their michael@0: // system. This object tells Windows whether or not the drag should continue, michael@0: // and supplies the appropriate cursors. michael@0: // michael@0: class BaseDragSource : public IDropSource { michael@0: public: michael@0: BaseDragSource(); michael@0: virtual ~BaseDragSource() { } michael@0: michael@0: // IDropSource implementation: michael@0: HRESULT __stdcall QueryContinueDrag(BOOL escape_pressed, DWORD key_state); michael@0: HRESULT __stdcall GiveFeedback(DWORD effect); michael@0: michael@0: // IUnknown implementation: michael@0: HRESULT __stdcall QueryInterface(const IID& iid, void** object); michael@0: ULONG __stdcall AddRef(); michael@0: ULONG __stdcall Release(); michael@0: michael@0: protected: michael@0: virtual void OnDragSourceCancel() { } michael@0: virtual void OnDragSourceDrop() { } michael@0: virtual void OnDragSourceMove() { } michael@0: michael@0: private: michael@0: LONG ref_count_; michael@0: michael@0: DISALLOW_EVIL_CONSTRUCTORS(BaseDragSource); michael@0: }; michael@0: michael@0: #endif // BASE_BASE_DRAG_SOURCE_H_