mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: bind fake mojo service for badging (#25369)
* fix: bind fake mojo service for badging * Add a test Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
@@ -96,6 +96,7 @@
|
||||
#include "shell/common/options_switches.h"
|
||||
#include "shell/common/platform_util.h"
|
||||
#include "third_party/blink/public/common/loader/url_loader_throttle.h"
|
||||
#include "third_party/blink/public/mojom/badging/badging.mojom.h"
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
#include "ui/native_theme/native_theme.h"
|
||||
#include "v8/include/v8.h"
|
||||
@@ -1583,6 +1584,12 @@ void ElectronBrowserClient::BindHostReceiverForRenderer(
|
||||
#endif
|
||||
}
|
||||
|
||||
void BindBadgeManagerFrameReceiver(
|
||||
content::RenderFrameHost* frame,
|
||||
mojo::PendingReceiver<blink::mojom::BadgeService> receiver) {
|
||||
LOG(WARNING) << "The Chromium Badging API is not available in Electron";
|
||||
}
|
||||
|
||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
void BindMimeHandlerService(
|
||||
content::RenderFrameHost* frame_host,
|
||||
@@ -1619,6 +1626,8 @@ void ElectronBrowserClient::RegisterBrowserInterfaceBindersForFrame(
|
||||
mojo::BinderMapWithContext<content::RenderFrameHost*>* map) {
|
||||
map->Add<network_hints::mojom::NetworkHintsHandler>(
|
||||
base::BindRepeating(&BindNetworkHintsHandler));
|
||||
map->Add<blink::mojom::BadgeService>(
|
||||
base::BindRepeating(&BindBadgeManagerFrameReceiver));
|
||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
map->Add<extensions::mime_handler::MimeHandlerService>(
|
||||
base::BindRepeating(&BindMimeHandlerService));
|
||||
|
||||
Reference in New Issue
Block a user