mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2024-12-24 16:51:38 +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(
|
content::WebContents::CreateParams create_params(
|
||||||
browser_context);
|
browser_context);
|
||||||
|
|
||||||
|
CefWebContentsViewOSR* view_or = NULL;
|
||||||
if (window_info.windowless_rendering_enabled) {
|
if (window_info.windowless_rendering_enabled) {
|
||||||
// Use the OSR view instead of the default view.
|
// Use the OSR view instead of the default view.
|
||||||
CefWebContentsViewOSR* view_or = new CefWebContentsViewOSR(
|
view_or = new CefWebContentsViewOSR();
|
||||||
web_contents,
|
|
||||||
CefContentBrowserClient::Get()->GetWebContentsViewDelegate(
|
|
||||||
web_contents));
|
|
||||||
create_params.view = view_or;
|
create_params.view = view_or;
|
||||||
create_params.delegate_view = view_or;
|
create_params.delegate_view = view_or;
|
||||||
}
|
}
|
||||||
web_contents = content::WebContents::Create(create_params);
|
web_contents = content::WebContents::Create(create_params);
|
||||||
|
if (view_or)
|
||||||
|
view_or->set_web_contents(web_contents);
|
||||||
}
|
}
|
||||||
|
|
||||||
CefRefPtr<CefBrowserHostImpl> browser =
|
CefRefPtr<CefBrowserHostImpl> browser =
|
||||||
@ -2101,10 +2101,8 @@ bool CefBrowserHostImpl::ShouldCreateWebContents(
|
|||||||
DCHECK(pending_popup_info_.get());
|
DCHECK(pending_popup_info_.get());
|
||||||
if (pending_popup_info_->window_info.windowless_rendering_enabled) {
|
if (pending_popup_info_->window_info.windowless_rendering_enabled) {
|
||||||
// Use the OSR view instead of the default view.
|
// Use the OSR view instead of the default view.
|
||||||
CefWebContentsViewOSR* view_or = new CefWebContentsViewOSR(
|
CefWebContentsViewOSR* view_or = new CefWebContentsViewOSR();
|
||||||
web_contents,
|
view_or->set_web_contents(web_contents);
|
||||||
CefContentBrowserClient::Get()->GetWebContentsViewDelegate(
|
|
||||||
web_contents));
|
|
||||||
*view = view_or;
|
*view = view_or;
|
||||||
*delegate_view = view_or;
|
*delegate_view = view_or;
|
||||||
}
|
}
|
||||||
|
@ -10,16 +10,20 @@
|
|||||||
|
|
||||||
#include "content/public/browser/render_widget_host.h"
|
#include "content/public/browser/render_widget_host.h"
|
||||||
|
|
||||||
CefWebContentsViewOSR::CefWebContentsViewOSR(
|
CefWebContentsViewOSR::CefWebContentsViewOSR()
|
||||||
content::WebContents* web_contents,
|
: web_contents_(NULL),
|
||||||
content::WebContentsViewDelegate* delegate)
|
|
||||||
: web_contents_(web_contents),
|
|
||||||
view_(NULL) {
|
view_(NULL) {
|
||||||
}
|
}
|
||||||
|
|
||||||
CefWebContentsViewOSR::~CefWebContentsViewOSR() {
|
CefWebContentsViewOSR::~CefWebContentsViewOSR() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CefWebContentsViewOSR::set_web_contents(
|
||||||
|
content::WebContents* web_contents) {
|
||||||
|
DCHECK(!web_contents_);
|
||||||
|
web_contents_ = web_contents;
|
||||||
|
}
|
||||||
|
|
||||||
gfx::NativeView CefWebContentsViewOSR::GetNativeView() const {
|
gfx::NativeView CefWebContentsViewOSR::GetNativeView() const {
|
||||||
return gfx::NativeView();
|
return gfx::NativeView();
|
||||||
}
|
}
|
||||||
|
@ -20,10 +20,11 @@ class CefRenderWidgetHostViewOSR;
|
|||||||
class CefWebContentsViewOSR : public content::WebContentsView,
|
class CefWebContentsViewOSR : public content::WebContentsView,
|
||||||
public content::RenderViewHostDelegateView {
|
public content::RenderViewHostDelegateView {
|
||||||
public:
|
public:
|
||||||
CefWebContentsViewOSR(content::WebContents* web_contents,
|
CefWebContentsViewOSR();
|
||||||
content::WebContentsViewDelegate* delegate);
|
|
||||||
virtual ~CefWebContentsViewOSR();
|
virtual ~CefWebContentsViewOSR();
|
||||||
|
|
||||||
|
void set_web_contents(content::WebContents* web_contents);
|
||||||
|
|
||||||
// WebContentsView methods.
|
// WebContentsView methods.
|
||||||
virtual gfx::NativeView GetNativeView() const OVERRIDE;
|
virtual gfx::NativeView GetNativeView() const OVERRIDE;
|
||||||
virtual gfx::NativeView GetContentNativeView() const OVERRIDE;
|
virtual gfx::NativeView GetContentNativeView() const OVERRIDE;
|
||||||
|
@ -725,7 +725,6 @@ void ClientHandler::SetOSRHandler(CefRefPtr<RenderHandler> handler) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
CefRefPtr<ClientHandler::RenderHandler> ClientHandler::GetOSRHandler() const {
|
CefRefPtr<ClientHandler::RenderHandler> ClientHandler::GetOSRHandler() const {
|
||||||
CEF_REQUIRE_UI_THREAD();
|
|
||||||
return osr_handler_;
|
return osr_handler_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user