mirror of
				https://bitbucket.org/chromiumembedded/cef
				synced 2025-06-05 21:39:12 +02:00 
			
		
		
		
	alloy: Fix renderer crashes related to BadgeService (fixes issue #3005)
This commit is contained in:
		| @@ -140,6 +140,7 @@ | |||||||
| #include "storage/browser/quota/quota_settings.h" | #include "storage/browser/quota/quota_settings.h" | ||||||
| #include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h" | #include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h" | ||||||
| #include "third_party/blink/public/common/web_preferences/web_preferences.h" | #include "third_party/blink/public/common/web_preferences/web_preferences.h" | ||||||
|  | #include "third_party/blink/public/mojom/badging/badging.mojom.h" | ||||||
| #include "third_party/blink/public/mojom/prerender/prerender.mojom.h" | #include "third_party/blink/public/mojom/prerender/prerender.mojom.h" | ||||||
| #include "third_party/blink/public/web/web_window_features.h" | #include "third_party/blink/public/web/web_window_features.h" | ||||||
| #include "ui/base/l10n/l10n_util.h" | #include "ui/base/l10n/l10n_util.h" | ||||||
| @@ -377,6 +378,14 @@ void BindPluginInfoHost( | |||||||
|       std::move(receiver)); |       std::move(receiver)); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | void BindBadgeService( | ||||||
|  |     content::RenderFrameHost* frame_host, | ||||||
|  |     mojo::PendingReceiver<blink::mojom::BadgeService> receiver) {} | ||||||
|  |  | ||||||
|  | void BindBadgeServiceForServiceWorker( | ||||||
|  |     const content::ServiceWorkerVersionBaseInfo& info, | ||||||
|  |     mojo::PendingReceiver<blink::mojom::BadgeService> receiver) {} | ||||||
|  |  | ||||||
| void BindMediaFoundationRendererNotifierHandler( | void BindMediaFoundationRendererNotifierHandler( | ||||||
|     content::RenderFrameHost* frame_host, |     content::RenderFrameHost* frame_host, | ||||||
|     mojo::PendingReceiver<media::mojom::MediaFoundationRendererNotifier> |     mojo::PendingReceiver<media::mojom::MediaFoundationRendererNotifier> | ||||||
| @@ -1329,6 +1338,7 @@ void AlloyContentBrowserClient::RegisterBrowserInterfaceBindersForFrame( | |||||||
|   CefBrowserFrame::RegisterBrowserInterfaceBindersForFrame(render_frame_host, |   CefBrowserFrame::RegisterBrowserInterfaceBindersForFrame(render_frame_host, | ||||||
|                                                            map); |                                                            map); | ||||||
|  |  | ||||||
|  |   map->Add<blink::mojom::BadgeService>(base::BindRepeating(&BindBadgeService)); | ||||||
|   map->Add<media::mojom::MediaFoundationRendererNotifier>( |   map->Add<media::mojom::MediaFoundationRendererNotifier>( | ||||||
|       base::BindRepeating(&BindMediaFoundationRendererNotifierHandler)); |       base::BindRepeating(&BindMediaFoundationRendererNotifierHandler)); | ||||||
|   map->Add<network_hints::mojom::NetworkHintsHandler>( |   map->Add<network_hints::mojom::NetworkHintsHandler>( | ||||||
| @@ -1358,6 +1368,15 @@ void AlloyContentBrowserClient::RegisterBrowserInterfaceBindersForFrame( | |||||||
|                                                 extension); |                                                 extension); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | void AlloyContentBrowserClient::RegisterBrowserInterfaceBindersForServiceWorker( | ||||||
|  |     content::BrowserContext* browser_context, | ||||||
|  |     const content::ServiceWorkerVersionBaseInfo& service_worker_version_info, | ||||||
|  |     mojo::BinderMapWithContext<const content::ServiceWorkerVersionBaseInfo&>* | ||||||
|  |         map) { | ||||||
|  |   map->Add<blink::mojom::BadgeService>( | ||||||
|  |       base::BindRepeating(&BindBadgeServiceForServiceWorker)); | ||||||
|  | } | ||||||
|  |  | ||||||
| base::FilePath | base::FilePath | ||||||
| AlloyContentBrowserClient::GetSandboxedStorageServiceDataDirectory() { | AlloyContentBrowserClient::GetSandboxedStorageServiceDataDirectory() { | ||||||
|   return GetRootCachePath(); |   return GetRootCachePath(); | ||||||
|   | |||||||
| @@ -227,6 +227,11 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient { | |||||||
|   void RegisterBrowserInterfaceBindersForFrame( |   void RegisterBrowserInterfaceBindersForFrame( | ||||||
|       content::RenderFrameHost* render_frame_host, |       content::RenderFrameHost* render_frame_host, | ||||||
|       mojo::BinderMapWithContext<content::RenderFrameHost*>* map) override; |       mojo::BinderMapWithContext<content::RenderFrameHost*>* map) override; | ||||||
|  |   void RegisterBrowserInterfaceBindersForServiceWorker( | ||||||
|  |       content::BrowserContext* browser_context, | ||||||
|  |       const content::ServiceWorkerVersionBaseInfo& service_worker_version_info, | ||||||
|  |       mojo::BinderMapWithContext<const content::ServiceWorkerVersionBaseInfo&>* | ||||||
|  |           map) override; | ||||||
|   base::FilePath GetSandboxedStorageServiceDataDirectory() override; |   base::FilePath GetSandboxedStorageServiceDataDirectory() override; | ||||||
|   std::string GetProduct() override; |   std::string GetProduct() override; | ||||||
|   std::string GetChromeProduct() override; |   std::string GetChromeProduct() override; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user