This change meets the code coverage requirements.
| Code-Coverage | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
// exposed to chrome.debugger clients.Andy PhanHmm.. That has an effect way beyond `chrome.debugger` clients though. Can we keep this limitation specific to extensions? I imagine there may be legitimate cases other types of clients may be interested.
Alex RudenkoI'm not sure if there's a way to tell if the agent host is for the PDF extension frame and the PDF content frame at the //chrome/browser/extensions/api level. The list of agent hosts is retrieved for chrome.debugger.getTargets() here [1]. The type for those frames is "other".
We could block the PDF extension target by checking for the PDF extension URL. Maybe that works for the PDF extension frame? But the PDF content frame will have the PDF URL, e.g. https://www.pdf995.com/samples/pdf.pdf.
Maybe we can block the PDF extension frame in //chrome/browser/extensions/api using the URL check above, and block the PDF content frame in //content/browser/devtools like in patchset 6?
Andy PhanI think if it is an implementation detail (inner iframes) of the pdf viewer, it might be okay to hide it for everyone from the frame tree view/frame-level auto-attach. But I think the user-defined iframes pointing to PDF or auto-attach via the extension target should probably still work.
Alex RudenkoTo clarify, is the current approach of hiding both the inner PDF frames in content/browser/devtools/render_frame_devtools_agent_host.cc okay then?
But I think the user-defined iframes pointing to PDF or auto-attach via the extension target should probably still work.
The follow-up CL, https://crrev.com/c/5528140, fixes attaching debuggers to the PDF embedder frame. So debuggers can attach to the main frame in a full-page PDF viewer, or the <iframe> or <embed> to a PDF viewer.
Not sure if it's related, but a user can still open the context menu and inspect the frames. I believe that is desired behavior.
Andy Phanso I ran the Puppeteer tests with this CL and I am still able to attach to all frames (including inner PDF viewer extensions). There are probably multiple entrypoints to how CDP discovers agent hosts. It sounds like it would be better to filter this out in the debugger_api for extensions only like the CL description implies or make sure that it is completely hidden from all CDP clients. Probably doing it only for extensions makes sense as Andrey pointed out other clients might be eventually interested in debugging PDF viewer internals. It's probably best to add filtering here https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/extensions/api/debugger/debugger_api.cc;l=904;drc=5bf1a4a403490afa7294232e383a1750aefcc881
Andy PhanFiltering is now done in the debugger_api.cc level, although a new DevToolsAgentHost type had to be added. PTAL.
Wrapped debugger_api.cc changes in the OOPIF PDF feature flag, and added a kill switch for the DevToolsAgentHost type, since we're planning on merging to M126.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Could you please review? not sure if we need a new target type for this?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
This change meets the code coverage requirements.
| Code-Coverage | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Could you please review? not sure if we need a new target type for this?
Okay, I think patchset 12 is able to hide the PDF inner frames purely at the //chrome layer.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
LGTM overall, but curious: is this the only spot we need to hide these frames? (I guess we don't let them attach already, so maybe so?)
Also, is there desire to allow extensions to attach to the content frame (not the PDF Viewer frame) in the future?
return url.scheme() == extensions::kExtensionScheme &&nit: no need for extensions prefix
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
LGTM overall, but curious: is this the only spot we need to hide these frames? (I guess we don't let them attach already, so maybe so?)
Also, is there desire to allow extensions to attach to the content frame (not the PDF Viewer frame) in the future?
is this the only spot we need to hide these frames?
I'm unaware of any other spots. Based off the discussion in the [other comment](https://chromium-review.googlesource.com/c/chromium/src/+/5528139/comment/149355d7_a263d063/), from the CDP side, some clients may want to debug PDF internals.
I have a similar question, though, but for extensions. Outside of the APIs listed here and in https://crbug.com/333457293, are there any other extensions APIs that shouldn't see these frames?
Also, is there desire to allow extensions to attach to the content frame (not the PDF Viewer frame) in the future?
Another good question. I'll ask CSA about this.
return url.scheme() == extensions::kExtensionScheme &&nit: no need for extensions prefix
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
This change meets the code coverage requirements.
| Code-Coverage | +1 |
Andy PhanLGTM overall, but curious: is this the only spot we need to hide these frames? (I guess we don't let them attach already, so maybe so?)
Also, is there desire to allow extensions to attach to the content frame (not the PDF Viewer frame) in the future?
is this the only spot we need to hide these frames?
I'm unaware of any other spots. Based off the discussion in the [other comment](https://chromium-review.googlesource.com/c/chromium/src/+/5528139/comment/149355d7_a263d063/), from the CDP side, some clients may want to debug PDF internals.
I have a similar question, though, but for extensions. Outside of the APIs listed here and in https://crbug.com/333457293, are there any other extensions APIs that shouldn't see these frames?
Also, is there desire to allow extensions to attach to the content frame (not the PDF Viewer frame) in the future?
Another good question. I'll ask CSA about this.
Marking as resolved for submission.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
13 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: chrome/browser/extensions/api/debugger/debugger_api.cc
Insertions: 1, Deletions: 1.
The diff is too large to show. Please review the diff.
```
[OOPIF PDF] Hide PDF inner frames from chrome.debugger.getTargets()
Always hide the inner PDF extension frame and PDF content frame from
chrome.debugger.getTargets(). These frames are implementation details of
the PDF viewer, and aren't attachable anyway.
Keep the PDF embedder frame available for attachment.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Andy PhanLGTM overall, but curious: is this the only spot we need to hide these frames? (I guess we don't let them attach already, so maybe so?)
Also, is there desire to allow extensions to attach to the content frame (not the PDF Viewer frame) in the future?
Andy Phanis this the only spot we need to hide these frames?
I'm unaware of any other spots. Based off the discussion in the [other comment](https://chromium-review.googlesource.com/c/chromium/src/+/5528139/comment/149355d7_a263d063/), from the CDP side, some clients may want to debug PDF internals.
I have a similar question, though, but for extensions. Outside of the APIs listed here and in https://crbug.com/333457293, are there any other extensions APIs that shouldn't see these frames?
Also, is there desire to allow extensions to attach to the content frame (not the PDF Viewer frame) in the future?
Another good question. I'll ask CSA about this.
Marking as resolved for submission.
Re-opening as a TODO.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Andy PhanLGTM overall, but curious: is this the only spot we need to hide these frames? (I guess we don't let them attach already, so maybe so?)
Also, is there desire to allow extensions to attach to the content frame (not the PDF Viewer frame) in the future?
Andy Phanis this the only spot we need to hide these frames?
I'm unaware of any other spots. Based off the discussion in the [other comment](https://chromium-review.googlesource.com/c/chromium/src/+/5528139/comment/149355d7_a263d063/), from the CDP side, some clients may want to debug PDF internals.
I have a similar question, though, but for extensions. Outside of the APIs listed here and in https://crbug.com/333457293, are there any other extensions APIs that shouldn't see these frames?
Also, is there desire to allow extensions to attach to the content frame (not the PDF Viewer frame) in the future?
Another good question. I'll ask CSA about this.
Andy PhanMarking as resolved for submission.
Re-opening as a TODO.
Resolving very old TODOs: there hasn't been any desire to allow extensions to attach to the content frame.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |