mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Expose drag image via CefDragData (issue #1715)
This commit is contained in:
@ -19,6 +19,15 @@ CefDragDataImpl::CefDragDataImpl(const content::DropData& data)
|
||||
read_only_(false) {
|
||||
}
|
||||
|
||||
CefDragDataImpl::CefDragDataImpl(const content::DropData& data,
|
||||
CefRefPtr<CefImage> image,
|
||||
const CefPoint& image_hotspot)
|
||||
: data_(data),
|
||||
image_(image),
|
||||
image_hotspot_(image_hotspot),
|
||||
read_only_(false) {
|
||||
}
|
||||
|
||||
CefDragDataImpl::CefDragDataImpl()
|
||||
: read_only_(false) {
|
||||
}
|
||||
@ -31,7 +40,7 @@ CefRefPtr<CefDragData> CefDragDataImpl::Clone() {
|
||||
CefDragDataImpl* drag_data = NULL;
|
||||
{
|
||||
base::AutoLock lock_scope(lock_);
|
||||
drag_data = new CefDragDataImpl(data_);
|
||||
drag_data = new CefDragDataImpl(data_, image_, image_hotspot_);
|
||||
}
|
||||
return drag_data;
|
||||
}
|
||||
@ -187,3 +196,18 @@ void CefDragDataImpl::SetReadOnly(bool read_only) {
|
||||
|
||||
read_only_ = read_only;
|
||||
}
|
||||
|
||||
CefRefPtr<CefImage> CefDragDataImpl::GetImage() {
|
||||
base::AutoLock lock_scope(lock_);
|
||||
return image_;
|
||||
}
|
||||
|
||||
CefPoint CefDragDataImpl::GetImageHotspot() {
|
||||
base::AutoLock lock_scope(lock_);
|
||||
return image_hotspot_;
|
||||
}
|
||||
|
||||
bool CefDragDataImpl::HasImage() {
|
||||
base::AutoLock lock_scope(lock_);
|
||||
return image_ ? true : false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user