From b1d423a3fc2cb3eeacc2a3e91ac9bdd2211c2613 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Mon, 28 Jul 2014 17:29:14 +0200 Subject: Update the QtWebEngineCore library to run on top of Chromium 37 Most of the patch is about upstream classes/methods that changed. Other important details: - icu data files are now used by default - cygwin is no longer required to build on Windows - RenderFrameHost has been replacing RenderViewHost in a few places, following the separate process iframes support in Chromium - The user agent is accessed through ContentClient::GetUserAgent instead of from the command line switches Change-Id: I86cc93aff7ce31176a80b0b4a5d54025674a451c Reviewed-by: Andras Becsi --- src/core/content_browser_client_qt.cpp | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'src/core/content_browser_client_qt.cpp') diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp index 47b51e706..1be226ab1 100644 --- a/src/core/content_browser_client_qt.cpp +++ b/src/core/content_browser_client_qt.cpp @@ -43,10 +43,14 @@ #include "base/message_loop/message_loop.h" #include "base/threading/thread_restrictions.h" +#include "content/browser/renderer_host/render_view_host_delegate.h" #include "content/public/browser/browser_main_parts.h" #include "content/public/browser/child_process_security_policy.h" #include "content/public/browser/media_observer.h" +#include "content/public/browser/render_process_host.h" +#include "content/public/browser/render_view_host.h" #include "content/public/browser/resource_dispatcher_host.h" +#include "content/public/browser/web_contents.h" #include "content/public/common/main_function_params.h" #include "content/public/common/url_constants.h" #include "ui/gfx/screen.h" @@ -59,7 +63,7 @@ #include "dev_tools_http_handler_delegate_qt.h" #include "media_capture_devices_dispatcher.h" #include "resource_dispatcher_host_delegate_qt.h" -#include "web_contents_view_qt.h" +#include "web_contents_delegate_qt.h" #include #include @@ -159,9 +163,9 @@ private: Delegate *m_delegate; }; -base::MessagePump* messagePumpFactory() +scoped_ptr messagePumpFactory() { - return new MessagePumpForUIQt; + return scoped_ptr(new MessagePumpForUIQt); } } // namespace @@ -272,14 +276,6 @@ void ShareGroupQtQuick::AboutToAddFirstContext() m_shareContextQtQuick = make_scoped_refptr(new QtShareGLContext(shareContext)); } -content::WebContentsViewPort* ContentBrowserClientQt::OverrideCreateWebContentsView(content::WebContents* web_contents, - content::RenderViewHostDelegateView** render_view_host_delegate_view) -{ - WebContentsViewQt* rv = new WebContentsViewQt(web_contents); - *render_view_host_delegate_view = rv; - return rv; -} - ContentBrowserClientQt::ContentBrowserClientQt() : m_browserMainParts(0) { @@ -303,10 +299,10 @@ content::BrowserMainParts *ContentBrowserClientQt::CreateBrowserMainParts(const return m_browserMainParts; } -void ContentBrowserClientQt::RenderProcessHostCreated(content::RenderProcessHost* host) +void ContentBrowserClientQt::RenderProcessWillLaunch(content::RenderProcessHost* host) { // FIXME: Add a settings variable to enable/disable the file scheme. - content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme(host->GetID(), chrome::kFileScheme); + content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme(host->GetID(), url::kFileScheme); } void ContentBrowserClientQt::ResourceDispatcherHostCreated() @@ -339,7 +335,7 @@ BrowserContextQt* ContentBrowserClientQt::browser_context() { return static_cast(m_browserMainParts)->browser_context(); } -net::URLRequestContextGetter* ContentBrowserClientQt::CreateRequestContext(content::BrowserContext* content_browser_context, content::ProtocolHandlerMap* protocol_handlers) +net::URLRequestContextGetter* ContentBrowserClientQt::CreateRequestContext(content::BrowserContext* content_browser_context, content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptors) { if (content_browser_context != browser_context()) fprintf(stderr, "Warning: off the record browser context not implemented !\n"); -- cgit v1.2.3