See https://github.com/electron/electron/blob/54ad38526095f4a415ad75a1757feae4336c9db4/atom/browser/atom_permission_manager.cc#L213 and https://github.com/electron/electron/blob/54ad38526095f4a415ad75a1757feae4336c9db4/atom/browser/atom_permission_manager.cc#L246

Should probably call out to https://github.com/electron/electron/blob/54ad38526095f4a415ad75a1757feae4336c9db4/atom/browser/atom_permission_manager.cc#L231 and be documented as such
shell/browser/electron_permission_manager.cc
int subscription_id) {}
bool ElectronPermissionManager::CheckPermissionWithDetails(
    content::PermissionType permission,
    content::RenderFrameHost* render_frame_host,
    const GURL& requesting_origin,
    const base::DictionaryValue* details) const {
  if (check_handler_.is_null()) {
    return true;
  }
  auto* web_contents =
      content::WebContents::FromRenderFrameHost(render_frame_host);
  auto mutable_details =
      details == nullptr ? base::DictionaryValue() : details->Clone();
  mutable_details.SetStringKey("requestingUrl",
                               render_frame_host->GetLastCommittedURL().spec());
  mutable_details.SetBoolKey("isMainFrame",
                             render_frame_host->GetParent() == nullptr);
  return check_handler_.Run(web_contents, permission, requesting_origin,
                            mutable_details);
}
blink::mojom::PermissionStatus
ElectronPermissionManager::GetPermissionStatusForFrame(
    content::PermissionType permission,
    content::RenderFrameHost* render_frame_host,
    const GURL& requesting_origin) {
  return blink::mojom::PermissionStatus::GRANTED;
}
}