refactor: move impl functions into private namespace (#43372)

This commit is contained in:
Charles Kerr 2024-08-21 15:26:06 -05:00 committed by GitHub
parent f366caac84
commit 4fbf18a021
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 40 additions and 8 deletions

View file

@ -874,6 +874,8 @@ void ElectronBrowserClient::RenderProcessExited(
}
}
namespace {
void OnOpenExternal(const GURL& escaped_url, bool allowed) {
if (allowed) {
platform_util::OpenExternal(
@ -910,6 +912,8 @@ void HandleExternalProtocolInUI(
has_user_gesture, url);
}
} // namespace
bool ElectronBrowserClient::HandleExternalProtocol(
const GURL& url,
content::WebContents::Getter web_contents_getter,
@ -1539,6 +1543,7 @@ void ElectronBrowserClient::BindHostReceiverForRenderer(
}
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
namespace {
void BindMimeHandlerService(
content::RenderFrameHost* frame_host,
mojo::PendingReceiver<extensions::mime_handler::MimeHandlerService>
@ -1567,6 +1572,7 @@ void BindBeforeUnloadControl(
return;
guest_view->FuseBeforeUnloadControl(std::move(receiver));
}
} // namespace
#endif
void ElectronBrowserClient::ExposeInterfacesToRenderer(
@ -1706,6 +1712,8 @@ content::UsbDelegate* ElectronBrowserClient::GetUsbDelegate() {
return usb_delegate_.get();
}
namespace {
void BindBadgeServiceForServiceWorker(
const content::ServiceWorkerVersionBaseInfo& info,
mojo::PendingReceiver<blink::mojom::BadgeService> receiver) {
@ -1720,6 +1728,8 @@ void BindBadgeServiceForServiceWorker(
render_process_host, info.scope, std::move(receiver));
}
} // namespace
void ElectronBrowserClient::RegisterBrowserInterfaceBindersForServiceWorker(
content::BrowserContext* browser_context,
const content::ServiceWorkerVersionBaseInfo& service_worker_version_info,