diff options
Diffstat (limited to 'src/core/content_browser_client_qt.h')
-rw-r--r-- | src/core/content_browser_client_qt.h | 96 |
1 files changed, 39 insertions, 57 deletions
diff --git a/src/core/content_browser_client_qt.h b/src/core/content_browser_client_qt.h index 1784d720d..7d8e98028 100644 --- a/src/core/content_browser_client_qt.h +++ b/src/core/content_browser_client_qt.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtWebEngine module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef CONTENT_BROWSER_CLIENT_QT_H #define CONTENT_BROWSER_CLIENT_QT_H @@ -64,25 +28,18 @@ namespace device { class GeolocationManager; } // namespace device -namespace gl { -class GLShareGroup; -} - namespace QtWebEngineCore { class BrowserMainPartsQt; -class ShareGroupQt; class ContentBrowserClientQt : public content::ContentBrowserClient { public: ContentBrowserClientQt(); ~ContentBrowserClientQt(); - std::unique_ptr<content::BrowserMainParts> CreateBrowserMainParts(content::MainFunctionParams) override; + std::unique_ptr<content::BrowserMainParts> CreateBrowserMainParts(bool is_integration_test) override; void RenderProcessWillLaunch(content::RenderProcessHost *host) override; - gl::GLShareGroup* GetInProcessGpuShareGroup() override; content::MediaObserver* GetMediaObserver() override; - scoped_refptr<content::QuotaPermissionContext> CreateQuotaPermissionContext() override; void OverrideWebkitPrefs(content::WebContents *web_contents, blink::web_pref::WebPreferences *prefs) override; void AllowCertificateError(content::WebContents *web_contents, @@ -92,7 +49,8 @@ public: bool is_main_frame_request, bool strict_enforcement, base::OnceCallback<void(content::CertificateRequestResultType)> callback) override; - base::OnceClosure SelectClientCertificate(content::WebContents* web_contents, + base::OnceClosure SelectClientCertificate(content::BrowserContext* browser_context, + content::WebContents* web_contents, net::SSLCertRequestInfo* cert_request_info, net::ClientCertIdentityList client_certs, std::unique_ptr<content::ClientCertificateDelegate> delegate) override; @@ -116,9 +74,8 @@ public: void ExposeInterfacesToRenderer(service_manager::BinderRegistry *registry, blink::AssociatedInterfaceRegistry *associated_registry, content::RenderProcessHost *render_process_host) override; - bool BindAssociatedReceiverFromFrame(content::RenderFrameHost *render_frame_host, - const std::string &interface_name, - mojo::ScopedInterfaceEndpointHandle *handle) override; + void RegisterAssociatedInterfaceBindersForRenderFrameHost(content::RenderFrameHost &render_frame_host, + blink::AssociatedInterfaceRegistry &associated_registry) override; bool CanCreateWindow(content::RenderFrameHost *opener, const GURL &opener_url, @@ -144,6 +101,14 @@ public: int process_id, int routing_id, mojo::PendingReceiver<network::mojom::RestrictedCookieManager> *receiver) override; + bool WillInterceptWebSocket(content::RenderFrameHost *frame) override; + void CreateWebSocket( + content::RenderFrameHost *frame, + WebSocketFactory factory, + const GURL &url, + const net::SiteForCookies &site_for_cookies, + const absl::optional<std::string> &user_agent, + mojo::PendingRemote<network::mojom::WebSocketHandshakeClient> handshake_client) override; content::AllowServiceWorkerResult AllowServiceWorker( const GURL &scope, @@ -198,14 +163,15 @@ public: bool HandleExternalProtocol( const GURL &url, base::RepeatingCallback<content::WebContents*()> web_contents_getter, - int child_id, int frame_tree_node_id, content::NavigationUIData *navigation_data, - bool is_main_frame, + bool is_primary_main_frame, + bool is_in_fenced_frame_tree, network::mojom::WebSandboxFlags sandbox_flags, ui::PageTransition page_transition, bool has_user_gesture, const absl::optional<url::Origin> &initiating_origin, + content::RenderFrameHost *initiator_document, mojo::PendingRemote<network::mojom::URLLoaderFactory> *out_factory) override; std::vector<std::unique_ptr<blink::URLLoaderThrottle>> CreateURLLoaderThrottles( @@ -220,7 +186,11 @@ public: bool HasErrorPage(int http_status_code, content::WebContents *contents) override; bool HasCustomSchemeHandler(content::BrowserContext *browser_context, const std::string &scheme) override; - + std::vector<std::unique_ptr<content::URLLoaderRequestInterceptor>> + WillCreateURLLoaderRequestInterceptors(content::NavigationUIData *navigation_ui_data, + int frame_tree_node_id, + int64_t navigation_id, + scoped_refptr<base::SequencedTaskRunner> navigation_response_task_runner) override; bool WillCreateURLLoaderFactory(content::BrowserContext *browser_context, content::RenderFrameHost *frame, int render_process_id, @@ -232,7 +202,8 @@ public: mojo::PendingRemote<network::mojom::TrustedURLLoaderHeaderClient> *header_client, bool *bypass_redirect_checks, bool *disable_secure_dns, - network::mojom::URLLoaderFactoryOverridePtr *factory_override) override; + network::mojom::URLLoaderFactoryOverridePtr *factory_override, + scoped_refptr<base::SequencedTaskRunner> navigation_response_task_runner) override; scoped_refptr<network::SharedURLLoaderFactory> GetSystemSharedURLLoaderFactory() override; network::mojom::NetworkContext *GetSystemNetworkContext() override; void OnNetworkServiceCreated(network::mojom::NetworkService *network_service) override; @@ -247,24 +218,35 @@ public: ukm::SourceIdObj ukm_source_id, NonNetworkURLLoaderFactoryMap *factories) override; void RegisterNonNetworkSubresourceURLLoaderFactories(int render_process_id, int render_frame_id, + const absl::optional<url::Origin>& request_initiator_origin, NonNetworkURLLoaderFactoryMap *factories) override; void RegisterNonNetworkWorkerMainResourceURLLoaderFactories(content::BrowserContext* browser_context, NonNetworkURLLoaderFactoryMap* factories) override; void RegisterNonNetworkServiceWorkerUpdateURLLoaderFactories(content::BrowserContext* browser_context, NonNetworkURLLoaderFactoryMap* factories) override; void SiteInstanceGotProcess(content::SiteInstance *site_instance) override; - void SiteInstanceDeleting(content::SiteInstance *site_instance) override; base::flat_set<std::string> GetPluginMimeTypesWithExternalHandlers(content::BrowserContext *browser_context) override; - content::WebContentsViewDelegate* GetWebContentsViewDelegate(content::WebContents* web_contents) override; + std::unique_ptr<content::WebContentsViewDelegate> GetWebContentsViewDelegate(content::WebContents *web_contents) override; static std::string getUserAgent(); std::string GetUserAgent() override { return getUserAgent(); } + blink::UserAgentMetadata GetUserAgentMetadata() override; std::string GetProduct() override; + content::WebAuthenticationDelegate *GetWebAuthenticationDelegate() override; +#if !BUILDFLAG(IS_ANDROID) + std::unique_ptr<content::AuthenticatorRequestClientDelegate> + GetWebAuthenticationRequestDelegate(content::RenderFrameHost *render_frame_host) override; +#endif + + void GetMediaDeviceIDSalt(content::RenderFrameHost *rfh, + const net::SiteForCookies &site_for_cookies, + const blink::StorageKey &storage_key, + base::OnceCallback<void(bool, const std::string&)> callback) override; + private: - scoped_refptr<ShareGroupQt> m_shareGroupQt; BrowserMainPartsQt *m_browserMainParts = nullptr; }; |