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 "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/mojom/badging/badging.mojom.h" | ||||
| #include "third_party/blink/public/mojom/prerender/prerender.mojom.h" | ||||
| #include "third_party/blink/public/web/web_window_features.h" | ||||
| #include "ui/base/l10n/l10n_util.h" | ||||
| @@ -377,6 +378,14 @@ void BindPluginInfoHost( | ||||
|       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( | ||||
|     content::RenderFrameHost* frame_host, | ||||
|     mojo::PendingReceiver<media::mojom::MediaFoundationRendererNotifier> | ||||
| @@ -1329,6 +1338,7 @@ void AlloyContentBrowserClient::RegisterBrowserInterfaceBindersForFrame( | ||||
|   CefBrowserFrame::RegisterBrowserInterfaceBindersForFrame(render_frame_host, | ||||
|                                                            map); | ||||
|  | ||||
|   map->Add<blink::mojom::BadgeService>(base::BindRepeating(&BindBadgeService)); | ||||
|   map->Add<media::mojom::MediaFoundationRendererNotifier>( | ||||
|       base::BindRepeating(&BindMediaFoundationRendererNotifierHandler)); | ||||
|   map->Add<network_hints::mojom::NetworkHintsHandler>( | ||||
| @@ -1358,6 +1368,15 @@ void AlloyContentBrowserClient::RegisterBrowserInterfaceBindersForFrame( | ||||
|                                                 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 | ||||
| AlloyContentBrowserClient::GetSandboxedStorageServiceDataDirectory() { | ||||
|   return GetRootCachePath(); | ||||
|   | ||||
| @@ -227,6 +227,11 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient { | ||||
|   void RegisterBrowserInterfaceBindersForFrame( | ||||
|       content::RenderFrameHost* render_frame_host, | ||||
|       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; | ||||
|   std::string GetProduct() override; | ||||
|   std::string GetChromeProduct() override; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user