mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2024-12-24 00:33:12 +01:00
Windows: Fix cancellation of drag&drop when using off-screen rendering and multi-threaded message loop and returning false from CefRenderHandler::StartDragging (issue #1364).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1853 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
25ed4dfefc
commit
58de0da301
@ -409,16 +409,16 @@ CefRefPtr<CefBrowserHostImpl> CefBrowserHostImpl::CreateInternal(
|
||||
content::WebContents::CreateParams create_params(
|
||||
browser_context);
|
||||
|
||||
CefWebContentsViewOSR* view_or = NULL;
|
||||
if (window_info.windowless_rendering_enabled) {
|
||||
// Use the OSR view instead of the default view.
|
||||
CefWebContentsViewOSR* view_or = new CefWebContentsViewOSR(
|
||||
web_contents,
|
||||
CefContentBrowserClient::Get()->GetWebContentsViewDelegate(
|
||||
web_contents));
|
||||
view_or = new CefWebContentsViewOSR();
|
||||
create_params.view = view_or;
|
||||
create_params.delegate_view = view_or;
|
||||
}
|
||||
web_contents = content::WebContents::Create(create_params);
|
||||
if (view_or)
|
||||
view_or->set_web_contents(web_contents);
|
||||
}
|
||||
|
||||
CefRefPtr<CefBrowserHostImpl> browser =
|
||||
@ -2101,10 +2101,8 @@ bool CefBrowserHostImpl::ShouldCreateWebContents(
|
||||
DCHECK(pending_popup_info_.get());
|
||||
if (pending_popup_info_->window_info.windowless_rendering_enabled) {
|
||||
// Use the OSR view instead of the default view.
|
||||
CefWebContentsViewOSR* view_or = new CefWebContentsViewOSR(
|
||||
web_contents,
|
||||
CefContentBrowserClient::Get()->GetWebContentsViewDelegate(
|
||||
web_contents));
|
||||
CefWebContentsViewOSR* view_or = new CefWebContentsViewOSR();
|
||||
view_or->set_web_contents(web_contents);
|
||||
*view = view_or;
|
||||
*delegate_view = view_or;
|
||||
}
|
||||
|
@ -10,16 +10,20 @@
|
||||
|
||||
#include "content/public/browser/render_widget_host.h"
|
||||
|
||||
CefWebContentsViewOSR::CefWebContentsViewOSR(
|
||||
content::WebContents* web_contents,
|
||||
content::WebContentsViewDelegate* delegate)
|
||||
: web_contents_(web_contents),
|
||||
CefWebContentsViewOSR::CefWebContentsViewOSR()
|
||||
: web_contents_(NULL),
|
||||
view_(NULL) {
|
||||
}
|
||||
|
||||
CefWebContentsViewOSR::~CefWebContentsViewOSR() {
|
||||
}
|
||||
|
||||
void CefWebContentsViewOSR::set_web_contents(
|
||||
content::WebContents* web_contents) {
|
||||
DCHECK(!web_contents_);
|
||||
web_contents_ = web_contents;
|
||||
}
|
||||
|
||||
gfx::NativeView CefWebContentsViewOSR::GetNativeView() const {
|
||||
return gfx::NativeView();
|
||||
}
|
||||
|
@ -20,10 +20,11 @@ class CefRenderWidgetHostViewOSR;
|
||||
class CefWebContentsViewOSR : public content::WebContentsView,
|
||||
public content::RenderViewHostDelegateView {
|
||||
public:
|
||||
CefWebContentsViewOSR(content::WebContents* web_contents,
|
||||
content::WebContentsViewDelegate* delegate);
|
||||
CefWebContentsViewOSR();
|
||||
virtual ~CefWebContentsViewOSR();
|
||||
|
||||
void set_web_contents(content::WebContents* web_contents);
|
||||
|
||||
// WebContentsView methods.
|
||||
virtual gfx::NativeView GetNativeView() const OVERRIDE;
|
||||
virtual gfx::NativeView GetContentNativeView() const OVERRIDE;
|
||||
|
@ -725,7 +725,6 @@ void ClientHandler::SetOSRHandler(CefRefPtr<RenderHandler> handler) {
|
||||
}
|
||||
|
||||
CefRefPtr<ClientHandler::RenderHandler> ClientHandler::GetOSRHandler() const {
|
||||
CEF_REQUIRE_UI_THREAD();
|
||||
return osr_handler_;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user