[OOPIF PDF] Hide PDF inner frames from chrome.debugger.getTargets() [chromium/src : main]

0 views
Skip to first unread message

findit-for-me@appspot.gserviceaccount.com (Gerrit)

unread,
May 15, 2024, 7:19:16 PM5/15/24
to Andy Phan, Tricium, Andrey Kosyakov, Alex Rudenko, Devlin Cronin, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, blundell+...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
Attention needed from Alex Rudenko and Andrey Kosyakov

findit...@appspot.gserviceaccount.com voted Code-Coverage+1

This change meets the code coverage requirements.

Code-Coverage+1
Open in Gerrit

Related details

Attention is currently required from:
  • Alex Rudenko
  • Andrey Kosyakov
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I298cfb9709529f6839750587eed8ce5d4769ee2f
Gerrit-Change-Number: 5528139
Gerrit-PatchSet: 11
Gerrit-Owner: Andy Phan <andy...@chromium.org>
Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-CC: Andrey Kosyakov <ca...@chromium.org>
Gerrit-Attention: Alex Rudenko <alexr...@chromium.org>
Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
Gerrit-Comment-Date: Wed, 15 May 2024 23:19:04 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Andy Phan (Gerrit)

unread,
May 15, 2024, 7:27:27 PM5/15/24
to findit...@appspot.gserviceaccount.com, Tricium, Andrey Kosyakov, Alex Rudenko, Devlin Cronin, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, blundell+...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
Attention needed from Alex Rudenko and Andrey Kosyakov

Andy Phan voted and added 1 comment

Votes added by Andy Phan

Commit-Queue+1

1 comment

File content/browser/devtools/render_frame_devtools_agent_host.cc
Line 232, Patchset 6: // exposed to chrome.debugger clients.
Andrey Kosyakov . resolved

Hmm.. 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.

Andy Phan

I'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?

[1] https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/extensions/api/debugger/debugger_api.cc;l=897;drc=6960db710082373e96cdabbda4b20b6e6f344d2e;bpv=0;bpt=0

Alex Rudenko

I 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.

Andy Phan

To 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.

Alex Rudenko

so 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 Phan

Filtering is now done in the debugger_api.cc level, although a new DevToolsAgentHost type had to be added. PTAL.

Andy Phan

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.

Open in Gerrit

Related details

Attention is currently required from:
  • Alex Rudenko
  • Andrey Kosyakov
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I298cfb9709529f6839750587eed8ce5d4769ee2f
Gerrit-Change-Number: 5528139
Gerrit-PatchSet: 12
Gerrit-Owner: Andy Phan <andy...@chromium.org>
Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-CC: Andrey Kosyakov <ca...@chromium.org>
Gerrit-Attention: Alex Rudenko <alexr...@chromium.org>
Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
Gerrit-Comment-Date: Wed, 15 May 2024 23:27:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Alex Rudenko <alexr...@chromium.org>
Comment-In-Reply-To: Andrey Kosyakov <ca...@chromium.org>
Comment-In-Reply-To: Andy Phan <andy...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Alex Rudenko (Gerrit)

unread,
May 16, 2024, 5:37:31 AM5/16/24
to Andy Phan, Andrey Kosyakov, findit...@appspot.gserviceaccount.com, Tricium, Devlin Cronin, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, blundell+...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
Attention needed from Andrey Kosyakov and Andy Phan

Alex Rudenko added 1 comment

Patchset-level comments
File-level comment, Patchset 12 (Latest):
Alex Rudenko . unresolved

Could you please review? not sure if we need a new target type for this?

Open in Gerrit

Related details

