### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.

### Electron Version

18.0.0

### What operating system are you using?

macOS

### Operating System Version

MacOS 12.3

### What arch are you using?

x64

### Last Known Working Electron version

_No response_

### Expected Behavior

PDF File should be displayed just like when opening the page in Chrome browser.

### Actual Behavior

The PDF file isn't displayed in the Embed.
Screenshot:
![Bildschirmfoto 2022-03-30 um 16 04 47](https://user-images.githubusercontent.com/40733092/160853634-a903d3b1-c11d-4b93-84ae-64af05e17ec9.png)
=> Error loading PDF document. 

### Testcase Gist URL

_No response_

### Additional Information

I use this html for displaying it:
`<embed type="application/pdf" src="https://....." style="width: 100%; height: 30rem;">`
The document URL in here is a Blob URL with a PDF fetched from an internal API.

The window is loaded using this code:
```
const { app, BrowserWindow } = require('electron')
const createWindow = () => {
    const win = new BrowserWindow({
        width: 1400,
        height: 800,
        webPreferences: {
            plugins: true
        }
    })

    win.loadURL("https://127.0.0.1:8000/app")
}

app.whenReady().then(() => {
    createWindow()
})
```
shell/browser/extensions/api/tabs/tabs_api.cc
mojom::HostID(mojom::HostID::HostType::kExtensions, extension()->id()));
  return set_init_result(SUCCESS);
}
bool ExecuteCodeInTabFunction::CanExecuteScriptOnPage(std::string* error) {
  
  
  CHECK_GE(execute_tab_id_, 0);
  auto* contents = electron::api::WebContents::FromID(execute_tab_id_);
  if (!contents) {
    return false;
  }
  int frame_id = details_->frame_id ? *details_->frame_id
                                    : ExtensionApiFrameIdMap::kTopFrameId;
  content::RenderFrameHost* rfh =
      ExtensionApiFrameIdMap::GetRenderFrameHostById(contents->web_contents(),
                                                     frame_id);
  if (!rfh) {
    *error = ErrorUtils::FormatErrorMessage(
        kFrameNotFoundError, base::NumberToString(frame_id),
        base::NumberToString(execute_tab_id_));
    return false;
  }
  
  
  
  GURL effective_document_url(rfh->GetLastCommittedURL());
  bool is_about_url = effective_document_url.SchemeIs(url::kAboutScheme);
  if (is_about_url && details_->match_about_blank &&
      *details_->match_about_blank) {
    effective_document_url = GURL(rfh->GetLastCommittedOrigin().Serialize());