From 93ca852dbf00e93c07269e8cca389bc1222130d3 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 21 Jan 2016 16:01:46 +0100 Subject: Basic adaptation to Chromium 49 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Converts types, callbacks and headers to match Chromium 49. Task-number: QTBUG-51173 Change-Id: I544ef46e187105e250fea1b48b72d2c81a906640 Reviewed-by: Michael BrĂ¼ning --- src/core/api/qwebengineurlrequestinfo.cpp | 2 ++ src/core/api/qwebengineurlrequestinfo.h | 2 ++ src/core/browser_context_qt.cpp | 9 ++++-- src/core/browser_context_qt.h | 1 + src/core/chromium_overrides.cpp | 4 +-- src/core/clipboard_qt.cpp | 6 ++-- src/core/clipboard_qt.h | 6 ++-- src/core/common/qt_messages.h | 10 +++---- src/core/common/user_script_data.cpp | 2 +- src/core/common/user_script_data.h | 5 ++-- src/core/content_browser_client_qt.cpp | 25 +++++++++-------- src/core/content_browser_client_qt.h | 22 +++++++-------- src/core/content_client_qt.cpp | 12 ++++---- src/core/dev_tools_http_handler_delegate_qt.cpp | 2 +- src/core/download_manager_delegate_qt.h | 2 +- src/core/gl_surface_qt.cpp | 15 ++++++++-- src/core/gyp_run.pro | 6 ++-- src/core/media_capture_devices_dispatcher.cpp | 12 ++++---- src/core/network_delegate_qt.cpp | 17 ++++++------ src/core/network_delegate_qt.h | 8 +++--- src/core/print_view_manager_base_qt.cpp | 6 ++-- src/core/print_view_manager_qt.cpp | 4 +-- src/core/printing_message_filter_qt.cpp | 4 +-- src/core/printing_message_filter_qt.h | 2 +- src/core/process_main.cpp | 2 +- src/core/proxy_config_service_qt.h | 1 - src/core/render_widget_host_view_qt.cpp | 32 ++++++++++++++-------- src/core/render_widget_host_view_qt.h | 9 ++++-- src/core/renderer/content_renderer_client_qt.cpp | 12 ++++---- src/core/renderer/content_renderer_client_qt.h | 2 +- .../renderer/pepper/pepper_flash_browser_host_qt.h | 1 - .../pepper/pepper_flash_renderer_host_qt.h | 1 - .../pepper/pepper_renderer_host_factory_qt.h | 2 -- src/core/renderer/render_frame_observer_qt.h | 1 - src/core/renderer/user_resource_controller.cpp | 8 +++--- src/core/renderer/user_resource_controller.h | 4 +-- src/core/resource_dispatcher_host_delegate_qt.cpp | 14 +++++----- src/core/resource_dispatcher_host_delegate_qt.h | 6 ++-- src/core/url_request_context_getter_qt.cpp | 23 +++++++--------- src/core/url_request_context_getter_qt.h | 1 + src/core/url_request_custom_job.cpp | 25 ++++++++--------- src/core/url_request_custom_job.h | 2 +- src/core/url_request_qrc_job_qt.cpp | 13 +++------ src/core/url_request_qrc_job_qt.h | 2 +- src/core/web_contents_adapter.cpp | 18 ++++++------ src/core/web_contents_delegate_qt.cpp | 7 ++--- src/core/web_contents_delegate_qt.h | 4 +-- src/core/web_contents_view_qt.cpp | 2 +- src/core/web_engine_context.cpp | 2 +- 49 files changed, 198 insertions(+), 180 deletions(-) diff --git a/src/core/api/qwebengineurlrequestinfo.cpp b/src/core/api/qwebengineurlrequestinfo.cpp index 029c77fe8..7dc5182ad 100644 --- a/src/core/api/qwebengineurlrequestinfo.cpp +++ b/src/core/api/qwebengineurlrequestinfo.cpp @@ -62,6 +62,8 @@ ASSERT_ENUMS_MATCH(QWebEngineUrlRequestInfo::ResourceTypeFavicon, content::RESOU ASSERT_ENUMS_MATCH(QWebEngineUrlRequestInfo::ResourceTypeXhr, content::RESOURCE_TYPE_XHR) ASSERT_ENUMS_MATCH(QWebEngineUrlRequestInfo::ResourceTypePing, content::RESOURCE_TYPE_PING) ASSERT_ENUMS_MATCH(QWebEngineUrlRequestInfo::ResourceTypeServiceWorker, content::RESOURCE_TYPE_SERVICE_WORKER) +ASSERT_ENUMS_MATCH(QWebEngineUrlRequestInfo::ResourceTypeCspReport, content::RESOURCE_TYPE_CSP_REPORT) +ASSERT_ENUMS_MATCH(QWebEngineUrlRequestInfo::ResourceTypePluginResource, content::RESOURCE_TYPE_PLUGIN_RESOURCE) ASSERT_ENUMS_MATCH(QWebEngineUrlRequestInfo::ResourceTypeUnknown, content::RESOURCE_TYPE_LAST_TYPE) ASSERT_ENUMS_MATCH(QtWebEngineCore::WebContentsAdapterClient::LinkNavigation, QWebEngineUrlRequestInfo::NavigationTypeLink) diff --git a/src/core/api/qwebengineurlrequestinfo.h b/src/core/api/qwebengineurlrequestinfo.h index 0d315936c..34570b61f 100644 --- a/src/core/api/qwebengineurlrequestinfo.h +++ b/src/core/api/qwebengineurlrequestinfo.h @@ -73,6 +73,8 @@ public: ResourceTypeXhr, // a XMLHttpRequest ResourceTypePing, // a ping request for ResourceTypeServiceWorker, // the main resource of a service worker. + ResourceTypeCspReport, + ResourceTypePluginResource, ResourceTypeUnknown }; diff --git a/src/core/browser_context_qt.cpp b/src/core/browser_context_qt.cpp index ca772c169..de6c06dd7 100644 --- a/src/core/browser_context_qt.cpp +++ b/src/core/browser_context_qt.cpp @@ -86,7 +86,7 @@ BrowserContextQt::BrowserContextQt(BrowserContextAdapter *adapter) registry->RegisterBooleanPref(prefs::kSpellCheckUseSpellingService, false); registry->RegisterBooleanPref(prefs::kEnableContinuousSpellcheck, false); registry->RegisterBooleanPref(prefs::kEnableAutoSpellCorrect, false); - m_prefService = factory.Create(registry.get()).Pass(); + m_prefService = factory.Create(std::move(registry.get())); user_prefs::UserPrefs::Set(this, m_prefService.get()); } #else @@ -180,6 +180,11 @@ scoped_ptr BrowserContextQt::CreateZoomLevelDelegate return nullptr; } +content::BackgroundSyncController* BrowserContextQt::GetBackgroundSyncController() +{ + return nullptr; +} + content::PermissionManager *BrowserContextQt::GetPermissionManager() { if (!permissionManager) @@ -189,7 +194,7 @@ content::PermissionManager *BrowserContextQt::GetPermissionManager() net::URLRequestContextGetter *BrowserContextQt::CreateRequestContext(content::ProtocolHandlerMap *protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptors) { - url_request_getter_ = new URLRequestContextGetterQt(m_adapter, protocol_handlers, request_interceptors.Pass()); + url_request_getter_ = new URLRequestContextGetterQt(m_adapter, protocol_handlers, std::move(request_interceptors)); return url_request_getter_.get(); } diff --git a/src/core/browser_context_qt.h b/src/core/browser_context_qt.h index 6a4b65b6b..044a3adac 100644 --- a/src/core/browser_context_qt.h +++ b/src/core/browser_context_qt.h @@ -86,6 +86,7 @@ public: net::URLRequestContextGetter *CreateRequestContext(content::ProtocolHandlerMap *protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptors); virtual scoped_ptr CreateZoomLevelDelegate(const base::FilePath& partition_path) Q_DECL_OVERRIDE; virtual content::PermissionManager *GetPermissionManager() Q_DECL_OVERRIDE; + virtual content::BackgroundSyncController* GetBackgroundSyncController() Q_DECL_OVERRIDE; BrowserContextAdapter *adapter() { return m_adapter; } diff --git a/src/core/chromium_overrides.cpp b/src/core/chromium_overrides.cpp index 8cff99222..18596c337 100644 --- a/src/core/chromium_overrides.cpp +++ b/src/core/chromium_overrides.cpp @@ -131,7 +131,7 @@ scoped_ptr GetFontList_SlowBlocking() // TODO: Support localized family names. font_list->Append(font_item); } - return font_list.Pass(); + return std::move(font_list); } #if defined(ENABLE_PLUGINS) @@ -166,7 +166,7 @@ namespace net { class SSLPrivateKey { }; class X509Certificate; -scoped_ptr FetchClientCertPrivateKey(X509Certificate* certificate, scoped_refptr task_runner) +scoped_ptr FetchClientCertPrivateKey(X509Certificate* certificate) { return scoped_ptr(); } diff --git a/src/core/clipboard_qt.cpp b/src/core/clipboard_qt.cpp index 13888c3b0..3b3248559 100644 --- a/src/core/clipboard_qt.cpp +++ b/src/core/clipboard_qt.cpp @@ -307,7 +307,7 @@ void ClipboardQt::ReadAsciiText(ui::ClipboardType type, std::string* result) con *result = mimeData->text().toStdString(); } -void ClipboardQt::ReadHTML(ui::ClipboardType type, base::string16* markup, std::string* src_url, uint32* fragment_start, uint32* fragment_end) const +void ClipboardQt::ReadHTML(ui::ClipboardType type, base::string16* markup, std::string* src_url, uint32_t* fragment_start, uint32_t* fragment_end) const { markup->clear(); if (src_url) @@ -317,7 +317,7 @@ void ClipboardQt::ReadHTML(ui::ClipboardType type, base::string16* markup, std:: const QMimeData *mimeData = QGuiApplication::clipboard()->mimeData(type == ui::CLIPBOARD_TYPE_COPY_PASTE ? QClipboard::Clipboard : QClipboard::Selection); *markup = toString16(mimeData->html()); - *fragment_end = static_cast(markup->length()); + *fragment_end = static_cast(markup->length()); } void ClipboardQt::ReadRTF(ui::ClipboardType type, std::string* result) const @@ -364,7 +364,7 @@ void ClipboardQt::ReadData(const FormatType& format, std::string* result) const *result = std::string(byteArray.constData(), byteArray.length()); } -uint64 ClipboardQt::GetSequenceNumber(ui::ClipboardType type) const +uint64_t ClipboardQt::GetSequenceNumber(ui::ClipboardType type) const { return clipboardChangeObserver()->getSequenceNumber(type == ui::CLIPBOARD_TYPE_COPY_PASTE ? QClipboard::Clipboard : QClipboard::Selection); } diff --git a/src/core/clipboard_qt.h b/src/core/clipboard_qt.h index 6a2ea104a..6af4193d9 100644 --- a/src/core/clipboard_qt.h +++ b/src/core/clipboard_qt.h @@ -65,7 +65,7 @@ private: class ClipboardQt : public ui::Clipboard { public: - virtual uint64 GetSequenceNumber(ui::ClipboardType type) const Q_DECL_OVERRIDE; + virtual uint64_t GetSequenceNumber(ui::ClipboardType type) const Q_DECL_OVERRIDE; virtual bool IsFormatAvailable(const FormatType& format, ui::ClipboardType type) const Q_DECL_OVERRIDE; virtual void Clear(ui::ClipboardType type) Q_DECL_OVERRIDE; virtual void ReadAvailableTypes(ui::ClipboardType type, std::vector* types, bool* contains_filenames) const Q_DECL_OVERRIDE; @@ -74,8 +74,8 @@ public: virtual void ReadHTML(ui::ClipboardType type, base::string16* markup, std::string* src_url, - uint32* fragment_start, - uint32* fragment_end) const Q_DECL_OVERRIDE; + uint32_t* fragment_start, + uint32_t* fragment_end) const Q_DECL_OVERRIDE; virtual void ReadRTF(ui::ClipboardType type, std::string* result) const Q_DECL_OVERRIDE; virtual SkBitmap ReadImage(ui::ClipboardType type) const Q_DECL_OVERRIDE; virtual void ReadCustomData(ui::ClipboardType clipboard_type, const base::string16& type, base::string16* result) const Q_DECL_OVERRIDE; diff --git a/src/core/common/qt_messages.h b/src/core/common/qt_messages.h index d76b1c911..b8991a2b3 100644 --- a/src/core/common/qt_messages.h +++ b/src/core/common/qt_messages.h @@ -26,13 +26,13 @@ IPC_STRUCT_TRAITS_END() // These are messages sent from the browser to the renderer process. IPC_MESSAGE_ROUTED1(RenderViewObserverQt_FetchDocumentMarkup, - uint64 /* requestId */) + uint64_t /* requestId */) IPC_MESSAGE_ROUTED1(RenderViewObserverQt_FetchDocumentInnerText, - uint64 /* requestId */) + uint64_t /* requestId */) IPC_MESSAGE_ROUTED1(RenderViewObserverQt_SetBackgroundColor, - uint32 /* color */) + uint32_t /* color */) IPC_MESSAGE_ROUTED1(WebChannelIPCTransport_Install, uint /* worldId */) IPC_MESSAGE_ROUTED1(WebChannelIPCTransport_Uninstall, uint /* worldId */) @@ -54,11 +54,11 @@ IPC_MESSAGE_CONTROL0(UserResourceController_ClearScripts) // These are messages sent from the renderer back to the browser process. IPC_MESSAGE_ROUTED2(RenderViewObserverHostQt_DidFetchDocumentMarkup, - uint64 /* requestId */, + uint64_t /* requestId */, base::string16 /* markup */) IPC_MESSAGE_ROUTED2(RenderViewObserverHostQt_DidFetchDocumentInnerText, - uint64 /* requestId */, + uint64_t /* requestId */, base::string16 /* innerText */) IPC_MESSAGE_ROUTED0(RenderViewObserverHostQt_DidFirstVisuallyNonEmptyLayout) diff --git a/src/core/common/user_script_data.cpp b/src/core/common/user_script_data.cpp index 21047d040..6f4b8cb05 100644 --- a/src/core/common/user_script_data.cpp +++ b/src/core/common/user_script_data.cpp @@ -44,6 +44,6 @@ UserScriptData::UserScriptData() : injectionPoint(AfterLoad) , injectForSubframes(false) , worldId(1) { - static uint64 idCount = 0; + static uint64_t idCount = 0; scriptId = idCount++; } diff --git a/src/core/common/user_script_data.h b/src/core/common/user_script_data.h index b8b6025f0..943d61798 100644 --- a/src/core/common/user_script_data.h +++ b/src/core/common/user_script_data.h @@ -42,7 +42,6 @@ #include #include -#include "base/basictypes.h" #include "ipc/ipc_message_utils.h" #include "url/gurl.h" @@ -57,10 +56,10 @@ struct UserScriptData { std::string source; GURL url; - /*InjectionPoint*/uint8 injectionPoint; + /*InjectionPoint*/uint8_t injectionPoint; bool injectForSubframes; uint worldId; - uint64 scriptId; + uint64_t scriptId; }; QT_BEGIN_NAMESPACE diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp index 97d43fb90..03d142c0b 100644 --- a/src/core/content_browser_client_qt.cpp +++ b/src/core/content_browser_client_qt.cpp @@ -403,7 +403,7 @@ content::AccessTokenStore *ContentBrowserClientQt::CreateAccessTokenStore() net::URLRequestContextGetter* ContentBrowserClientQt::CreateRequestContext(content::BrowserContext* browser_context, content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptors) { - return static_cast(browser_context)->CreateRequestContext(protocol_handlers, request_interceptors.Pass()); + return static_cast(browser_context)->CreateRequestContext(protocol_handlers, std::move(request_interceptors)); } content::QuotaPermissionContext *ContentBrowserClientQt::CreateQuotaPermissionContext() @@ -411,21 +411,22 @@ content::QuotaPermissionContext *ContentBrowserClientQt::CreateQuotaPermissionCo return new QuotaPermissionContextQt; } -void ContentBrowserClientQt::AllowCertificateError(int render_process_id, int render_frame_id, int cert_error, - const net::SSLInfo& ssl_info, const GURL& request_url, - content::ResourceType resource_type, - bool overridable, bool strict_enforcement, - bool expired_previous_decision, - const base::Callback& callback, - content::CertificateRequestResultType* result) + +void ContentBrowserClientQt::AllowCertificateError(content::WebContents *webContents, + int cert_error, + const net::SSLInfo& ssl_info, + const GURL& request_url, + content::ResourceType resource_type, + bool overridable, + bool strict_enforcement, + bool expired_previous_decision, + const base::Callback& callback, + content::CertificateRequestResultType* result) { // We leave the result with its default value. Q_UNUSED(result); - content::RenderFrameHost *frameHost = content::RenderFrameHost::FromID(render_process_id, render_frame_id); - WebContentsDelegateQt* contentsDelegate = 0; - if (content::WebContents *webContents = frameHost->GetRenderViewHost()->GetDelegate()->GetAsWebContents()) - contentsDelegate = static_cast(webContents->GetDelegate()); + WebContentsDelegateQt* contentsDelegate = static_cast(webContents->GetDelegate()); QSharedPointer errorController(new CertificateErrorController(new CertificateErrorControllerPrivate(cert_error, ssl_info, request_url, resource_type, overridable, strict_enforcement, callback))); contentsDelegate->allowCertificateError(errorController); diff --git a/src/core/content_browser_client_qt.h b/src/core/content_browser_client_qt.h index ac5808448..1878e3d27 100644 --- a/src/core/content_browser_client_qt.h +++ b/src/core/content_browser_client_qt.h @@ -92,18 +92,16 @@ public: virtual content::AccessTokenStore* CreateAccessTokenStore() Q_DECL_OVERRIDE; virtual content::QuotaPermissionContext *CreateQuotaPermissionContext() Q_DECL_OVERRIDE; virtual void OverrideWebkitPrefs(content::RenderViewHost *, content::WebPreferences *) Q_DECL_OVERRIDE; - virtual void AllowCertificateError( - int render_process_id, - int render_frame_id, - int cert_error, - const net::SSLInfo& ssl_info, - const GURL& request_url, - content::ResourceType resource_type, - bool overridable, - bool strict_enforcement, - bool expired_previous_decision, - const base::Callback& callback, - content::CertificateRequestResultType* result) Q_DECL_OVERRIDE; + virtual void AllowCertificateError(content::WebContents* web_contents, + int cert_error, + const net::SSLInfo& ssl_info, + const GURL& request_url, + content::ResourceType resource_type, + bool overridable, + bool strict_enforcement, + bool expired_previous_decision, + const base::Callback& callback, + content::CertificateRequestResultType* result) Q_DECL_OVERRIDE; content::LocationProvider* OverrideSystemLocationProvider() Q_DECL_OVERRIDE; content::DevToolsManagerDelegate *GetDevToolsManagerDelegate() Q_DECL_OVERRIDE; virtual net::URLRequestContextGetter *CreateRequestContext(content::BrowserContext *browser_context, content::ProtocolHandlerMap *protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptorss) Q_DECL_OVERRIDE; diff --git a/src/core/content_client_qt.cpp b/src/core/content_client_qt.cpp index d14e13137..49f0e524d 100644 --- a/src/core/content_client_qt.cpp +++ b/src/core/content_client_qt.cpp @@ -63,10 +63,10 @@ #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. -static const int32 kPepperFlashPermissions = ppapi::PERMISSION_DEV | - ppapi::PERMISSION_PRIVATE | - ppapi::PERMISSION_BYPASS_USER_GESTURE | - ppapi::PERMISSION_FLASH; +static const int32_t kPepperFlashPermissions = ppapi::PERMISSION_DEV | + ppapi::PERMISSION_PRIVATE | + ppapi::PERMISSION_BYPASS_USER_GESTURE | + ppapi::PERMISSION_FLASH; namespace switches { const char kPpapiFlashPath[] = "ppapi-flash-path"; @@ -78,8 +78,8 @@ static const base::FilePath::CharType kWidevineCdmBaseDirectory[] = FILE_PATH_LI static const char kWidevineCdmPluginExtension[] = ""; -static const int32 kWidevineCdmPluginPermissions = ppapi::PERMISSION_DEV - | ppapi::PERMISSION_PRIVATE; +static const int32_t kWidevineCdmPluginPermissions = ppapi::PERMISSION_DEV + | ppapi::PERMISSION_PRIVATE; static QString ppapiPluginsPath() { diff --git a/src/core/dev_tools_http_handler_delegate_qt.cpp b/src/core/dev_tools_http_handler_delegate_qt.cpp index d15360e16..f3ffcc86d 100644 --- a/src/core/dev_tools_http_handler_delegate_qt.cpp +++ b/src/core/dev_tools_http_handler_delegate_qt.cpp @@ -187,7 +187,7 @@ scoped_ptr createDevToolsHttpHandler() } scoped_ptr factory(new TCPServerSocketFactory(delegate->bindAddress().toStdString(), delegate->port(), 1)); // Ownership of the delegate is taken over the devtools http handler. - scoped_ptr handler(new DevToolsHttpHandler(factory.Pass(), std::string(), delegate, base::FilePath(), base::FilePath(), std::string(), std::string())); + scoped_ptr handler(new DevToolsHttpHandler(std::move(factory), std::string(), delegate, base::FilePath(), base::FilePath(), std::string(), std::string())); DevToolsDiscoveryManager::GetInstance()->AddProvider(scoped_ptr(new DevToolsDiscoveryProviderQt())); return handler; } diff --git a/src/core/download_manager_delegate_qt.h b/src/core/download_manager_delegate_qt.h index cd7e2ecb7..e724b4e23 100644 --- a/src/core/download_manager_delegate_qt.h +++ b/src/core/download_manager_delegate_qt.h @@ -94,7 +94,7 @@ private: void savePackageDownloadCreated(content::DownloadItem *download); BrowserContextAdapter *m_contextAdapter; - uint64 m_currentId; + uint64_t m_currentId; base::WeakPtrFactory m_weakPtrFactory; friend class DownloadManagerDelegateInstance; diff --git a/src/core/gl_surface_qt.cpp b/src/core/gl_surface_qt.cpp index f77bd0637..0124ae66d 100644 --- a/src/core/gl_surface_qt.cpp +++ b/src/core/gl_surface_qt.cpp @@ -99,7 +99,7 @@ public: virtual bool Initialize() Q_DECL_OVERRIDE; virtual void Destroy() Q_DECL_OVERRIDE; virtual void* GetHandle() Q_DECL_OVERRIDE; - virtual bool Resize(const gfx::Size &size) Q_DECL_OVERRIDE; + virtual bool Resize(const gfx::Size& size, float scale_factor, bool has_alpha) Q_DECL_OVERRIDE; protected: ~GLSurfaceQtEGL(); @@ -378,6 +378,16 @@ bool GLSurfaceEGL::IsCreateContextRobustnessSupported() return false; } +const char* GLSurfaceEGL::GetEGLExtensions() +{ + return g_extensions; +} + +bool GLSurfaceEGL::HasEGLExtension(const char* name) +{ + return ExtensionsContain(GetEGLExtensions(), name); +} + GLSurfaceQt::GLSurfaceQt(const gfx::Size& size) : m_size(size) { @@ -454,7 +464,8 @@ gfx::Size GLSurfaceQt::GetSize() return m_size; } -bool GLSurfaceQtEGL::Resize(const gfx::Size& size) + +bool GLSurfaceQtEGL::Resize(const gfx::Size& size, float scale_factor, bool has_alpha) { if (size == m_size) return true; diff --git a/src/core/gyp_run.pro b/src/core/gyp_run.pro index c34bc9a47..e83db387b 100644 --- a/src/core/gyp_run.pro +++ b/src/core/gyp_run.pro @@ -44,11 +44,11 @@ cross_compile { # Needed for v8, see chromium/v8/build/toolchain.gypi GYP_CONFIG += CXX=\"$$which($$QMAKE_CXX)\" } +else { + GYP_CONFIG += sysroot=\"\" +} contains(QT_ARCH, "arm") { - # Chromium will set a default sysroot on arm unless we give it one. - !cross_compile: GYP_CONFIG += sysroot=\"\" - GYP_CONFIG += target_arch=arm # Extract ARM specific compiler options that we have to pass to gyp, diff --git a/src/core/media_capture_devices_dispatcher.cpp b/src/core/media_capture_devices_dispatcher.cpp index db5caa4e1..4d1e8b200 100644 --- a/src/core/media_capture_devices_dispatcher.cpp +++ b/src/core/media_capture_devices_dispatcher.cpp @@ -101,7 +101,7 @@ scoped_ptr getDevicesForDesktopCapture(content::MediaStr media::AudioManagerBase::kLoopbackInputDeviceId, "System Audio")); } - return ui.Pass(); + return std::move(ui); } WebContentsAdapterClient::MediaRequestFlags mediaRequestFlagsForRequest(const content::MediaStreamRequest &request) @@ -161,7 +161,7 @@ void MediaCaptureDevicesDispatcher::handleMediaAccessPermissionResponse(content: (request.video_type && authorizationFlags & WebContentsAdapterClient::MediaVideoCapture); if (securityOriginsMatch && (microphoneRequested || webcamRequested)) { switch (request.request_type) { - case content::MEDIA_OPEN_DEVICE: + case content::MEDIA_OPEN_DEVICE_PEPPER_ONLY: Q_UNREACHABLE(); // only speculative as this is for Pepper getDefaultDevices("", "", microphoneRequested, webcamRequested, &devices); break; @@ -248,7 +248,7 @@ void MediaCaptureDevicesDispatcher::processDesktopCaptureAccessRequest(content:: scoped_ptr ui; if (request.video_type != content::MEDIA_DESKTOP_VIDEO_CAPTURE) { - callback.Run(devices, content::MEDIA_DEVICE_INVALID_STATE, ui.Pass()); + callback.Run(devices, content::MEDIA_DEVICE_INVALID_STATE, std::move(ui)); return; } @@ -277,7 +277,7 @@ void MediaCaptureDevicesDispatcher::processDesktopCaptureAccessRequest(content:: // Received invalid device id. if (mediaId.type == content::DesktopMediaID::TYPE_NONE) { - callback.Run(devices, content::MEDIA_DEVICE_INVALID_STATE, ui.Pass()); + callback.Run(devices, content::MEDIA_DEVICE_INVALID_STATE, std::move(ui)); return; } @@ -289,7 +289,7 @@ void MediaCaptureDevicesDispatcher::processDesktopCaptureAccessRequest(content:: devices, mediaId, capture_audio, true, getContentsUrl(webContents)); - callback.Run(devices, devices.empty() ? content::MEDIA_DEVICE_INVALID_STATE : content::MEDIA_DEVICE_OK, ui.Pass()); + callback.Run(devices, devices.empty() ? content::MEDIA_DEVICE_INVALID_STATE : content::MEDIA_DEVICE_OK, std::move(ui)); } void MediaCaptureDevicesDispatcher::processScreenCaptureAccessRequest(content::WebContents *webContents, const content::MediaStreamRequest &request @@ -339,7 +339,7 @@ void MediaCaptureDevicesDispatcher::handleScreenCaptureAccessRequest(content::We content::MediaResponseCallback callback = queue.front().callback; queue.pop_front(); - callback.Run(devices, devices.empty() ? content::MEDIA_DEVICE_INVALID_STATE : content::MEDIA_DEVICE_OK, ui.Pass()); + callback.Run(devices, devices.empty() ? content::MEDIA_DEVICE_INVALID_STATE : content::MEDIA_DEVICE_OK, std::move(ui)); } void MediaCaptureDevicesDispatcher::enqueueMediaAccessRequest(content::WebContents *webContents, const content::MediaStreamRequest &request diff --git a/src/core/network_delegate_qt.cpp b/src/core/network_delegate_qt.cpp index 427e24332..cb2a9dc58 100644 --- a/src/core/network_delegate_qt.cpp +++ b/src/core/network_delegate_qt.cpp @@ -60,7 +60,7 @@ namespace QtWebEngineCore { int pageTransitionToNavigationType(ui::PageTransition transition) { - int32 qualifier = ui::PageTransitionGetQualifier(transition); + int32_t qualifier = ui::PageTransitionGetQualifier(transition); if (qualifier & ui::PAGE_TRANSITION_FORWARD_BACK) return WebContentsAdapterClient::BackForwardNavigation; @@ -264,15 +264,11 @@ void NetworkDelegateQt::OnResponseStarted(net::URLRequest*) { } -void NetworkDelegateQt::OnNetworkBytesReceived(const net::URLRequest&, int64_t) +void NetworkDelegateQt::OnNetworkBytesReceived(net::URLRequest*, int64_t) { } -void NetworkDelegateQt::OnNetworkBytesSent(const net::URLRequest&, int64_t) -{ -} - -void NetworkDelegateQt::OnURLRequestJobOrphaned(net::URLRequest*) +void NetworkDelegateQt::OnNetworkBytesSent(net::URLRequest*, int64_t) { } @@ -304,7 +300,12 @@ bool NetworkDelegateQt::OnCanEnablePrivacyMode(const GURL&, const GURL&) const return false; } -bool NetworkDelegateQt::OnFirstPartyOnlyCookieExperimentEnabled() const +bool NetworkDelegateQt::OnAreExperimentalCookieFeaturesEnabled() const +{ + return false; +} + +bool NetworkDelegateQt::OnAreStrictSecureCookiesEnabled() const { return false; } diff --git a/src/core/network_delegate_qt.h b/src/core/network_delegate_qt.h index 4dc6ad28e..1324e0da3 100644 --- a/src/core/network_delegate_qt.h +++ b/src/core/network_delegate_qt.h @@ -84,16 +84,16 @@ public: virtual int OnHeadersReceived(net::URLRequest*, const net::CompletionCallback&, const net::HttpResponseHeaders*, scoped_refptr*, GURL*) override; virtual void OnBeforeRedirect(net::URLRequest*, const GURL&) override; virtual void OnResponseStarted(net::URLRequest*) override; - virtual void OnNetworkBytesReceived(const net::URLRequest&, int64_t) override; - virtual void OnNetworkBytesSent(const net::URLRequest&, int64_t) override; - virtual void OnURLRequestJobOrphaned(net::URLRequest*) override; + virtual void OnNetworkBytesReceived(net::URLRequest*, int64_t) override; + virtual void OnNetworkBytesSent(net::URLRequest *, int64_t) override; virtual void OnCompleted(net::URLRequest*, bool) override; virtual void OnPACScriptError(int, const base::string16&) override; virtual net::NetworkDelegate::AuthRequiredResponse OnAuthRequired(net::URLRequest*, const net::AuthChallengeInfo&, const AuthCallback&, net::AuthCredentials*) override; virtual bool OnCanGetCookies(const net::URLRequest&, const net::CookieList&) override; virtual bool OnCanAccessFile(const net::URLRequest& request, const base::FilePath& path) const override; virtual bool OnCanEnablePrivacyMode(const GURL&, const GURL&) const override; - virtual bool OnFirstPartyOnlyCookieExperimentEnabled() const override; + virtual bool OnAreExperimentalCookieFeaturesEnabled() const override; + virtual bool OnAreStrictSecureCookiesEnabled() const override; virtual bool OnCancelURLRequestWithPolicyViolatingReferrerHeader(const net::URLRequest&, const GURL&, const GURL&) const override; }; diff --git a/src/core/print_view_manager_base_qt.cpp b/src/core/print_view_manager_base_qt.cpp index ea6345f94..60f166423 100644 --- a/src/core/print_view_manager_base_qt.cpp +++ b/src/core/print_view_manager_base_qt.cpp @@ -289,7 +289,7 @@ void PrintViewManagerBaseQt::OnDidPrintPage( #else // Update the rendered document. It will send notifications to the listener. document->SetPage(params.page_number, - metafile.Pass(), + std::move(metafile), #if defined(OS_WIN) 1.0f, // shrink factor, needed on windows. #endif // defined(OS_WIN) @@ -477,7 +477,7 @@ bool PrintViewManagerBaseQt::RunInnerMessageLoop() { base::OneShotTimer quit_timer; quit_timer.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(kPrinterSettingsTimeout), - base::MessageLoop::current(), &base::MessageLoop::Quit); + base::MessageLoop::current(), &base::MessageLoop::QuitWhenIdle); m_isInsideInnerMessageLoop = true; @@ -512,7 +512,7 @@ void PrintViewManagerBaseQt::ShouldQuitFromInnerMessageLoop() m_isInsideInnerMessageLoop) { // We are in a message loop created by RenderAllMissingPagesNow. Quit from // it. - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); m_isInsideInnerMessageLoop = false; } } diff --git a/src/core/print_view_manager_qt.cpp b/src/core/print_view_manager_qt.cpp index f9b9c9f29..ab14329ac 100644 --- a/src/core/print_view_manager_qt.cpp +++ b/src/core/print_view_manager_qt.cpp @@ -61,7 +61,7 @@ static int request_id = 0; static const qreal kMicronsToMillimeter = 1000.0f; static scoped_refptr -GetDataFromHandle(base::SharedMemoryHandle handle, uint32 data_size) { +GetDataFromHandle(base::SharedMemoryHandle handle, uint32_t data_size) { scoped_ptr shared_buf( new base::SharedMemory(handle, true)); @@ -103,7 +103,7 @@ static void applyQPageLayoutSettingsToDictionary(const QPageLayout& pageLayout, scoped_ptr sizeDict(new base::DictionaryValue); sizeDict->SetInteger(printing::kSettingMediaSizeWidthMicrons, pageSizeInMilimeter.width() * kMicronsToMillimeter); sizeDict->SetInteger(printing::kSettingMediaSizeHeightMicrons, pageSizeInMilimeter.height() * kMicronsToMillimeter); - print_settings.Set(printing::kSettingMediaSize, sizeDict.Pass()); + print_settings.Set(printing::kSettingMediaSize, std::move(sizeDict)); print_settings.SetBoolean(printing::kSettingLandscape, pageLayout.orientation() == QPageLayout::Landscape); diff --git a/src/core/printing_message_filter_qt.cpp b/src/core/printing_message_filter_qt.cpp index b9955fbb4..fd6dc0fc2 100644 --- a/src/core/printing_message_filter_qt.cpp +++ b/src/core/printing_message_filter_qt.cpp @@ -217,7 +217,7 @@ void PrintingMessageFilterQt::OnUpdatePrintSettings( printer_query = queue_->CreatePrinterQuery(host_id, routing_id); } printer_query->SetSettings( - new_settings.Pass(), + std::move(new_settings), base::Bind(&PrintingMessageFilterQt::OnUpdatePrintSettingsReply, this, printer_query, reply_msg)); } @@ -251,7 +251,7 @@ void PrintingMessageFilterQt::OnUpdatePrintSettingsReply( } } -void PrintingMessageFilterQt::OnCheckForCancel(int32 preview_ui_id, +void PrintingMessageFilterQt::OnCheckForCancel(int32_t preview_ui_id, int preview_request_id, bool* cancel) { *cancel = false; diff --git a/src/core/printing_message_filter_qt.h b/src/core/printing_message_filter_qt.h index 004e5b86a..95d63f570 100644 --- a/src/core/printing_message_filter_qt.h +++ b/src/core/printing_message_filter_qt.h @@ -122,7 +122,7 @@ class PrintingMessageFilterQt : public content::BrowserMessageFilter { IPC::Message* reply_msg); // Check to see if print preview has been cancelled. - void OnCheckForCancel(int32 preview_ui_id, + void OnCheckForCancel(int32_t preview_ui_id, int preview_request_id, bool* cancel); diff --git a/src/core/process_main.cpp b/src/core/process_main.cpp index 8ffec04e4..3a3e28707 100644 --- a/src/core/process_main.cpp +++ b/src/core/process_main.cpp @@ -43,7 +43,7 @@ #include "content/public/app/content_main.h" #if defined(OS_WIN) #include "sandbox/win/src/sandbox_types.h" -#include "content/public/app/startup_helper_win.h" +#include "content/public/app/sandbox_helper_win.h" #endif // OS_WIN namespace QtWebEngine { diff --git a/src/core/proxy_config_service_qt.h b/src/core/proxy_config_service_qt.h index 8f780cfb9..da24e3337 100644 --- a/src/core/proxy_config_service_qt.h +++ b/src/core/proxy_config_service_qt.h @@ -40,7 +40,6 @@ #ifndef PROXY_CONFIG_SERVICE_QT_H #define PROXY_CONFIG_SERVICE_QT_H -#include "base/basictypes.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/observer_list.h" diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp index 01f46bdfc..eaf8485d3 100644 --- a/src/core/render_widget_host_view_qt.cpp +++ b/src/core/render_widget_host_view_qt.cpp @@ -92,7 +92,7 @@ static inline ui::LatencyInfo CreateLatencyInfo(const blink::WebInputEvent& even ui::LatencyInfo latency_info; // The latency number should only be added if the timestamp is valid. if (event.timeStampSeconds) { - const int64 time_micros = static_cast( + const int64_t time_micros = static_cast( event.timeStampSeconds * base::Time::kMicrosecondsPerSecond); latency_info.AddLatencyNumberWithTimestamp( ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, @@ -163,7 +163,7 @@ static inline bool compareTouchPoints(const QTouchEvent::TouchPoint &lhs, const return lhs.state() < rhs.state(); } -static uint32 s_eventId = 0; +static uint32_t s_eventId = 0; class MotionEventQt : public ui::MotionEvent { public: MotionEventQt(const QList &touchPoints, const base::TimeTicks &eventTime, Action action, const Qt::KeyboardModifiers modifiers, float dpiScale, int index = -1) @@ -179,7 +179,7 @@ public: Q_ASSERT((action != ACTION_DOWN && action != ACTION_UP) || index == 0); } - virtual uint32 GetUniqueEventId() const Q_DECL_OVERRIDE { return eventId; } + virtual uint32_t GetUniqueEventId() const Q_DECL_OVERRIDE { return eventId; } virtual Action GetAction() const Q_DECL_OVERRIDE { return action; } virtual int GetActionIndex() const Q_DECL_OVERRIDE { return index; } virtual size_t GetPointerCount() const Q_DECL_OVERRIDE { return touchPoints.size(); } @@ -204,6 +204,7 @@ public: } virtual int GetFlags() const Q_DECL_OVERRIDE { return flags; } virtual float GetPressure(size_t pointer_index) const Q_DECL_OVERRIDE { return touchPoints.at(pointer_index).pressure(); } + virtual float GetTilt(size_t pointer_index) const Q_DECL_OVERRIDE { return 0; } virtual base::TimeTicks GetEventTime() const Q_DECL_OVERRIDE { return eventTime; } virtual size_t GetHistorySize() const Q_DECL_OVERRIDE { return 0; } @@ -218,7 +219,7 @@ private: QList touchPoints; base::TimeTicks eventTime; Action action; - const uint32 eventId; + const uint32_t eventId; int flags; int index; float dpiScale; @@ -595,10 +596,10 @@ void RenderWidgetHostViewQt::CopyFromCompositingSurface(const gfx::Rect& src_sub callback.Run(SkBitmap(), content::READBACK_FAILED); } -void RenderWidgetHostViewQt::CopyFromCompositingSurfaceToVideoFrame(const gfx::Rect& src_subrect, const scoped_refptr& target, const base::Callback& callback) +void RenderWidgetHostViewQt::CopyFromCompositingSurfaceToVideoFrame(const gfx::Rect& src_subrect, const scoped_refptr& target, const base::Callback& callback) { NOTIMPLEMENTED(); - callback.Run(false); + callback.Run(gfx::Rect(), false); } bool RenderWidgetHostViewQt::CanCopyToVideoFrame() const @@ -611,7 +612,15 @@ bool RenderWidgetHostViewQt::HasAcceleratedSurface(const gfx::Size&) return false; } -void RenderWidgetHostViewQt::OnSwapCompositorFrame(uint32 output_surface_id, scoped_ptr frame) +void RenderWidgetHostViewQt::LockCompositingSurface() +{ +} + +void RenderWidgetHostViewQt::UnlockCompositingSurface() +{ +} + +void RenderWidgetHostViewQt::OnSwapCompositorFrame(uint32_t output_surface_id, scoped_ptr frame) { bool scrollOffsetChanged = (m_lastScrollOffset != frame->metadata.root_scroll_offset); bool contentsSizeChanged = (m_lastContentsSize != frame->metadata.root_layer_size); @@ -622,7 +631,7 @@ void RenderWidgetHostViewQt::OnSwapCompositorFrame(uint32 output_surface_id, sco m_pendingOutputSurfaceId = output_surface_id; Q_ASSERT(frame->delegated_frame_data); Q_ASSERT(!m_chromiumCompositorData->frameData || m_chromiumCompositorData->frameData->resource_list.empty()); - m_chromiumCompositorData->frameData = frame->delegated_frame_data.Pass(); + m_chromiumCompositorData->frameData = std::move(frame->delegated_frame_data); m_chromiumCompositorData->frameDevicePixelRatio = frame->metadata.device_scale_factor; // Support experimental.viewport.devicePixelRatio, see GetScreenInfo implementation below. @@ -1059,11 +1068,12 @@ void RenderWidgetHostViewQt::handleFocusEvent(QFocusEvent *ev) if (ev->gotFocus()) { m_host->GotFocus(); m_host->SetActive(true); - Q_ASSERT(m_host->IsRenderView()); + content::RenderViewHostImpl *viewHost = content::RenderViewHostImpl::From(m_host); + Q_ASSERT(viewHost); if (ev->reason() == Qt::TabFocusReason) - static_cast(m_host)->SetInitialFocus(false); + viewHost->SetInitialFocus(false); else if (ev->reason() == Qt::BacktabFocusReason) - static_cast(m_host)->SetInitialFocus(true); + viewHost->SetInitialFocus(true); ev->accept(); } else if (ev->lostFocus()) { m_host->SetActive(false); diff --git a/src/core/render_widget_host_view_qt.h b/src/core/render_widget_host_view_qt.h index a8ae91824..b59de6c2e 100644 --- a/src/core/render_widget_host_view_qt.h +++ b/src/core/render_widget_host_view_qt.h @@ -143,15 +143,18 @@ public: virtual void SetTooltipText(const base::string16 &tooltip_text) Q_DECL_OVERRIDE; virtual void SelectionBoundsChanged(const ViewHostMsg_SelectionBounds_Params&) Q_DECL_OVERRIDE; virtual void CopyFromCompositingSurface(const gfx::Rect& src_subrect, const gfx::Size& dst_size, const content::ReadbackRequestCallback& callback, const SkColorType preferred_color_type) Q_DECL_OVERRIDE; - virtual void CopyFromCompositingSurfaceToVideoFrame(const gfx::Rect& src_subrect, const scoped_refptr& target, const base::Callback& callback) Q_DECL_OVERRIDE; + virtual void CopyFromCompositingSurfaceToVideoFrame(const gfx::Rect& src_subrect, const scoped_refptr& target, const base::Callback& callback) Q_DECL_OVERRIDE; + virtual bool CanCopyToVideoFrame() const Q_DECL_OVERRIDE; virtual bool HasAcceleratedSurface(const gfx::Size&) Q_DECL_OVERRIDE; - virtual void OnSwapCompositorFrame(uint32 output_surface_id, scoped_ptr frame) Q_DECL_OVERRIDE; + virtual void OnSwapCompositorFrame(uint32_t output_surface_id, scoped_ptr frame) Q_DECL_OVERRIDE; virtual void GetScreenInfo(blink::WebScreenInfo* results) Q_DECL_OVERRIDE; virtual gfx::Rect GetBoundsInRootWindow() Q_DECL_OVERRIDE; virtual void ProcessAckedTouchEvent(const content::TouchEventWithLatencyInfo &touch, content::InputEventAckState ack_result) Q_DECL_OVERRIDE; virtual void ClearCompositorFrame() Q_DECL_OVERRIDE; virtual bool GetScreenColorProfile(std::vector*) Q_DECL_OVERRIDE; + virtual void LockCompositingSurface() Q_DECL_OVERRIDE; + virtual void UnlockCompositingSurface() Q_DECL_OVERRIDE; // Overridden from RenderWidgetHostViewBase. virtual void SelectionChanged(const base::string16 &text, size_t offset, const gfx::Range &range) Q_DECL_OVERRIDE; @@ -227,7 +230,7 @@ private: cc::ReturnedResourceArray m_resourcesToRelease; bool m_needsDelegatedFrameAck; bool m_didFirstVisuallyNonEmptyLayout; - uint32 m_pendingOutputSurfaceId; + uint32_t m_pendingOutputSurfaceId; WebContentsAdapterClient *m_adapterClient; MultipleMouseClickHelper m_clickHelper; diff --git a/src/core/renderer/content_renderer_client_qt.cpp b/src/core/renderer/content_renderer_client_qt.cpp index 04b5e2c22..4503520eb 100644 --- a/src/core/renderer/content_renderer_client_qt.cpp +++ b/src/core/renderer/content_renderer_client_qt.cpp @@ -91,7 +91,8 @@ public: { // mark qrc as a secure scheme (avoids deprecation warnings) // Can only be done after blink is initialized. - blink::WebSecurityPolicy::registerURLSchemeAsSecure(blink::WebString::fromLatin1(kQrcSchemeQt)); + blink::WebString qrcScheme(base::ASCIIToUTF16(kQrcSchemeQt)); + blink::WebSecurityPolicy::registerURLSchemeAsSecure(qrcScheme); } }; @@ -160,9 +161,8 @@ bool ContentRendererClientQt::ShouldSuppressErrorPage(content::RenderFrame *fram } // To tap into the chromium localized strings. Ripped from the chrome layer (highly simplified). -void ContentRendererClientQt::GetNavigationErrorStrings(content::RenderView* renderView, blink::WebFrame *frame, const blink::WebURLRequest &failedRequest, const blink::WebURLError &error, std::string *errorHtml, base::string16 *errorDescription) +void ContentRendererClientQt::GetNavigationErrorStrings(content::RenderFrame* renderFrame, const blink::WebURLRequest &failedRequest, const blink::WebURLError &error, std::string *errorHtml, base::string16 *errorDescription) { - Q_UNUSED(frame) const bool isPost = QByteArray::fromStdString(failedRequest.httpMethod().utf8()) == QByteArrayLiteral("POST"); if (errorHtml) { @@ -174,8 +174,8 @@ void ContentRendererClientQt::GetNavigationErrorStrings(content::RenderView* ren // TODO(elproxy): We could potentially get better diagnostics here by first calling // NetErrorHelper::GetErrorStringsForDnsProbe, but that one is harder to untangle. LocalizedError::GetStrings(error.reason, error.domain.utf8(), error.unreachableURL, isPost - , error.staleCopyInCache && !isPost, false, locale, renderView->GetAcceptLanguages() - , scoped_ptr(), &errorStrings); + , error.staleCopyInCache && !isPost, false, error_page::OfflinePageStatus::NONE, locale, renderFrame->GetRenderView()->GetAcceptLanguages() + , scoped_ptr(), &errorStrings); resourceId = IDR_NET_ERROR_HTML; @@ -187,7 +187,7 @@ void ContentRendererClientQt::GetNavigationErrorStrings(content::RenderView* ren } if (errorDescription) - *errorDescription = LocalizedError::GetErrorDetails(error, isPost); + *errorDescription = LocalizedError::GetErrorDetails(error.domain.utf8(), error.reason, isPost); } unsigned long long ContentRendererClientQt::VisitedLinkHash(const char *canonicalUrl, size_t length) diff --git a/src/core/renderer/content_renderer_client_qt.h b/src/core/renderer/content_renderer_client_qt.h index 53be90c97..ba223d878 100644 --- a/src/core/renderer/content_renderer_client_qt.h +++ b/src/core/renderer/content_renderer_client_qt.h @@ -69,7 +69,7 @@ public: virtual void RenderFrameCreated(content::RenderFrame* render_frame) Q_DECL_OVERRIDE; virtual bool ShouldSuppressErrorPage(content::RenderFrame *, const GURL &) Q_DECL_OVERRIDE; virtual bool HasErrorPage(int httpStatusCode, std::string *errorDomain) Q_DECL_OVERRIDE; - virtual void GetNavigationErrorStrings(content::RenderView* renderView, blink::WebFrame* frame, const blink::WebURLRequest& failedRequest + virtual void GetNavigationErrorStrings(content::RenderFrame* renderFrame, const blink::WebURLRequest& failedRequest , const blink::WebURLError& error, std::string* errorHtml, base::string16* errorDescription) Q_DECL_OVERRIDE; virtual unsigned long long VisitedLinkHash(const char *canonicalUrl, size_t length) Q_DECL_OVERRIDE; diff --git a/src/core/renderer/pepper/pepper_flash_browser_host_qt.h b/src/core/renderer/pepper/pepper_flash_browser_host_qt.h index d6c8e69b6..5d1107dfb 100644 --- a/src/core/renderer/pepper/pepper_flash_browser_host_qt.h +++ b/src/core/renderer/pepper/pepper_flash_browser_host_qt.h @@ -40,7 +40,6 @@ #ifndef PEPPER_FLASH_BROWSER_HOST_QT_H #define PEPPER_FLASH_BROWSER_HOST_QT_H -#include "base/basictypes.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "ppapi/host/host_message_context.h" diff --git a/src/core/renderer/pepper/pepper_flash_renderer_host_qt.h b/src/core/renderer/pepper/pepper_flash_renderer_host_qt.h index a9de3c6b8..ae6bc0876 100644 --- a/src/core/renderer/pepper/pepper_flash_renderer_host_qt.h +++ b/src/core/renderer/pepper/pepper_flash_renderer_host_qt.h @@ -43,7 +43,6 @@ #include #include -#include "base/basictypes.h" #include "base/memory/weak_ptr.h" #include "ppapi/host/host_message_context.h" #include "ppapi/host/resource_host.h" diff --git a/src/core/renderer/pepper/pepper_renderer_host_factory_qt.h b/src/core/renderer/pepper/pepper_renderer_host_factory_qt.h index 956fc81dd..bc472a7c6 100644 --- a/src/core/renderer/pepper/pepper_renderer_host_factory_qt.h +++ b/src/core/renderer/pepper/pepper_renderer_host_factory_qt.h @@ -40,8 +40,6 @@ #ifndef PEPPER_RENDERER_HOST_FACTORY_QT_H #define PEPPER_RENDERER_HOST_FACTORY_QT_H -#include "base/basictypes.h" -#include "base/compiler_specific.h" #include "ppapi/host/host_factory.h" #include "content/public/renderer/render_frame_observer.h" diff --git a/src/core/renderer/render_frame_observer_qt.h b/src/core/renderer/render_frame_observer_qt.h index a9246f817..b1d59d8c5 100644 --- a/src/core/renderer/render_frame_observer_qt.h +++ b/src/core/renderer/render_frame_observer_qt.h @@ -40,7 +40,6 @@ #ifndef RENDER_FRAME_OBSERVER_QT_H #define RENDER_FRAME_OBSERVER_QT_H -#include "base/basictypes.h" #include "base/compiler_specific.h" #include "content/public/renderer/render_frame_observer.h" diff --git a/src/core/renderer/user_resource_controller.cpp b/src/core/renderer/user_resource_controller.cpp index 0927aa53a..30a04958f 100644 --- a/src/core/renderer/user_resource_controller.cpp +++ b/src/core/renderer/user_resource_controller.cpp @@ -85,10 +85,10 @@ void UserResourceController::RenderViewObserverHelper::runScripts(UserScriptData content::RenderView *renderView = content::RenderView::FromWebView(frame->view()); const bool isMainFrame = (frame == renderView->GetWebView()->mainFrame()); - QList scriptsToRun = UserResourceController::instance()->m_viewUserScriptMap.value(globalScriptsIndex).toList(); + QList scriptsToRun = UserResourceController::instance()->m_viewUserScriptMap.value(globalScriptsIndex).toList(); scriptsToRun.append(UserResourceController::instance()->m_viewUserScriptMap.value(renderView).toList()); - Q_FOREACH (uint64 id, scriptsToRun) { + Q_FOREACH (uint64_t id, scriptsToRun) { const UserScriptData &script = UserResourceController::instance()->m_scripts.value(id); if (script.injectionPoint != p || (!script.injectForSubframes && !isMainFrame)) @@ -208,7 +208,7 @@ void UserResourceController::renderViewDestroyed(content::RenderView *renderView ViewUserScriptMap::iterator it = m_viewUserScriptMap.find(renderView); if (it == m_viewUserScriptMap.end()) // ASSERT maybe? return; - Q_FOREACH (uint64 id, it.value()) { + Q_FOREACH (uint64_t id, it.value()) { m_scripts.remove(id); } m_viewUserScriptMap.remove(renderView); @@ -239,7 +239,7 @@ void UserResourceController::clearScriptsForView(content::RenderView *view) ViewUserScriptMap::iterator it = m_viewUserScriptMap.find(view); if (it == m_viewUserScriptMap.end()) return; - Q_FOREACH (uint64 id, it.value()) + Q_FOREACH (uint64_t id, it.value()) m_scripts.remove(id); m_viewUserScriptMap.remove(view); diff --git a/src/core/renderer/user_resource_controller.h b/src/core/renderer/user_resource_controller.h index b2f7d92c3..bd3d0ba49 100644 --- a/src/core/renderer/user_resource_controller.h +++ b/src/core/renderer/user_resource_controller.h @@ -76,10 +76,10 @@ private: void onRemoveScript(const UserScriptData &); void onClearScripts(); - typedef QSet UserScriptSet; + typedef QSet UserScriptSet; typedef QHash ViewUserScriptMap; ViewUserScriptMap m_viewUserScriptMap; - QHash m_scripts; + QHash m_scripts; }; #endif // USER_RESOURCE_CONTROLLER_H diff --git a/src/core/resource_dispatcher_host_delegate_qt.cpp b/src/core/resource_dispatcher_host_delegate_qt.cpp index 907165cdd..73a640207 100644 --- a/src/core/resource_dispatcher_host_delegate_qt.cpp +++ b/src/core/resource_dispatcher_host_delegate_qt.cpp @@ -136,21 +136,21 @@ void ResourceDispatcherHostLoginDelegateQt::destroy() m_request = 0; } -static void LaunchURL(const GURL& url, int render_process_id, int render_view_id, +static void LaunchURL(const GURL& url, int render_process_id, + const content::ResourceRequestInfo::WebContentsGetter& web_contents_getter, ui::PageTransition page_transition, bool is_main_frame) { + Q_UNUSED(render_process_id); Q_ASSERT(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); - content::RenderViewHost *render_view_host = content::RenderViewHost::FromID(render_process_id, render_view_id); - if (!render_view_host) - return; - content::WebContents* webContents = content::WebContents::FromRenderViewHost(render_view_host); + content::WebContents* webContents = web_contents_getter.Run(); if (!webContents) return; WebContentsDelegateQt *contentsDelegate = static_cast(webContents->GetDelegate()); contentsDelegate->launchExternalURL(toQt(url), page_transition, is_main_frame); } -bool ResourceDispatcherHostDelegateQt::HandleExternalProtocol(const GURL& url, int child_id, int route_id, +bool ResourceDispatcherHostDelegateQt::HandleExternalProtocol(const GURL& url, int child_id, + const content::ResourceRequestInfo::WebContentsGetter& web_contents_getter, bool is_main_frame, ui::PageTransition page_transition, bool has_user_gesture) { Q_ASSERT(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); @@ -161,7 +161,7 @@ bool ResourceDispatcherHostDelegateQt::HandleExternalProtocol(const GURL& url, i content::BrowserThread::PostTask( content::BrowserThread::UI, FROM_HERE, - base::Bind(&LaunchURL, url, child_id, route_id, page_transition, is_main_frame)); + base::Bind(&LaunchURL, url, child_id, web_contents_getter, page_transition, is_main_frame)); return true; } diff --git a/src/core/resource_dispatcher_host_delegate_qt.h b/src/core/resource_dispatcher_host_delegate_qt.h index ea41a2f85..6481c6438 100644 --- a/src/core/resource_dispatcher_host_delegate_qt.h +++ b/src/core/resource_dispatcher_host_delegate_qt.h @@ -89,8 +89,10 @@ private: class ResourceDispatcherHostDelegateQt : public content::ResourceDispatcherHostDelegate { public: - virtual bool HandleExternalProtocol(const GURL& url, int child_id, int route_id, - bool is_main_frame, ui::PageTransition page_transition, bool has_user_gesture) Q_DECL_OVERRIDE; + virtual bool HandleExternalProtocol(const GURL& url,int child_id, + const content::ResourceRequestInfo::WebContentsGetter& web_contents_getter, + bool is_main_frame, ui::PageTransition page_transition, bool has_user_gesture) + Q_DECL_OVERRIDE; virtual content::ResourceDispatcherHostLoginDelegate* CreateLoginDelegate(net::AuthChallengeInfo *authInfo, net::URLRequest *request) Q_DECL_OVERRIDE; }; diff --git a/src/core/url_request_context_getter_qt.cpp b/src/core/url_request_context_getter_qt.cpp index bcbc5f4ef..ca79b55d4 100644 --- a/src/core/url_request_context_getter_qt.cpp +++ b/src/core/url_request_context_getter_qt.cpp @@ -93,7 +93,7 @@ URLRequestContextGetterQt::URLRequestContextGetterQt(BrowserContextAdapter *brow : m_ignoreCertificateErrors(false) , m_browserContext(browserContext) , m_cookieDelegate(new CookieMonsterDelegateQt()) - , m_requestInterceptors(request_interceptors.Pass()) + , m_requestInterceptors(std::move(request_interceptors)) { std::swap(m_protocolHandlers, *protocolHandlers); @@ -196,7 +196,7 @@ void URLRequestContextGetterQt::generateStorage() m_storage->set_http_server_properties(scoped_ptr(new net::HttpServerPropertiesImpl)); // Give |m_storage| ownership at the end in case it's |mapped_host_resolver|. - m_storage->set_host_resolver(host_resolver.Pass()); + m_storage->set_host_resolver(std::move(host_resolver)); generateHttpCache(); } @@ -385,17 +385,14 @@ void URLRequestContextGetterQt::generateHttpCache() } net::HttpCache *cache = 0; - net::HttpNetworkSession *network_session = 0; net::HttpNetworkSession::Params network_session_params = generateNetworkSessionParams(); - if (m_urlRequestContext->http_transaction_factory()) - network_session = m_urlRequestContext->http_transaction_factory()->GetSession(); - - if (!network_session || !doNetworkSessionParamsMatch(network_session_params, network_session->params())) { + if (!m_httpNetworkSession || !doNetworkSessionParamsMatch(network_session_params, m_httpNetworkSession->params())) { cancelAllUrlRequests(); - cache = new net::HttpCache(network_session_params, main_backend); - } else - cache = new net::HttpCache(network_session, main_backend); + m_httpNetworkSession.reset(new net::HttpNetworkSession(network_session_params)); + } + + cache = new net::HttpCache(m_httpNetworkSession.get(), scoped_ptr(main_backend), false); m_storage->set_http_transaction_factory(scoped_ptr(cache)); m_updateHttpCache = 0; @@ -446,14 +443,14 @@ void URLRequestContextGetterQt::generateJobFactory() jobFactory->SetProtocolHandler(it.key().toStdString(), scoped_ptr(new CustomProtocolHandler(it.value()))); // Set up interceptors in the reverse order. - scoped_ptr topJobFactory = jobFactory.Pass(); + scoped_ptr topJobFactory = std::move(jobFactory); for (content::URLRequestInterceptorScopedVector::reverse_iterator i = m_requestInterceptors.rbegin(); i != m_requestInterceptors.rend(); ++i) - topJobFactory.reset(new net::URLRequestInterceptingJobFactory(topJobFactory.Pass(), make_scoped_ptr(*i))); + topJobFactory.reset(new net::URLRequestInterceptingJobFactory(std::move(topJobFactory), make_scoped_ptr(*i))); m_requestInterceptors.weak_clear(); - m_jobFactory = topJobFactory.Pass(); + m_jobFactory = std::move(topJobFactory); m_urlRequestContext->set_job_factory(m_jobFactory.get()); } diff --git a/src/core/url_request_context_getter_qt.h b/src/core/url_request_context_getter_qt.h index 8d911e4d4..13d6e2f72 100644 --- a/src/core/url_request_context_getter_qt.h +++ b/src/core/url_request_context_getter_qt.h @@ -110,6 +110,7 @@ private: scoped_ptr m_dhcpProxyScriptFetcherFactory; scoped_refptr m_cookieDelegate; content::URLRequestInterceptorScopedVector m_requestInterceptors; + scoped_ptr m_httpNetworkSession; friend class NetworkDelegateQt; }; diff --git a/src/core/url_request_custom_job.cpp b/src/core/url_request_custom_job.cpp index f8a47b2b1..79a54650c 100644 --- a/src/core/url_request_custom_job.cpp +++ b/src/core/url_request_custom_job.cpp @@ -130,22 +130,21 @@ bool URLRequestCustomJob::IsRedirectResponse(GURL* location, int* http_status_co return false; } -bool URLRequestCustomJob::ReadRawData(IOBuffer *buf, int bufSize, int *bytesRead) +int URLRequestCustomJob::ReadRawData(IOBuffer *buf, int bufSize) { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); - Q_ASSERT(bytesRead); Q_ASSERT(m_shared); QMutexLocker lock(&m_shared->m_mutex); + if (m_shared->m_error) + return m_shared->m_error; qint64 rv = m_shared->m_device ? m_shared->m_device->read(buf->data(), bufSize) : -1; - if (rv >= 0) { - *bytesRead = static_cast(rv); - return true; - } else { - NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, ERR_FAILED)); - } - return false; + if (rv >= 0) + return static_cast(rv); + else + return ERR_FAILED; } + URLRequestCustomJobShared::URLRequestCustomJobShared(URLRequestCustomJob *job) : m_mutex(QMutex::Recursive) , m_job(job) @@ -261,7 +260,7 @@ void URLRequestCustomJobShared::notifyCanceled() if (!m_job) return; if (m_started) - m_job->NotifyDone(URLRequestStatus(URLRequestStatus::CANCELED, ERR_ABORTED)); + m_job->NotifyCanceled(); else m_job->NotifyStartError(URLRequestStatus(URLRequestStatus::CANCELED, ERR_ABORTED)); } @@ -296,10 +295,8 @@ void URLRequestCustomJobShared::notifyFailure() if (m_device) m_device->close(); const URLRequestStatus status(URLRequestStatus::FAILED, m_error); - const bool started = m_started; - - if (started) - m_job->NotifyDone(status); + if (m_started) + m_job->SetStatus(status); else m_job->NotifyStartError(status); } diff --git a/src/core/url_request_custom_job.h b/src/core/url_request_custom_job.h index 98e2478c4..e9f48216b 100644 --- a/src/core/url_request_custom_job.h +++ b/src/core/url_request_custom_job.h @@ -61,7 +61,7 @@ public: URLRequestCustomJob(net::URLRequest *request, net::NetworkDelegate *networkDelegate, QWebEngineUrlSchemeHandler *schemeHandler); virtual void Start() Q_DECL_OVERRIDE; virtual void Kill() Q_DECL_OVERRIDE; - virtual bool ReadRawData(net::IOBuffer *buf, int bufSize, int *bytesRead) Q_DECL_OVERRIDE; + virtual int ReadRawData(net::IOBuffer* buf, int buf_size) Q_DECL_OVERRIDE;; virtual bool GetMimeType(std::string *mimeType) const Q_DECL_OVERRIDE; virtual bool GetCharset(std::string *charset) Q_DECL_OVERRIDE; virtual bool IsRedirectResponse(GURL* location, int* http_status_code) Q_DECL_OVERRIDE; diff --git a/src/core/url_request_qrc_job_qt.cpp b/src/core/url_request_qrc_job_qt.cpp index d55b940c3..ffe9b6dc6 100644 --- a/src/core/url_request_qrc_job_qt.cpp +++ b/src/core/url_request_qrc_job_qt.cpp @@ -89,27 +89,22 @@ bool URLRequestQrcJobQt::GetMimeType(std::string *mimeType) const return false; } -bool URLRequestQrcJobQt::ReadRawData(IOBuffer *buf, int bufSize, int *bytesRead) +int URLRequestQrcJobQt::ReadRawData(IOBuffer *buf, int bufSize) { - DCHECK(bytesRead); DCHECK_GE(m_remainingBytes, 0); // File has been read finished. if (!m_remainingBytes || !bufSize) { - *bytesRead = 0; - return true; + return 0; } if (m_remainingBytes < bufSize) bufSize = static_cast(m_remainingBytes); qint64 rv = m_file.read(buf->data(), bufSize); if (rv >= 0) { - *bytesRead = static_cast(rv); m_remainingBytes -= rv; DCHECK_GE(m_remainingBytes, 0); - return true; - } else { - NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, ERR_FAILED)); + return static_cast(rv); } - return false; + return static_cast(rv); } void URLRequestQrcJobQt::startGetHead() diff --git a/src/core/url_request_qrc_job_qt.h b/src/core/url_request_qrc_job_qt.h index bda276bad..5ad115da9 100644 --- a/src/core/url_request_qrc_job_qt.h +++ b/src/core/url_request_qrc_job_qt.h @@ -55,7 +55,7 @@ public: URLRequestQrcJobQt(net::URLRequest *request, net::NetworkDelegate *networkDelegate); virtual void Start() Q_DECL_OVERRIDE; virtual void Kill() Q_DECL_OVERRIDE; - virtual bool ReadRawData(net::IOBuffer *buf, int bufSize, int *bytesRead) Q_DECL_OVERRIDE; + virtual int ReadRawData(net::IOBuffer* buf, int buf_size) Q_DECL_OVERRIDE;; virtual bool GetMimeType(std::string *mimeType) const Q_DECL_OVERRIDE; protected: diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index 2d153130f..cfd970a20 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -223,7 +223,7 @@ static void serializeNavigationHistory(const content::NavigationController &cont } } -static void deserializeNavigationHistory(QDataStream &input, int *currentIndex, ScopedVector *entries, content::BrowserContext *browserContext) +static void deserializeNavigationHistory(QDataStream &input, int *currentIndex, std::vector> *entries, content::BrowserContext *browserContext) { int version; input >> version; @@ -264,8 +264,10 @@ static void deserializeNavigationHistory(QDataStream &input, int *currentIndex, // If we couldn't unpack the entry successfully, abort everything. if (input.status() != QDataStream::Ok) { *currentIndex = -1; - for (content::NavigationEntry *entry : *entries) - delete entry; + auto it = entries->begin(); + auto end = entries->end(); + for (; it != end; ++it) + it->reset(); entries->clear(); return; } @@ -289,7 +291,7 @@ static void deserializeNavigationHistory(QDataStream &input, int *currentIndex, entry->SetIsOverridingUserAgent(isOverridingUserAgent); entry->SetTimestamp(base::Time::FromInternalValue(timestamp)); entry->SetHttpStatusCode(httpStatusCode); - entries->push_back(entry.release()); + entries->push_back(std::move(entry)); } } @@ -341,7 +343,7 @@ WebContentsAdapterPrivate::~WebContentsAdapterPrivate() QExplicitlySharedDataPointer WebContentsAdapter::createFromSerializedNavigationHistory(QDataStream &input, WebContentsAdapterClient *adapterClient) { int currentIndex; - ScopedVector entries; + std::vector> entries; deserializeNavigationHistory(input, ¤tIndex, &entries, adapterClient->browserContextAdapter()->browserContext()); if (currentIndex == -1) @@ -560,7 +562,7 @@ QString WebContentsAdapter::pageTitle() const QString WebContentsAdapter::selectedText() const { Q_D(const WebContentsAdapter); - return toQt(d->webContents->GetRenderViewHost()->GetView()->GetSelectedText()); + return toQt(d->webContents->GetRenderWidgetHostView()->GetSelectedText()); } void WebContentsAdapter::undo() @@ -823,7 +825,7 @@ void WebContentsAdapter::download(const QUrl &url, const QString &suggestedFileN scoped_ptr params( content::DownloadUrlParameters::FromWebContents(webContents(), toGurl(url))); params->set_suggested_name(toString16(suggestedFileName)); - dlm->DownloadUrl(params.Pass()); + dlm->DownloadUrl(std::move(params)); } bool WebContentsAdapter::isAudioMuted() const @@ -957,7 +959,7 @@ void WebContentsAdapter::dpiScaleChanged() Q_D(WebContentsAdapter); content::RenderWidgetHostImpl* impl = NULL; if (d->webContents->GetRenderViewHost()) - impl = content::RenderWidgetHostImpl::From(d->webContents->GetRenderViewHost()); + impl = content::RenderWidgetHostImpl::From(d->webContents->GetRenderViewHost()->GetWidget()); if (impl) impl->NotifyScreenInfoChanged(); } diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp index 011becf83..f2f8199c6 100644 --- a/src/core/web_contents_delegate_qt.cpp +++ b/src/core/web_contents_delegate_qt.cpp @@ -79,7 +79,7 @@ namespace QtWebEngineCore { // Maps the LogSeverity defines in base/logging.h to the web engines message levels. -static WebContentsAdapterClient::JavaScriptConsoleMessageLevel mapToJavascriptConsoleMessageLevel(int32 messageLevel) { +static WebContentsAdapterClient::JavaScriptConsoleMessageLevel mapToJavascriptConsoleMessageLevel(int32_t messageLevel) { if (messageLevel < 1) return WebContentsAdapterClient::Info; else if (messageLevel > 1) @@ -115,9 +115,6 @@ content::WebContents *WebContentsDelegateQt::OpenURLFromTab(content::WebContents load_url_params.is_renderer_initiated = params.is_renderer_initiated; load_url_params.override_user_agent = content::NavigationController::UA_OVERRIDE_TRUE; - if (params.transferred_global_request_id != content::GlobalRequestID()) - load_url_params.transferred_global_request_id = params.transferred_global_request_id; - target->GetController().LoadURLWithParams(load_url_params); return target; } @@ -323,7 +320,7 @@ void WebContentsDelegateQt::RunFileChooser(content::WebContents *web_contents, c m_viewClient->runFileChooser(controller); } -bool WebContentsDelegateQt::AddMessageToConsole(content::WebContents *source, int32 level, const base::string16 &message, int32 line_no, const base::string16 &source_id) +bool WebContentsDelegateQt::AddMessageToConsole(content::WebContents *source, int32_t level, const base::string16 &message, int32_t line_no, const base::string16 &source_id) { Q_UNUSED(source) m_viewClient->javaScriptConsoleMessage(mapToJavascriptConsoleMessageLevel(level), toQt(message), static_cast(line_no), toQt(source_id)); diff --git a/src/core/web_contents_delegate_qt.h b/src/core/web_contents_delegate_qt.h index cc00f1f44..12e33eb1e 100644 --- a/src/core/web_contents_delegate_qt.h +++ b/src/core/web_contents_delegate_qt.h @@ -93,7 +93,7 @@ public: virtual void ExitFullscreenModeForTab(content::WebContents*) Q_DECL_OVERRIDE; virtual bool IsFullscreenForTabOrPending(const content::WebContents* web_contents) const Q_DECL_OVERRIDE; virtual void RunFileChooser(content::WebContents *, const content::FileChooserParams ¶ms) Q_DECL_OVERRIDE; - virtual bool AddMessageToConsole(content::WebContents* source, int32 level, const base::string16& message, int32 line_no, const base::string16& source_id) Q_DECL_OVERRIDE; + virtual bool AddMessageToConsole(content::WebContents* source, int32_t level, const base::string16& message, int32_t line_no, const base::string16& source_id) Q_DECL_OVERRIDE; virtual void FindReply(content::WebContents *source, int request_id, int number_of_matches, const gfx::Rect& selection_rect, int active_match_ordinal, bool final_update) Q_DECL_OVERRIDE; virtual void RequestMediaAccessPermission(content::WebContents* web_contents, const content::MediaStreamRequest& request, const content::MediaResponseCallback& callback) Q_DECL_OVERRIDE; virtual void MoveContents(content::WebContents *source, const gfx::Rect &pos) Q_DECL_OVERRIDE; @@ -130,7 +130,7 @@ private: WebContentsAdapterClient *m_viewClient; QString m_lastSearchedString; int m_lastReceivedFindReply; - QVector m_loadingErrorFrameList; + QVector m_loadingErrorFrameList; QScopedPointer m_faviconManager; }; diff --git a/src/core/web_contents_view_qt.cpp b/src/core/web_contents_view_qt.cpp index 9614aa0f8..370f1e78f 100644 --- a/src/core/web_contents_view_qt.cpp +++ b/src/core/web_contents_view_qt.cpp @@ -96,7 +96,7 @@ void WebContentsViewQt::RenderViewCreated(content::RenderViewHost* host) // The render process is done creating the RenderView and it's ready to be routed // messages at this point. if (m_client) - host->GetView()->SetBackgroundColor(toSk(m_client->backgroundColor())); + m_webContents->GetRenderWidgetHostView()->SetBackgroundColor(toSk(m_client->backgroundColor())); } void WebContentsViewQt::CreateView(const gfx::Size& initial_size, gfx::NativeView context) diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index f4574f8b3..7cb3184b2 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -70,7 +70,7 @@ #include "ui/gl/gl_switches.h" #if defined(OS_WIN) #include "sandbox/win/src/sandbox_types.h" -#include "content/public/app/startup_helper_win.h" +#include "content/public/app/sandbox_helper_win.h" #endif // OS_WIN #include "browser_context_adapter.h" -- cgit v1.2.3