Add support for CefDragHandler::OnDragEnter (issue #601).

git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/1453@1274 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2013-06-06 18:44:11 +00:00
parent 2ec8891fe2
commit 12e125b5c2
30 changed files with 1635 additions and 0 deletions

View File

@ -23,6 +23,7 @@
#include "libcef/browser/url_request_context_getter_proxy.h"
#include "libcef/common/cef_messages.h"
#include "libcef/common/cef_switches.h"
#include "libcef/common/drag_data_impl.h"
#include "libcef/common/http_header_utils.h"
#include "libcef/common/main_delegate.h"
#include "libcef/common/process_message_impl.h"
@ -1668,6 +1669,21 @@ void CefBrowserHostImpl::HandleKeyboardEvent(
PlatformHandleKeyboardEvent(event);
}
bool CefBrowserHostImpl::CanDragEnter(
content::WebContents* source,
const WebDropData& data,
WebKit::WebDragOperationsMask mask) {
CefRefPtr<CefDragHandler> handler = client_->GetDragHandler();
if (handler.get()) {
CefRefPtr<CefDragData> drag_data(new CefDragDataImpl(data));
if (handler->OnDragEnter(this, drag_data,
static_cast<CefDragHandler::DragOperationsMask>(mask))) {
return false;
}
}
return true;
}
bool CefBrowserHostImpl::ShouldCreateWebContents(
content::WebContents* web_contents,
int route_id,