summaryrefslogtreecommitdiffstats
path: root/ui/base/dragdrop
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-19 10:19:00 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-19 10:19:00 +0000
commit8f828b9ddc5e613bde47ba59aeeaf994892ec161 (patch)
treeb5379160f4107228d9e7e389198c4b472cd55054 /ui/base/dragdrop
parent894733cc4f6d028ecd41676467ea3f7ecd0ae314 (diff)
downloadchromium_src-8f828b9ddc5e613bde47ba59aeeaf994892ec161.zip
chromium_src-8f828b9ddc5e613bde47ba59aeeaf994892ec161.tar.gz
chromium_src-8f828b9ddc5e613bde47ba59aeeaf994892ec161.tar.bz2
Rename {drag_source,drop_target}.{cc,h} to {drag_source,drop_target}_win.{cc,h}.
These files are Windows only, but seem to predate other ports and were never renamed. BUG=none R=jam,sky TBR=tc Review URL: https://chromiumcodereview.appspot.com/12842011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188979 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/dragdrop')
-rw-r--r--ui/base/dragdrop/drag_source_win.cc (renamed from ui/base/dragdrop/drag_source.cc)18
-rw-r--r--ui/base/dragdrop/drag_source_win.h (renamed from ui/base/dragdrop/drag_source.h)17
-rw-r--r--ui/base/dragdrop/drop_target_win.cc (renamed from ui/base/dragdrop/drop_target.cc)70
-rw-r--r--ui/base/dragdrop/drop_target_win.h (renamed from ui/base/dragdrop/drop_target.h)14
4 files changed, 60 insertions, 59 deletions
diff --git a/ui/base/dragdrop/drag_source.cc b/ui/base/dragdrop/drag_source_win.cc
index 0a777bd..90ce682 100644
--- a/ui/base/dragdrop/drag_source.cc
+++ b/ui/base/dragdrop/drag_source_win.cc
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/base/dragdrop/drag_source.h"
+#include "ui/base/dragdrop/drag_source_win.h"
namespace ui {
-DragSource::DragSource() : cancel_drag_(false) {
+DragSourceWin::DragSourceWin() : cancel_drag_(false) {
}
-HRESULT DragSource::QueryContinueDrag(BOOL escape_pressed, DWORD key_state) {
+HRESULT DragSourceWin::QueryContinueDrag(BOOL escape_pressed, DWORD key_state) {
if (cancel_drag_)
return DRAGDROP_S_CANCEL;
@@ -27,11 +27,11 @@ HRESULT DragSource::QueryContinueDrag(BOOL escape_pressed, DWORD key_state) {
return S_OK;
}
-HRESULT DragSource::GiveFeedback(DWORD effect) {
+HRESULT DragSourceWin::GiveFeedback(DWORD effect) {
return DRAGDROP_S_USEDEFAULTCURSORS;
}
-HRESULT DragSource::QueryInterface(const IID& iid, void** object) {
+HRESULT DragSourceWin::QueryInterface(const IID& iid, void** object) {
*object = NULL;
if (IsEqualIID(iid, IID_IUnknown) || IsEqualIID(iid, IID_IDropSource)) {
*object = this;
@@ -42,13 +42,13 @@ HRESULT DragSource::QueryInterface(const IID& iid, void** object) {
return S_OK;
}
-ULONG DragSource::AddRef() {
- base::RefCountedThreadSafe<DragSource>::AddRef();
+ULONG DragSourceWin::AddRef() {
+ base::RefCountedThreadSafe<DragSourceWin>::AddRef();
return 0;
}
-ULONG DragSource::Release() {
- base::RefCountedThreadSafe<DragSource>::Release();
+ULONG DragSourceWin::Release() {
+ base::RefCountedThreadSafe<DragSourceWin>::Release();
return 0;
}
diff --git a/ui/base/dragdrop/drag_source.h b/ui/base/dragdrop/drag_source_win.h
index 37969fe..7c03b6c 100644
--- a/ui/base/dragdrop/drag_source.h
+++ b/ui/base/dragdrop/drag_source_win.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_BASE_DRAGDROP_DRAG_SOURCE_H_
-#define UI_BASE_DRAGDROP_DRAG_SOURCE_H_
+#ifndef UI_BASE_DRAGDROP_DRAG_SOURCE_WIN_H_
+#define UI_BASE_DRAGDROP_DRAG_SOURCE_WIN_H_
#include <objidl.h>
@@ -17,11 +17,12 @@ namespace ui {
// drag-drop operation as the user mouses over other drop targets on their
// system. This object tells Windows whether or not the drag should continue,
// and supplies the appropriate cursors.
-class UI_EXPORT DragSource : public IDropSource,
- public base::RefCountedThreadSafe<DragSource> {
+class UI_EXPORT DragSourceWin
+ : public IDropSource,
+ public base::RefCountedThreadSafe<DragSourceWin> {
public:
- DragSource();
- virtual ~DragSource() {}
+ DragSourceWin();
+ virtual ~DragSourceWin() {}
// Stop the drag operation at the next chance we get. This doesn't
// synchronously stop the drag (since Windows is controlling that),
@@ -48,9 +49,9 @@ class UI_EXPORT DragSource : public IDropSource,
// Set to true if we want to cancel the drag operation.
bool cancel_drag_;
- DISALLOW_COPY_AND_ASSIGN(DragSource);
+ DISALLOW_COPY_AND_ASSIGN(DragSourceWin);
};
} // namespace ui
-#endif // UI_BASE_DRAGDROP_DRAG_SOURCE_H_
+#endif // UI_BASE_DRAGDROP_DRAG_SOURCE_WIN_H_
diff --git a/ui/base/dragdrop/drop_target.cc b/ui/base/dragdrop/drop_target_win.cc
index 0783ddd..078a14e 100644
--- a/ui/base/dragdrop/drop_target.cc
+++ b/ui/base/dragdrop/drop_target_win.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/base/dragdrop/drop_target.h"
+#include "ui/base/dragdrop/drop_target_win.h"
#include <shlobj.h>
@@ -10,9 +10,9 @@
namespace ui {
-IDropTargetHelper* DropTarget::cached_drop_target_helper_ = NULL;
+IDropTargetHelper* DropTargetWin::cached_drop_target_helper_ = NULL;
-DropTarget::DropTarget(HWND hwnd)
+DropTargetWin::DropTargetWin(HWND hwnd)
: hwnd_(hwnd),
ref_count_(0) {
DCHECK(hwnd);
@@ -20,11 +20,11 @@ DropTarget::DropTarget(HWND hwnd)
DCHECK(SUCCEEDED(result));
}
-DropTarget::~DropTarget() {
+DropTargetWin::~DropTargetWin() {
}
// static
-IDropTargetHelper* DropTarget::DropHelper() {
+IDropTargetHelper* DropTargetWin::DropHelper() {
if (!cached_drop_target_helper_) {
CoCreateInstance(CLSID_DragDropHelper, 0, CLSCTX_INPROC_SERVER,
IID_IDropTargetHelper,
@@ -34,12 +34,12 @@ IDropTargetHelper* DropTarget::DropHelper() {
}
///////////////////////////////////////////////////////////////////////////////
-// DropTarget, IDropTarget implementation:
+// DropTargetWin, IDropTarget implementation:
-HRESULT DropTarget::DragEnter(IDataObject* data_object,
- DWORD key_state,
- POINTL cursor_position,
- DWORD* effect) {
+HRESULT DropTargetWin::DragEnter(IDataObject* data_object,
+ DWORD key_state,
+ POINTL cursor_position,
+ DWORD* effect) {
// Tell the helper that we entered so it can update the drag image.
IDropTargetHelper* drop_helper = DropHelper();
if (drop_helper) {
@@ -53,9 +53,9 @@ HRESULT DropTarget::DragEnter(IDataObject* data_object,
return S_OK;
}
-HRESULT DropTarget::DragOver(DWORD key_state,
- POINTL cursor_position,
- DWORD* effect) {
+HRESULT DropTargetWin::DragOver(DWORD key_state,
+ POINTL cursor_position,
+ DWORD* effect) {
// Tell the helper that we moved over it so it can update the drag image.
IDropTargetHelper* drop_helper = DropHelper();
if (drop_helper)
@@ -66,7 +66,7 @@ HRESULT DropTarget::DragOver(DWORD key_state,
return S_OK;
}
-HRESULT DropTarget::DragLeave() {
+HRESULT DropTargetWin::DragLeave() {
// Tell the helper that we moved out of it so it can update the drag image.
IDropTargetHelper* drop_helper = DropHelper();
if (drop_helper)
@@ -78,10 +78,10 @@ HRESULT DropTarget::DragLeave() {
return S_OK;
}
-HRESULT DropTarget::Drop(IDataObject* data_object,
- DWORD key_state,
- POINTL cursor_position,
- DWORD* effect) {
+HRESULT DropTargetWin::Drop(IDataObject* data_object,
+ DWORD key_state,
+ POINTL cursor_position,
+ DWORD* effect) {
// Tell the helper that we dropped onto it so it can update the drag image.
IDropTargetHelper* drop_helper = DropHelper();
if (drop_helper) {
@@ -95,9 +95,9 @@ HRESULT DropTarget::Drop(IDataObject* data_object,
}
///////////////////////////////////////////////////////////////////////////////
-// DropTarget, IUnknown implementation:
+// DropTargetWin, IUnknown implementation:
-HRESULT DropTarget::QueryInterface(const IID& iid, void** object) {
+HRESULT DropTargetWin::QueryInterface(const IID& iid, void** object) {
*object = NULL;
if (IsEqualIID(iid, IID_IUnknown) || IsEqualIID(iid, IID_IDropTarget)) {
*object = this;
@@ -108,11 +108,11 @@ HRESULT DropTarget::QueryInterface(const IID& iid, void** object) {
return S_OK;
}
-ULONG DropTarget::AddRef() {
+ULONG DropTargetWin::AddRef() {
return ++ref_count_;
}
-ULONG DropTarget::Release() {
+ULONG DropTargetWin::Release() {
if (--ref_count_ == 0) {
delete this;
return 0U;
@@ -120,27 +120,27 @@ ULONG DropTarget::Release() {
return ref_count_;
}
-DWORD DropTarget::OnDragEnter(IDataObject* data_object,
- DWORD key_state,
- POINT cursor_position,
- DWORD effect) {
+DWORD DropTargetWin::OnDragEnter(IDataObject* data_object,
+ DWORD key_state,
+ POINT cursor_position,
+ DWORD effect) {
return DROPEFFECT_NONE;
}
-DWORD DropTarget::OnDragOver(IDataObject* data_object,
- DWORD key_state,
- POINT cursor_position,
- DWORD effect) {
+DWORD DropTargetWin::OnDragOver(IDataObject* data_object,
+ DWORD key_state,
+ POINT cursor_position,
+ DWORD effect) {
return DROPEFFECT_NONE;
}
-void DropTarget::OnDragLeave(IDataObject* data_object) {
+void DropTargetWin::OnDragLeave(IDataObject* data_object) {
}
-DWORD DropTarget::OnDrop(IDataObject* data_object,
- DWORD key_state,
- POINT cursor_position,
- DWORD effect) {
+DWORD DropTargetWin::OnDrop(IDataObject* data_object,
+ DWORD key_state,
+ POINT cursor_position,
+ DWORD effect) {
return DROPEFFECT_NONE;
}
diff --git a/ui/base/dragdrop/drop_target.h b/ui/base/dragdrop/drop_target_win.h
index 368678d..0f8c56d 100644
--- a/ui/base/dragdrop/drop_target.h
+++ b/ui/base/dragdrop/drop_target_win.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_BASE_DRAGDROP_DROP_TARGET_H_
-#define UI_BASE_DRAGDROP_DROP_TARGET_H_
+#ifndef UI_BASE_DRAGDROP_DROP_TARGET_WIN_H_
+#define UI_BASE_DRAGDROP_DROP_TARGET_WIN_H_
#include <objidl.h>
@@ -24,11 +24,11 @@ namespace ui {
// before the HWND is deleted too.
//
// This class is meant to be used in a STA and is not multithread-safe.
-class UI_EXPORT DropTarget : public IDropTarget {
+class UI_EXPORT DropTargetWin : public IDropTarget {
public:
// Create a new DropTarget associating it with the given HWND.
- explicit DropTarget(HWND hwnd);
- virtual ~DropTarget();
+ explicit DropTargetWin(HWND hwnd);
+ virtual ~DropTargetWin();
// IDropTarget implementation:
HRESULT __stdcall DragEnter(IDataObject* data_object,
@@ -106,9 +106,9 @@ class UI_EXPORT DropTarget : public IDropTarget {
LONG ref_count_;
- DISALLOW_COPY_AND_ASSIGN(DropTarget);
+ DISALLOW_COPY_AND_ASSIGN(DropTargetWin);
};
} // namespace ui
-#endif // UI_BASE_DRAGDROP_DROP_TARGET_H_
+#endif // UI_BASE_DRAGDROP_DROP_TARGET_WIN_H_