Attention is currently required from:
  • Andrey Kosyakov
  • Andy Phan
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I298cfb9709529f6839750587eed8ce5d4769ee2f
    Gerrit-Change-Number: 5528139
    Gerrit-PatchSet: 12
    Gerrit-Owner: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: Andy Phan <andy...@chromium.org>
    Gerrit-Comment-Date: Thu, 16 May 2024 09:37:22 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    findit-for-me@appspot.gserviceaccount.com (Gerrit)

    unread,
    May 16, 2024, 2:01:17 PM5/16/24
    to Andy Phan, Andrey Kosyakov, Tricium, Alex Rudenko, Devlin Cronin, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, blundell+...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
    Attention needed from Andrey Kosyakov

    This change meets the code coverage requirements.

    Code-Coverage+1

    Related details

    Attention is currently required from:
    • Andrey Kosyakov
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I298cfb9709529f6839750587eed8ce5d4769ee2f
    Gerrit-Change-Number: 5528139
    Gerrit-PatchSet: 13
    Gerrit-Owner: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Comment-Date: Thu, 16 May 2024 18:01:06 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andy Phan (Gerrit)

    unread,
    May 16, 2024, 2:05:16 PM5/16/24
    to Andrey Kosyakov, Alex Rudenko, findit...@appspot.gserviceaccount.com, Tricium, Devlin Cronin, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, blundell+...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
    Attention needed from Alex Rudenko, Andrey Kosyakov and Devlin Cronin

    Andy Phan added 1 comment

    Patchset-level comments
    File-level comment, Patchset 12:
    Alex Rudenko . resolved

    Could you please review? not sure if we need a new target type for this?

    Andy Phan

    Okay, I think patchset 12 is able to hide the PDF inner frames purely at the //chrome layer.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Rudenko
    • Andrey Kosyakov
    • Devlin Cronin
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I298cfb9709529f6839750587eed8ce5d4769ee2f
    Gerrit-Change-Number: 5528139
    Gerrit-PatchSet: 13
    Gerrit-Owner: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
    Gerrit-CC: Alex Rudenko <alexr...@chromium.org>
    Gerrit-CC: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: Devlin Cronin <rdevlin...@chromium.org>
    Gerrit-Comment-Date: Thu, 16 May 2024 18:05:07 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Alex Rudenko <alexr...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Devlin Cronin (Gerrit)

    unread,
    May 16, 2024, 7:04:35 PM5/16/24
    to Andy Phan, Devlin Cronin, Andrey Kosyakov, Alex Rudenko, findit...@appspot.gserviceaccount.com, Tricium, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, blundell+...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
    Attention needed from Alex Rudenko, Andrey Kosyakov and Andy Phan

    Devlin Cronin voted and added 2 comments

    Votes added by Devlin Cronin

    Code-Review+1

    2 comments

    Patchset-level comments
    File-level comment, Patchset 13 (Latest):
    Devlin Cronin . unresolved

    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?

    File chrome/browser/extensions/api/debugger/debugger_api.cc
    Line 117, Patchset 13 (Latest): return url.scheme() == extensions::kExtensionScheme &&
    Devlin Cronin . unresolved

    nit: no need for extensions prefix

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Rudenko
    • Andrey Kosyakov
    • Andy Phan
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I298cfb9709529f6839750587eed8ce5d4769ee2f
    Gerrit-Change-Number: 5528139
    Gerrit-PatchSet: 13
    Gerrit-Owner: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
    Gerrit-CC: Alex Rudenko <alexr...@chromium.org>
    Gerrit-CC: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: Andy Phan <andy...@chromium.org>
    Gerrit-Comment-Date: Thu, 16 May 2024 23:04:23 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andy Phan (Gerrit)

    unread,
    May 16, 2024, 7:41:39 PM5/16/24
    to Devlin Cronin, Andrey Kosyakov, Alex Rudenko, findit...@appspot.gserviceaccount.com, Tricium, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, blundell+...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
    Attention needed from Alex Rudenko, Andrey Kosyakov and Devlin Cronin

    Andy Phan added 2 comments

    Patchset-level comments
    Devlin Cronin . unresolved

    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?

    Andy Phan

    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.

    File chrome/browser/extensions/api/debugger/debugger_api.cc
    Line 117, Patchset 13: return url.scheme() == extensions::kExtensionScheme &&
    Devlin Cronin . resolved

    nit: no need for extensions prefix

    Andy Phan

    Removed.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Rudenko
    • Andrey Kosyakov
    • Devlin Cronin
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I298cfb9709529f6839750587eed8ce5d4769ee2f
    Gerrit-Change-Number: 5528139
    Gerrit-PatchSet: 14
    Gerrit-Owner: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
    Gerrit-CC: Alex Rudenko <alexr...@chromium.org>
    Gerrit-CC: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: Devlin Cronin <rdevlin...@chromium.org>
    Gerrit-Comment-Date: Thu, 16 May 2024 23:41:27 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Devlin Cronin <rdevlin...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    findit-for-me@appspot.gserviceaccount.com (Gerrit)

    unread,
    May 16, 2024, 7:59:27 PM5/16/24
    to Andy Phan, Devlin Cronin, Andrey Kosyakov, Alex Rudenko, Tricium, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, blundell+...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
    Attention needed from Alex Rudenko, Andrey Kosyakov and Devlin Cronin

    This change meets the code coverage requirements.

    Code-Coverage+1
    Gerrit-Comment-Date: Thu, 16 May 2024 23:59:14 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andy Phan (Gerrit)

    unread,
    May 16, 2024, 9:13:31 PM5/16/24
    to Devlin Cronin, Andrey Kosyakov, Alex Rudenko, findit...@appspot.gserviceaccount.com, Tricium, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, blundell+...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
    Attention needed from Alex Rudenko, Andrey Kosyakov and Devlin Cronin

    Andy Phan added 1 comment

    Patchset-level comments
    File-level comment, Patchset 13:
    Devlin Cronin . resolved

    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?

    Andy Phan

    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.

    Andy Phan

    Marking as resolved for submission.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Rudenko
    • Andrey Kosyakov
    • Devlin Cronin
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Review
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I298cfb9709529f6839750587eed8ce5d4769ee2f
    Gerrit-Change-Number: 5528139
    Gerrit-PatchSet: 14
    Gerrit-Owner: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
    Gerrit-CC: Alex Rudenko <alexr...@chromium.org>
    Gerrit-CC: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Attention: Devlin Cronin <rdevlin...@chromium.org>
    Gerrit-Comment-Date: Fri, 17 May 2024 01:13:19 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Andy Phan <andy...@chromium.org>
    Comment-In-Reply-To: Devlin Cronin <rdevlin...@chromium.org>
    satisfied_requirement
    open
    diffy

    Andy Phan (Gerrit)

    unread,
    May 16, 2024, 9:13:36 PM5/16/24
    to Devlin Cronin, Andrey Kosyakov, Alex Rudenko, findit...@appspot.gserviceaccount.com, Tricium, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, blundell+...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
    Attention needed from Alex Rudenko, Andrey Kosyakov and Devlin Cronin

    Andy Phan voted Commit-Queue+2

    Commit-Queue+2
    Gerrit-Comment-Date: Fri, 17 May 2024 01:13:25 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    May 16, 2024, 9:16:25 PM5/16/24
    to Andy Phan, Devlin Cronin, Andrey Kosyakov, Alex Rudenko, findit...@appspot.gserviceaccount.com, Tricium, chromium...@chromium.org, devtools...@chromium.org, blundell+...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org

    Chromium LUCI CQ submitted the change with unreviewed changes

    Unreviewed changes

    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.
    ```

    Change information

    Commit message:
    [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.
    Bug: 333457293
    Change-Id: I298cfb9709529f6839750587eed8ce5d4769ee2f
    Reviewed-by: Devlin Cronin <rdevlin...@chromium.org>
    Commit-Queue: Andy Phan <andy...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1302357}
    Files:
    • M chrome/browser/extensions/api/debugger/debugger_api.cc
    • M chrome/browser/extensions/api/debugger/debugger_apitest.cc
    Change size: M
    Delta: 2 files changed, 91 insertions(+), 8 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I298cfb9709529f6839750587eed8ce5d4769ee2f
    Gerrit-Change-Number: 5528139
    Gerrit-PatchSet: 15
    Gerrit-Owner: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
    Gerrit-CC: Alex Rudenko <alexr...@chromium.org>
    Gerrit-CC: Andrey Kosyakov <ca...@chromium.org>
    open
    diffy
    satisfied_requirement

    Andy Phan (Gerrit)

    unread,
    May 16, 2024, 9:17:37 PM5/16/24
    to Chromium LUCI CQ, Devlin Cronin, Andrey Kosyakov, Alex Rudenko, findit...@appspot.gserviceaccount.com, Tricium, chromium...@chromium.org, devtools...@chromium.org, blundell+...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org

    Andy Phan added 1 comment

    Patchset-level comments
    File-level comment, Patchset 13:
    Devlin Cronin . unresolved

    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?

    Andy Phan

    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.

    Andy Phan

    Marking as resolved for submission.

    Andy Phan

    Re-opening as a TODO.

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Review
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I298cfb9709529f6839750587eed8ce5d4769ee2f
    Gerrit-Change-Number: 5528139
    Gerrit-PatchSet: 15
    Gerrit-Owner: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
    Gerrit-CC: Alex Rudenko <alexr...@chromium.org>
    Gerrit-CC: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Comment-Date: Fri, 17 May 2024 01:17:26 +0000
    satisfied_requirement
    open
    diffy

    Andy Phan (Gerrit)

    unread,
    1:13 PM (4 hours ago) 1:13 PM
    to Chromium LUCI CQ, Devlin Cronin, Andrey Kosyakov, Alex Rudenko, findit...@appspot.gserviceaccount.com, chromium...@chromium.org, devtools...@chromium.org, blundell+...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org

    Andy Phan added 1 comment

    Patchset-level comments
    File-level comment, Patchset 13:
    Devlin Cronin . resolved

    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?

    Andy Phan

    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.

    Andy Phan

    Marking as resolved for submission.

    Andy Phan

    Re-opening as a TODO.

    Andy Phan

    Resolving very old TODOs: there hasn't been any desire to allow extensions to attach to the content frame.

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I298cfb9709529f6839750587eed8ce5d4769ee2f
    Gerrit-Change-Number: 5528139
    Gerrit-PatchSet: 15
    Gerrit-Owner: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
    Gerrit-CC: Alex Rudenko <alexr...@chromium.org>
    Gerrit-CC: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-CC: Name of user not set #1242319
    Gerrit-Comment-Date: Mon, 01 Jun 2026 17:13:17 +0000
    satisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages