Fix <webview> media permission requests with PEPC [chromium/src : main]

0 views
Skip to first unread message

Giovanni Pezzino (Gerrit)

unread,
May 28, 2026, 10:04:06 AM (4 days ago) May 28
to Kevin McNee, Devlin Cronin, chromeos-commercial-readability-c-reviewers+reviews, Simon Hangl, Ravjit Uppal, Thomas Nguyen, Balazs Engedy, Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Permissions Reviews, Rijubrata Bhaumik, James Maclean, chfreme...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
Attention needed from Devlin Cronin, Kevin McNee, Ravjit Uppal and Simon Hangl

Giovanni Pezzino voted and added 7 comments

Votes added by Giovanni Pezzino

Auto-Submit+1
Commit-Queue+1

7 comments

File chrome/browser/guest_view/web_view/chrome_web_view_permission_helper_delegate.cc
File chrome/browser/media/webrtc/media_stream_device_permission_context.cc
Line 25, Patchset 5:#if BUILDFLAG(ENABLE_EXTENSIONS)
Kevin McNee . resolved

Style nit: ifdef'd includes should be in their own section.

Giovanni Pezzino

Done

Line 322, Patchset 5: Profile* profile = Profile::FromBrowserContext(browser_context());
Kevin McNee . resolved

nit: The getters that use this don't need the downcast.

Giovanni Pezzino

Done

Line 335, Patchset 5: if (extensions::IsExtensionWithPermissionOrSuggestInConsole(
Kevin McNee . resolved

Only platform apps can use audioCapture/videoCapture [1], so we should probably only make the suggestion for those.

[1] extensions/common/api/_permission_features.json

Giovanni Pezzino

Done

File chrome/test/data/extensions/web_view/media_access/allow_pepc/manifest.json
Line 10, Patchset 5: "app": {
"background": {
"scripts": ["test.js"]
}
}
Devlin Cronin . unresolved

as you're very familiar, apps are deprecated on non-chromeos : ) But it seems like this is a feature that should apply to webviews broadly on other operating systems. Since this is a new test, would it make sense to write it with a webview embedded by e.g. webui so it can run everywhere?

Kevin McNee

Since this CL is also covering controlled frame, I'd recommend adding a test for that case.

While having the test run for other platforms under webui would be nice, it looks like this CL also needs to test the audioCapture for the app, so a webui test would be in addition to this one. Plus we don't have an existing test fixture for webui webview tests AFAIK, so I wouldn't block you on it.

Kevin McNee

Oh sorry, we do have some webui tests: chrome/test/data/webui/webview/webui_webview_browsertest.cc

Giovanni Pezzino

I have added a new test with the hosting page using a controlled frame (see controlled_frame_permission_request_browsertest.cc). AFAIUI, the new test will run on all platforms.

Does it satisfy your concerns?

File extensions/browser/guest_view/web_view/web_view_permission_helper.h
Line 98, Patchset 5: const GURL& requesting_frame,
Kevin McNee . resolved

nit: The caller is providing what appears to be the GURL representation of an origin, so consider naming this something like requesting_frame_origin.

Giovanni Pezzino

Done

Line 96, Patchset 5: // Requests Media Permission from the embedder (for PEPC).
Kevin McNee . resolved

nit: Write out what this is (not just the acronym).

Giovanni Pezzino

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Devlin Cronin
  • Kevin McNee
  • Ravjit Uppal
  • Simon Hangl
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
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: I365a0f2a01ecceaff35a11a50fb390bbf82ff862
Gerrit-Change-Number: 7868189
Gerrit-PatchSet: 10
Gerrit-Owner: Giovanni Pezzino <gio...@google.com>
Gerrit-Reviewer: Balazs Engedy <eng...@chromium.org>
Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-Reviewer: Giovanni Pezzino <gio...@google.com>
Gerrit-Reviewer: Kevin McNee <mc...@chromium.org>
Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
Gerrit-Reviewer: Simon Hangl <sim...@google.com>
Gerrit-CC: Andrew Rayskiy <green...@google.com>
Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
Gerrit-CC: James Maclean <wjma...@chromium.org>
Gerrit-CC: Permissions Reviews <permissio...@chromium.org>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: Thomas Nguyen <tun...@chromium.org>
Gerrit-CC: chromeos-commercial-readability-c-reviewers+reviews <chromeos-commercial-reada...@google.com>
Gerrit-CC: gwsq
Gerrit-Attention: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-Attention: Kevin McNee <mc...@chromium.org>
Gerrit-Attention: Ravjit Uppal <rav...@chromium.org>
Gerrit-Attention: Simon Hangl <sim...@google.com>
Gerrit-Comment-Date: Thu, 28 May 2026 14:03:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Devlin Cronin <rdevlin...@chromium.org>
Comment-In-Reply-To: Kevin McNee <mc...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Kevin McNee (Gerrit)

unread,
May 28, 2026, 6:34:37 PM (4 days ago) May 28
to Giovanni Pezzino, Devlin Cronin, chromeos-commercial-readability-c-reviewers+reviews, Simon Hangl, Ravjit Uppal, Thomas Nguyen, Balazs Engedy, Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Permissions Reviews, Rijubrata Bhaumik, James Maclean, chfreme...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
Attention needed from Devlin Cronin, Giovanni Pezzino, Ravjit Uppal and Simon Hangl

Kevin McNee voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Devlin Cronin
  • Giovanni Pezzino
  • Ravjit Uppal
  • Simon Hangl
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Gerrit-Attention: Ravjit Uppal <rav...@chromium.org>
    Gerrit-Attention: Simon Hangl <sim...@google.com>
    Gerrit-Attention: Giovanni Pezzino <gio...@google.com>
    Gerrit-Comment-Date: Thu, 28 May 2026 22:34:23 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Devlin Cronin (Gerrit)

    unread,
    May 28, 2026, 7:36:14 PM (4 days ago) May 28
    to Giovanni Pezzino, Kevin McNee, Devlin Cronin, chromeos-commercial-readability-c-reviewers+reviews, Simon Hangl, Ravjit Uppal, Thomas Nguyen, Balazs Engedy, Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Permissions Reviews, Rijubrata Bhaumik, James Maclean, chfreme...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
    Attention needed from Giovanni Pezzino, Ravjit Uppal and Simon Hangl

    Devlin Cronin added 14 comments

    Patchset-level comments
    File-level comment, Patchset 10 (Latest):
    Devlin Cronin . resolved

    Thanks, Gio!

    Commit Message
    Line 19, Patchset 10 (Latest):2. Auto-approving the request on the embedder App side if it has the
    Devlin Cronin . unresolved

    Just sanity checking: has this gone through security review? Are there any cases in which the embedding app would *not* want to auto-grant the site permission, just because the app had permission?

    File chrome/browser/controlled_frame/controlled_frame_permission_request_browsertest.cc
    Line 541, Patchset 10 (Latest): const stream = await navigator.mediaDevices.getUserMedia({video: true});
    Devlin Cronin . unresolved

    nit: wrap at 80 char; here and below

    Line 548, Patchset 10 (Latest): await new Promise((resolve) => setTimeout(resolve, 100));
    Devlin Cronin . unresolved

    why do we do this? (Add a comment)

    File chrome/browser/guest_view/web_view/chrome_web_view_permission_helper_delegate.cc
    Line 320, Patchset 10 (Latest): : network::mojom::PermissionsPolicyFeature::kCamera;
    Devlin Cronin . unresolved

    if this ever gets called for a new type, this will miscategorize the request as one for kCamera.

    Can we add a CHECK() to ensure the type is one of these two?

    Line 355, Patchset 10 (Latest): blink::PermissionType permission_type =
    Devlin Cronin . unresolved

    ditto

    File chrome/browser/media/webrtc/media_stream_device_permission_context.cc
    Line 309, Patchset 10 (Latest):#if BUILDFLAG(ENABLE_EXTENSIONS)
    Devlin Cronin . unresolved

    generally, these should either be ENABLE_EXTENSIONS_CORE or something more specific. Does that work here?

    Line 326, Patchset 10 (Latest): if (extension_registry) {
    Devlin Cronin . unresolved

    ExtensionRegistry should never be null while there are active renderers for a BrowserContext

    File chrome/browser/media/webrtc/media_stream_device_permission_context_unittest.cc
    Line 236, Patchset 10 (Latest):#if BUILDFLAG(ENABLE_EXTENSIONS)
    Devlin Cronin . unresolved

    ditto re ENABLE_EXTENSIONS

    Line 239, Patchset 10 (Latest): extensions::ExtensionBuilder("Test App", extensions::ExtensionBuilder::Type::PLATFORM_APP)
    Devlin Cronin . unresolved

    git cl format

    File chrome/test/data/extensions/web_view/media_access/allow_pepc/embedder.js
    Line 35, Patchset 10 (Latest): JSON.stringify(['check-media-permission', '' + testName]), '*');
    Devlin Cronin . unresolved

    in lots of places here, please prefer template literals to avoid string concatenation.

    File chrome/test/data/extensions/web_view/media_access/allow_pepc/manifest.json
    Line 10, Patchset 5: "app": {
    "background": {
    "scripts": ["test.js"]
    }
    }
    Devlin Cronin . unresolved

    as you're very familiar, apps are deprecated on non-chromeos : ) But it seems like this is a feature that should apply to webviews broadly on other operating systems. Since this is a new test, would it make sense to write it with a webview embedded by e.g. webui so it can run everywhere?

    Kevin McNee

    Since this CL is also covering controlled frame, I'd recommend adding a test for that case.

    While having the test run for other platforms under webui would be nice, it looks like this CL also needs to test the audioCapture for the app, so a webui test would be in addition to this one. Plus we don't have an existing test fixture for webui webview tests AFAIK, so I wouldn't block you on it.

    Kevin McNee

    Oh sorry, we do have some webui tests: chrome/test/data/webui/webview/webui_webview_browsertest.cc

    Giovanni Pezzino

    I have added a new test with the hosting page using a controlled frame (see controlled_frame_permission_request_browsertest.cc). AFAIUI, the new test will run on all platforms.

    Does it satisfy your concerns?

    Devlin Cronin

    I'd still prefer a webui one, since controlled frame is kinda-sorta chromeos only (even though it's compiled on all platforms). But I'll leave it up to you and Kevin (I'm not an owner of webview)

    File extensions/browser/guest_view/web_view/web_view_permission_helper.h
    Line 96, Patchset 10 (Latest): // Requests Media Permission from the embedder (for Page Embedded Permission Control).
    Devlin Cronin . unresolved

    wrap at 80 char

    File extensions/browser/guest_view/web_view/web_view_permission_helper_delegate.h
    Line 62, Patchset 10 (Latest): // Requests Media Permission from the embedder (for Page Embedded Permission Control).
    Devlin Cronin . unresolved

    wrap at 80 char

    Open in Gerrit

    Related details

    Attention is currently required from:
    Gerrit-Attention: Ravjit Uppal <rav...@chromium.org>
    Gerrit-Attention: Simon Hangl <sim...@google.com>
    Gerrit-Attention: Giovanni Pezzino <gio...@google.com>
    Gerrit-Comment-Date: Thu, 28 May 2026 23:35:30 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Devlin Cronin <rdevlin...@chromium.org>
    Comment-In-Reply-To: Kevin McNee <mc...@chromium.org>
    Comment-In-Reply-To: Giovanni Pezzino <gio...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Giovanni Pezzino (Gerrit)

    unread,
    May 29, 2026, 6:30:17 AM (3 days ago) May 29
    to Kevin McNee, Devlin Cronin, chromeos-commercial-readability-c-reviewers+reviews, Simon Hangl, Ravjit Uppal, Thomas Nguyen, Balazs Engedy, Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Permissions Reviews, Rijubrata Bhaumik, James Maclean, chfreme...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
    Attention needed from Devlin Cronin, Ravjit Uppal and Simon Hangl

    Giovanni Pezzino voted and added 12 comments

    Votes added by Giovanni Pezzino

    Auto-Submit+1
    Commit-Queue+0

    12 comments

    Commit Message
    Line 19, Patchset 10:2. Auto-approving the request on the embedder App side if it has the
    Devlin Cronin . resolved

    Just sanity checking: has this gone through security review? Are there any cases in which the embedding app would *not* want to auto-grant the site permission, just because the app had permission?

    Giovanni Pezzino

    The implementation is not actually auto-approving the request: it is merely forwarding the request to the embedding page/app using a JS permissionrequest event, and the embedding page/app handles the event with any logic the developers deems appropriate.

    If the event handler approves the request, then DevicePermission in media_stream_device_permission_context.cc checks if the top-level app has the permission in the manifest.

    The description is indeed misleading, so I have updated it.

    File chrome/browser/controlled_frame/controlled_frame_permission_request_browsertest.cc
    Line 541, Patchset 10: const stream = await navigator.mediaDevices.getUserMedia({video: true});
    Devlin Cronin . resolved

    nit: wrap at 80 char; here and below

    Giovanni Pezzino

    Done

    Line 548, Patchset 10: await new Promise((resolve) => setTimeout(resolve, 100));
    Devlin Cronin . resolved

    why do we do this? (Add a comment)

    Giovanni Pezzino

    Done

    File chrome/browser/guest_view/web_view/chrome_web_view_permission_helper_delegate.cc
    Line 320, Patchset 10: : network::mojom::PermissionsPolicyFeature::kCamera;
    Devlin Cronin . resolved

    if this ever gets called for a new type, this will miscategorize the request as one for kCamera.

    Can we add a CHECK() to ensure the type is one of these two?

    Giovanni Pezzino

    Done

    Line 355, Patchset 10: blink::PermissionType permission_type =
    Devlin Cronin . resolved

    ditto

    Giovanni Pezzino

    Done

    File chrome/browser/media/webrtc/media_stream_device_permission_context.cc
    Line 309, Patchset 10:#if BUILDFLAG(ENABLE_EXTENSIONS)
    Devlin Cronin . resolved

    generally, these should either be ENABLE_EXTENSIONS_CORE or something more specific. Does that work here?

    Giovanni Pezzino

    ENABLE_EXTENSION_CORE is defined as `enable_extensions || enable_desktop_android_extensions`, so it will work on all desktop platforms.

    Line 326, Patchset 10: if (extension_registry) {
    Devlin Cronin . resolved

    ExtensionRegistry should never be null while there are active renderers for a BrowserContext

    Giovanni Pezzino

    Done

    File chrome/browser/media/webrtc/media_stream_device_permission_context_unittest.cc
    Line 236, Patchset 10:#if BUILDFLAG(ENABLE_EXTENSIONS)
    Devlin Cronin . resolved

    ditto re ENABLE_EXTENSIONS

    Giovanni Pezzino

    Done

    Line 239, Patchset 10: extensions::ExtensionBuilder("Test App", extensions::ExtensionBuilder::Type::PLATFORM_APP)
    Devlin Cronin . resolved

    git cl format

    Giovanni Pezzino

    Done

    File chrome/test/data/extensions/web_view/media_access/allow_pepc/embedder.js
    Line 35, Patchset 10: JSON.stringify(['check-media-permission', '' + testName]), '*');
    Devlin Cronin . resolved

    in lots of places here, please prefer template literals to avoid string concatenation.

    Giovanni Pezzino

    Done

    File extensions/browser/guest_view/web_view/web_view_permission_helper.h
    Line 96, Patchset 10: // Requests Media Permission from the embedder (for Page Embedded Permission Control).
    Devlin Cronin . resolved

    wrap at 80 char

    Giovanni Pezzino

    Done

    File extensions/browser/guest_view/web_view/web_view_permission_helper_delegate.h
    Line 62, Patchset 10: // Requests Media Permission from the embedder (for Page Embedded Permission Control).
    Devlin Cronin . resolved

    wrap at 80 char

    Giovanni Pezzino

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Devlin Cronin
    • Ravjit Uppal
    • Simon Hangl
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    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: I365a0f2a01ecceaff35a11a50fb390bbf82ff862
    Gerrit-Change-Number: 7868189
    Gerrit-PatchSet: 14
    Gerrit-Owner: Giovanni Pezzino <gio...@google.com>
    Gerrit-Reviewer: Balazs Engedy <eng...@chromium.org>
    Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
    Gerrit-Reviewer: Giovanni Pezzino <gio...@google.com>
    Gerrit-Reviewer: Kevin McNee <mc...@chromium.org>
    Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
    Gerrit-Reviewer: Simon Hangl <sim...@google.com>
    Gerrit-CC: Andrew Rayskiy <green...@google.com>
    Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
    Gerrit-CC: James Maclean <wjma...@chromium.org>
    Gerrit-CC: Permissions Reviews <permissio...@chromium.org>
    Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
    Gerrit-CC: Thomas Nguyen <tun...@chromium.org>
    Gerrit-CC: chromeos-commercial-readability-c-reviewers+reviews <chromeos-commercial-reada...@google.com>
    Gerrit-CC: gwsq
    Gerrit-Attention: Devlin Cronin <rdevlin...@chromium.org>
    Gerrit-Attention: Ravjit Uppal <rav...@chromium.org>
    Gerrit-Attention: Simon Hangl <sim...@google.com>
    Gerrit-Comment-Date: Fri, 29 May 2026 10:29:57 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Simon Hangl (Gerrit)

    unread,
    May 29, 2026, 6:57:53 AM (3 days ago) May 29
    to Giovanni Pezzino, Kevin McNee, Devlin Cronin, chromeos-commercial-readability-c-reviewers+reviews, Ravjit Uppal, Thomas Nguyen, Balazs Engedy, Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Permissions Reviews, Rijubrata Bhaumik, James Maclean, chfreme...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
    Attention needed from Devlin Cronin, Giovanni Pezzino and Ravjit Uppal

    Simon Hangl voted and added 3 comments

    Votes added by Simon Hangl

    Code-Review+1

    3 comments

    Patchset-level comments
    File chrome/browser/guest_view/web_view/chrome_web_view_permission_helper_delegate.cc
    Line 319, Patchset 14 (Latest): network::mojom::PermissionsPolicyFeature feature =
    Simon Hangl . unresolved

    nit: `const` or inline

    Line 359, Patchset 14 (Latest): blink::PermissionType permission_type =
    Simon Hangl . unresolved

    nit: `const` or inline

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Devlin Cronin
    • Giovanni Pezzino
    • Ravjit Uppal
    Gerrit-Attention: Giovanni Pezzino <gio...@google.com>
    Gerrit-Comment-Date: Fri, 29 May 2026 10:57:34 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Ravjit Uppal (Gerrit)

    unread,
    May 29, 2026, 7:39:33 AM (3 days ago) May 29
    to Giovanni Pezzino, Simon Hangl, Kevin McNee, Devlin Cronin, chromeos-commercial-readability-c-reviewers+reviews, Thomas Nguyen, Balazs Engedy, Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Permissions Reviews, Rijubrata Bhaumik, James Maclean, chfreme...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
    Attention needed from Devlin Cronin, Giovanni Pezzino and Ravjit Uppal

    Ravjit Uppal voted

    Code-Review+1
    Commit-Queue+2
    Gerrit-Comment-Date: Fri, 29 May 2026 11:39:11 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Giovanni Pezzino (Gerrit)

    unread,
    May 29, 2026, 7:39:45 AM (3 days ago) May 29
    to Ravjit Uppal, Simon Hangl, Kevin McNee, Devlin Cronin, chromeos-commercial-readability-c-reviewers+reviews, Thomas Nguyen, Balazs Engedy, Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Permissions Reviews, Rijubrata Bhaumik, James Maclean, chfreme...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
    Attention needed from Devlin Cronin and Ravjit Uppal

    Giovanni Pezzino voted and added 2 comments

    Votes added by Giovanni Pezzino

    Auto-Submit+1
    Commit-Queue+1

    2 comments

    File chrome/browser/guest_view/web_view/chrome_web_view_permission_helper_delegate.cc
    Line 319, Patchset 14: network::mojom::PermissionsPolicyFeature feature =
    Simon Hangl . resolved

    nit: `const` or inline

    Giovanni Pezzino

    Done

    Line 359, Patchset 14: blink::PermissionType permission_type =
    Simon Hangl . resolved

    nit: `const` or inline

    Giovanni Pezzino

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Devlin Cronin
    • Ravjit Uppal
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    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: I365a0f2a01ecceaff35a11a50fb390bbf82ff862
    Gerrit-Change-Number: 7868189
    Gerrit-PatchSet: 15
    Gerrit-Owner: Giovanni Pezzino <gio...@google.com>
    Gerrit-Reviewer: Balazs Engedy <eng...@chromium.org>
    Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
    Gerrit-Reviewer: Giovanni Pezzino <gio...@google.com>
    Gerrit-Reviewer: Kevin McNee <mc...@chromium.org>
    Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
    Gerrit-Reviewer: Simon Hangl <sim...@google.com>
    Gerrit-CC: Andrew Rayskiy <green...@google.com>
    Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
    Gerrit-CC: James Maclean <wjma...@chromium.org>
    Gerrit-CC: Permissions Reviews <permissio...@chromium.org>
    Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
    Gerrit-CC: Thomas Nguyen <tun...@chromium.org>
    Gerrit-CC: chromeos-commercial-readability-c-reviewers+reviews <chromeos-commercial-reada...@google.com>
    Gerrit-CC: gwsq
    Gerrit-Attention: Devlin Cronin <rdevlin...@chromium.org>
    Gerrit-Attention: Ravjit Uppal <rav...@chromium.org>
    Gerrit-Comment-Date: Fri, 29 May 2026 11:39:26 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Simon Hangl <sim...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Giovanni Pezzino (Gerrit)

    unread,
    May 29, 2026, 8:25:13 AM (3 days ago) May 29
    to Ravjit Uppal, Simon Hangl, Kevin McNee, Devlin Cronin, chromeos-commercial-readability-c-reviewers+reviews, Thomas Nguyen, Balazs Engedy, Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Permissions Reviews, Rijubrata Bhaumik, James Maclean, chfreme...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
    Attention needed from Devlin Cronin, Kevin McNee, Ravjit Uppal and Simon Hangl

    Giovanni Pezzino voted and added 1 comment

    Votes added by Giovanni Pezzino

    Auto-Submit+1

    1 comment

    File chrome/test/data/extensions/web_view/media_access/allow_pepc/manifest.json
    Line 10, Patchset 5: "app": {
    "background": {
    "scripts": ["test.js"]
    }
    }
    Devlin Cronin . resolved

    as you're very familiar, apps are deprecated on non-chromeos : ) But it seems like this is a feature that should apply to webviews broadly on other operating systems. Since this is a new test, would it make sense to write it with a webview embedded by e.g. webui so it can run everywhere?

    Kevin McNee

    Since this CL is also covering controlled frame, I'd recommend adding a test for that case.

    While having the test run for other platforms under webui would be nice, it looks like this CL also needs to test the audioCapture for the app, so a webui test would be in addition to this one. Plus we don't have an existing test fixture for webui webview tests AFAIK, so I wouldn't block you on it.

    Kevin McNee

    Oh sorry, we do have some webui tests: chrome/test/data/webui/webview/webui_webview_browsertest.cc

    Giovanni Pezzino

    I have added a new test with the hosting page using a controlled frame (see controlled_frame_permission_request_browsertest.cc). AFAIUI, the new test will run on all platforms.

    Does it satisfy your concerns?

    Devlin Cronin

    I'd still prefer a webui one, since controlled frame is kinda-sorta chromeos only (even though it's compiled on all platforms). But I'll leave it up to you and Kevin (I'm not an owner of webview)

    Giovanni Pezzino

    I ended up adding the webui test: easier done than discussing it further 😜

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Devlin Cronin
    • Kevin McNee
    • Ravjit Uppal
    • Simon Hangl
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedReview-Enforcement
        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: I365a0f2a01ecceaff35a11a50fb390bbf82ff862
        Gerrit-Change-Number: 7868189
        Gerrit-PatchSet: 16
        Gerrit-Owner: Giovanni Pezzino <gio...@google.com>
        Gerrit-Reviewer: Balazs Engedy <eng...@chromium.org>
        Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
        Gerrit-Reviewer: Giovanni Pezzino <gio...@google.com>
        Gerrit-Reviewer: Kevin McNee <mc...@chromium.org>
        Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
        Gerrit-Reviewer: Simon Hangl <sim...@google.com>
        Gerrit-CC: Andrew Rayskiy <green...@google.com>
        Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
        Gerrit-CC: James Maclean <wjma...@chromium.org>
        Gerrit-CC: Permissions Reviews <permissio...@chromium.org>
        Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
        Gerrit-CC: Thomas Nguyen <tun...@chromium.org>
        Gerrit-CC: chromeos-commercial-readability-c-reviewers+reviews <chromeos-commercial-reada...@google.com>
        Gerrit-CC: gwsq
        Gerrit-Attention: Devlin Cronin <rdevlin...@chromium.org>
        Gerrit-Attention: Kevin McNee <mc...@chromium.org>
        Gerrit-Attention: Ravjit Uppal <rav...@chromium.org>
        Gerrit-Attention: Simon Hangl <sim...@google.com>
        Gerrit-Comment-Date: Fri, 29 May 2026 12:24:54 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Giovanni Pezzino (Gerrit)

        unread,
        May 29, 2026, 8:30:00 AM (3 days ago) May 29
        to Ravjit Uppal, Simon Hangl, Kevin McNee, Devlin Cronin, chromeos-commercial-readability-c-reviewers+reviews, Thomas Nguyen, Balazs Engedy, Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Permissions Reviews, Rijubrata Bhaumik, James Maclean, chfreme...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
        Attention needed from Devlin Cronin, Kevin McNee, Ravjit Uppal and Simon Hangl

        Giovanni Pezzino voted and added 1 comment

        Votes added by Giovanni Pezzino

        Commit-Queue+0

        1 comment

        File chrome/test/data/webui/webview/webui_webview_browsertest.cc
        Line 339, Patchset 16 (Latest): GTEST_SKIP() << "Glic media tests are disabled on ChromeOS.";
        Giovanni Pezzino . unresolved

        I went with GTEST_SKIP instead of the DISABLED_ prefix because the WebUI presubmit check failed.

        Please, let me know if you have any questions.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Devlin Cronin
        • Kevin McNee
        • Ravjit Uppal
        • Simon Hangl
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          Gerrit-Comment-Date: Fri, 29 May 2026 12:29:42 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Kevin McNee (Gerrit)

          unread,
          May 29, 2026, 12:00:03 PM (3 days ago) May 29
          to Giovanni Pezzino, Ravjit Uppal, Simon Hangl, Devlin Cronin, chromeos-commercial-readability-c-reviewers+reviews, Thomas Nguyen, Balazs Engedy, Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Permissions Reviews, Rijubrata Bhaumik, James Maclean, chfreme...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
          Attention needed from Devlin Cronin, Giovanni Pezzino, Ravjit Uppal and Simon Hangl

          Kevin McNee voted and added 2 comments

          Votes added by Kevin McNee

          Code-Review+1

          2 comments

          Patchset-level comments
          File-level comment, Patchset 18 (Latest):
          Kevin McNee . resolved

          Still LGTM

          File chrome/test/data/webview/mediarequest_pepc.html
          Line 44, Patchset 18 (Latest): // unrendered elements are ignored by Blink's security engine.
          Kevin McNee . unresolved

          nit: I wonder if we can do something that doesn't rely on picking timeout values. Would something like double requestAnimationFrame work here? Ditto for the timeouts in the other tests.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Devlin Cronin
          • Giovanni Pezzino
          • Ravjit Uppal
          • Simon Hangl
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • requirement satisfiedReview-Enforcement
            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: I365a0f2a01ecceaff35a11a50fb390bbf82ff862
            Gerrit-Change-Number: 7868189
            Gerrit-PatchSet: 18
            Gerrit-Owner: Giovanni Pezzino <gio...@google.com>
            Gerrit-Reviewer: Balazs Engedy <eng...@chromium.org>
            Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
            Gerrit-Reviewer: Giovanni Pezzino <gio...@google.com>
            Gerrit-Reviewer: Kevin McNee <mc...@chromium.org>
            Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
            Gerrit-Reviewer: Simon Hangl <sim...@google.com>
            Gerrit-CC: Andrew Rayskiy <green...@google.com>
            Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
            Gerrit-CC: James Maclean <wjma...@chromium.org>
            Gerrit-CC: Permissions Reviews <permissio...@chromium.org>
            Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
            Gerrit-CC: Thomas Nguyen <tun...@chromium.org>
            Gerrit-CC: chromeos-commercial-readability-c-reviewers+reviews <chromeos-commercial-reada...@google.com>
            Gerrit-CC: gwsq
            Gerrit-Attention: Devlin Cronin <rdevlin...@chromium.org>
            Gerrit-Attention: Ravjit Uppal <rav...@chromium.org>
            Gerrit-Attention: Simon Hangl <sim...@google.com>
            Gerrit-Attention: Giovanni Pezzino <gio...@google.com>
            Gerrit-Comment-Date: Fri, 29 May 2026 15:59:48 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            gwsq (Gerrit)

            unread,
            May 30, 2026, 11:01:49 AM (2 days ago) May 30
            to Giovanni Pezzino, Andrew Rayskiy, Kevin McNee, Ravjit Uppal, Simon Hangl, Devlin Cronin, chromeos-commercial-readability-c-reviewers+reviews, Thomas Nguyen, Balazs Engedy, Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Permissions Reviews, Rijubrata Bhaumik, James Maclean, chfreme...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
            Attention needed from Andrew Rayskiy, Devlin Cronin, Giovanni Pezzino, Ravjit Uppal and Simon Hangl

            Message from gwsq

            From chrome/enterprise/gwsq/commercial-readability-review.gwsq:
            A C++ readability reviewer was assigned to this CL. (http://go/cros-readability)

            For the author: Feel free to remove the reviewer.

            For the reviewer:
            Please wait until normal review is finished and then follow http://go/cros-readability-guidelines.
            Fill out http://go/cros-readability-poll?entry.704301348=giovax&entry.1703826705=7868189 after you finished reviewing.

            Reviewer source(s):
            greengrape is from group(chromeos-commercial-r...@google.com)

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Andrew Rayskiy
            • Devlin Cronin
            • Giovanni Pezzino
            • Ravjit Uppal
            • Simon Hangl
            Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • requirement satisfiedReview-Enforcement
            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: I365a0f2a01ecceaff35a11a50fb390bbf82ff862
            Gerrit-Change-Number: 7868189
            Gerrit-PatchSet: 18
            Gerrit-Owner: Giovanni Pezzino <gio...@google.com>
            Gerrit-Reviewer: Andrew Rayskiy <green...@google.com>
            Gerrit-Reviewer: Balazs Engedy <eng...@chromium.org>
            Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
            Gerrit-Reviewer: Giovanni Pezzino <gio...@google.com>
            Gerrit-Reviewer: Kevin McNee <mc...@chromium.org>
            Gerrit-Reviewer: Ravjit Uppal <rav...@chromium.org>
            Gerrit-Reviewer: Simon Hangl <sim...@google.com>
            Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
            Gerrit-CC: James Maclean <wjma...@chromium.org>
            Gerrit-CC: Permissions Reviews <permissio...@chromium.org>
            Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
            Gerrit-CC: Thomas Nguyen <tun...@chromium.org>
            Gerrit-CC: chromeos-commercial-readability-c-reviewers+reviews <chromeos-commercial-reada...@google.com>
            Gerrit-CC: gwsq
            Gerrit-Attention: Devlin Cronin <rdevlin...@chromium.org>
            Gerrit-Attention: Ravjit Uppal <rav...@chromium.org>
            Gerrit-Attention: Simon Hangl <sim...@google.com>
            Gerrit-Attention: Andrew Rayskiy <green...@google.com>
            Gerrit-Attention: Giovanni Pezzino <gio...@google.com>
            Gerrit-Comment-Date: Sat, 30 May 2026 15:01:10 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: No
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            gwsq (Gerrit)

            unread,
            May 30, 2026, 1:47:02 PM (2 days ago) May 30
            to Giovanni Pezzino, Andrew Rayskiy, Kevin McNee, Ravjit Uppal, Simon Hangl, Devlin Cronin, chromeos-commercial-readability-c-reviewers+reviews, Thomas Nguyen, Balazs Engedy, Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Permissions Reviews, Rijubrata Bhaumik, James Maclean, chfreme...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
            Gerrit-Comment-Date: Sat, 30 May 2026 17:46:46 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: No
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Ravjit Uppal (Gerrit)

            unread,
            8:18 AM (9 hours ago) 8:18 AM
            to Giovanni Pezzino, Andrew Rayskiy, Kevin McNee, Simon Hangl, Devlin Cronin, chromeos-commercial-readability-c-reviewers+reviews, Thomas Nguyen, Balazs Engedy, Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Permissions Reviews, Rijubrata Bhaumik, James Maclean, chfreme...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
            Attention needed from Andrew Rayskiy, Devlin Cronin, Giovanni Pezzino and Simon Hangl

            Ravjit Uppal voted Code-Review+1

            Code-Review+1
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Andrew Rayskiy
            • Devlin Cronin
            • Giovanni Pezzino
            • Simon Hangl
            Gerrit-Attention: Simon Hangl <sim...@google.com>
            Gerrit-Attention: Andrew Rayskiy <green...@google.com>
            Gerrit-Attention: Giovanni Pezzino <gio...@google.com>
            Gerrit-Comment-Date: Mon, 01 Jun 2026 12:17:57 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Thomas Nguyen (Gerrit)

            unread,
            10:10 AM (7 hours ago) 10:10 AM
            to Giovanni Pezzino, Ravjit Uppal, Andrew Rayskiy, Kevin McNee, Simon Hangl, Devlin Cronin, chromeos-commercial-readability-c-reviewers+reviews, Balazs Engedy, Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Permissions Reviews, Rijubrata Bhaumik, James Maclean, chfreme...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
            Attention needed from Andrew Rayskiy, Devlin Cronin, Giovanni Pezzino and Simon Hangl

            Thomas Nguyen added 1 comment

            Patchset-level comments
            Thomas Nguyen . resolved

            Drive by comment. The routing logic makes sense to me. However, we are seeing that PEPC is actually disabled under <webview>.

            If it's disabled, does this code path get hit in production right now, or is this laying the plumbing for an upcoming CL that will enable PEPC for guests? Or anything I might be misunderstanding between the guest_view/web_view and <webview>?

            Gerrit-Comment-Date: Mon, 01 Jun 2026 14:09:46 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Thomas Nguyen (Gerrit)

            unread,
            10:10 AM (7 hours ago) 10:10 AM
            to Giovanni Pezzino, Ravjit Uppal, Andrew Rayskiy, Kevin McNee, Simon Hangl, Devlin Cronin, chromeos-commercial-readability-c-reviewers+reviews, Balazs Engedy, Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Permissions Reviews, Rijubrata Bhaumik, James Maclean, chfreme...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
            Attention needed from Andrew Rayskiy, Devlin Cronin, Giovanni Pezzino and Simon Hangl

            Thomas Nguyen added 1 comment

            Patchset-level comments
            Thomas Nguyen . unresolved

            Drive by comment. The routing logic makes sense to me. However, we are seeing that PEPC is actually disabled under <webview>.

            If it's disabled, does this code path get hit in production right now, or is this laying the plumbing for an upcoming CL that will enable PEPC for guests? Or anything I might be misunderstanding between the guest_view/web_view and <webview>?

            Thomas Nguyen

            .

            Gerrit-Comment-Date: Mon, 01 Jun 2026 14:10:07 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Thomas Nguyen <tun...@chromium.org>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Devlin Cronin (Gerrit)

            unread,
            2:13 PM (3 hours ago) 2:13 PM
            to Giovanni Pezzino, Devlin Cronin, Ravjit Uppal, Andrew Rayskiy, Kevin McNee, Simon Hangl, chromeos-commercial-readability-c-reviewers+reviews, Thomas Nguyen, Balazs Engedy, Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Permissions Reviews, Rijubrata Bhaumik, James Maclean, chfreme...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
            Attention needed from Andrew Rayskiy, Giovanni Pezzino and Simon Hangl

            Devlin Cronin voted and added 5 comments

            Votes added by Devlin Cronin

            Code-Review+1

            5 comments

            Patchset-level comments
            Devlin Cronin . resolved

            Thanks, Gio! LGTM % nits.

            File chrome/browser/media/webrtc/media_stream_device_permission_context_unittest.cc
            Line 34, Patchset 18 (Latest):#include "extensions/buildflags/buildflags.h"
            Devlin Cronin . unresolved

            nit: this should go in the main block of includes

            Line 254, Patchset 18 (Latest): "chrome-extension://llkfhpcadmdealbbjgclngjoffihfkmo/index.html");
            Devlin Cronin . unresolved

            nit: prefer `app->GetResourceURL("index.html")`

            Bonus: Then you probably don't need the SetID() call on ExtensionBuilder

            File chrome/test/data/webview/mediarequest_pepc.html
            Line 11, Patchset 18 (Latest): function waitForSource() {
            Devlin Cronin . unresolved

            indentation blocks should be +2, not +4

            Line 30, Patchset 18 (Latest): // If the permission state is already 'granted' or 'denied', the PEPC
            Devlin Cronin . unresolved

            as mentioned before in this CL, please wrap lines at 80 char when possible

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Andrew Rayskiy
            • Giovanni Pezzino
            • Simon Hangl
            Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement satisfiedCode-Owners
            Gerrit-Attention: Simon Hangl <sim...@google.com>
            Gerrit-Attention: Andrew Rayskiy <green...@google.com>
            Gerrit-Attention: Giovanni Pezzino <gio...@google.com>
            Gerrit-Comment-Date: Mon, 01 Jun 2026 18:13:31 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy
            Reply all
            Reply to author
            Forward
            0 new messages