SurfaceEmbed: Propagate render throttling status to embedded WebContents [chromium/src : main]

0 views
Skip to first unread message

Cammie Smith Barnes (Gerrit)

unread,
Jul 16, 2026, 6:11:11 PM (8 days ago) Jul 16
to android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, Zhe Su, kinuko...@chromium.org, alexmo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, creis...@chromium.org, ipc-securi...@chromium.org, keithle...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org

Cammie Smith Barnes added 3 comments

File content/browser/renderer_host/render_view_host_impl.cc
Line 1037, Patchset 5 (Latest): !frame_tree_->delegate()->GetOuterDelegateFrameTreeNodeId().is_null();
Cammie Smith Barnes . unresolved

By adding `!frame_tree_->delegate()->GetOuterDelegateFrameTreeNodeId().is_null()` to the `is_guest_view` condition, all inner WebContents (including SurfaceEmbed and Portals) will be classified as `kGuestView`.

Because the check for `is_guest_view` comes before `delegate_->IsEmbeddedViaSurfaceEmbed()`, the new `kSurfaceEmbed` widget type will actually never be reached.

Was this change to `is_guest_view` intended? If not, reverting this specific addition should allow `kSurfaceEmbed` to work correctly.

File content/browser/surface_embed/surface_embed_connector_impl_browsertest.cc
Line 1054, Patchset 5 (Latest): connector->UpdateRenderThrottlingStatus(true, false, false);
Cammie Smith Barnes . unresolved

Can we add parameter name labels to `UpdateRenderThrottlingStatus`?

File content/browser/web_contents/web_contents_impl.cc
Line 6491, Patchset 5 (Latest): if (rvh->frame_tree()->is_primary()) {
Cammie Smith Barnes . unresolved

Prerender frame trees will return `false` for `is_primary()`, which means they will skip this block and incorrectly return `true` (embedded). Since prerendered pages are top-level frames, this will incorrectly apply embedded layer tree settings to them (which can affect scrollbars, backgrounds, etc.).

Instead of checking `is_primary()`, it's safer to explicitly allow fenced frames, since guest and surface embeds are already handled above:
```cpp
if (owner_delegate->IsRenderViewHost()) {
auto* rvh = static_cast<RenderViewHostImpl*>(owner_delegate);
return rvh->frame_tree()->is_fenced_frame();
}
```
Open in Gerrit

Related details

Attention set is empty
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: Id971dd7f73673c52a11f1f5276150e472d2c9d0f
Gerrit-Change-Number: 8059786
Gerrit-PatchSet: 5
Gerrit-Owner: Cammie Smith Barnes <cam...@chromium.org>
Gerrit-Reviewer: Cammie Smith Barnes <cam...@chromium.org>
Gerrit-CC: Daniel Cheng <dch...@chromium.org>
Gerrit-CC: Zhe Su <su...@chromium.org>
Gerrit-Comment-Date: Thu, 16 Jul 2026 22:11:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Cammie Smith Barnes (Gerrit)

unread,
Jul 16, 2026, 6:13:00 PM (8 days ago) Jul 16
to android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, Zhe Su, kinuko...@chromium.org, alexmo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, creis...@chromium.org, ipc-securi...@chromium.org, keithle...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org

Cammie Smith Barnes added 1 comment

File content/browser/surface_embed/surface_embed_connector_impl_browsertest.cc
Line 1033, Patchset 5 (Latest):IN_PROC_BROWSER_TEST_F(SurfaceEmbedConnectorImplBrowserTest,
ThrottlingPropagation) {
Cammie Smith Barnes . unresolved

should we also be adding a test to surface_embed_plugin_browsertest.cc?

Open in Gerrit

Related details

Attention set is empty
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: Id971dd7f73673c52a11f1f5276150e472d2c9d0f
Gerrit-Change-Number: 8059786
Gerrit-PatchSet: 5
Gerrit-Owner: Cammie Smith Barnes <cam...@chromium.org>
Gerrit-Reviewer: Cammie Smith Barnes <cam...@chromium.org>
Gerrit-CC: Daniel Cheng <dch...@chromium.org>
Gerrit-CC: Zhe Su <su...@chromium.org>
Gerrit-Comment-Date: Thu, 16 Jul 2026 22:12:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Cammie Smith Barnes (Gerrit)

unread,
Jul 20, 2026, 1:20:08 PM (5 days ago) Jul 20
to android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, Zhe Su, droger+w...@chromium.org, kinuko...@chromium.org, alexmo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, creis...@chromium.org, ipc-securi...@chromium.org, keithle...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org

Cammie Smith Barnes added 1 comment

File content/browser/renderer_host/render_view_host_impl.cc
Line 1037, Patchset 5: !frame_tree_->delegate()->GetOuterDelegateFrameTreeNodeId().is_null();
Cammie Smith Barnes . resolved

By adding `!frame_tree_->delegate()->GetOuterDelegateFrameTreeNodeId().is_null()` to the `is_guest_view` condition, all inner WebContents (including SurfaceEmbed and Portals) will be classified as `kGuestView`.

Because the check for `is_guest_view` comes before `delegate_->IsEmbeddedViaSurfaceEmbed()`, the new `kSurfaceEmbed` widget type will actually never be reached.

Was this change to `is_guest_view` intended? If not, reverting this specific addition should allow `kSurfaceEmbed` to work correctly.

Cammie Smith Barnes

Done

Open in Gerrit

Related details

Attention set is empty
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: Id971dd7f73673c52a11f1f5276150e472d2c9d0f
Gerrit-Change-Number: 8059786
Gerrit-PatchSet: 9
Gerrit-Owner: Cammie Smith Barnes <cam...@chromium.org>
Gerrit-Reviewer: Cammie Smith Barnes <cam...@chromium.org>
Gerrit-CC: Daniel Cheng <dch...@chromium.org>
Gerrit-CC: Zhe Su <su...@chromium.org>
Gerrit-Comment-Date: Mon, 20 Jul 2026 17:20:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Cammie Smith Barnes <cam...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Cammie Smith Barnes (Gerrit)

unread,
Jul 20, 2026, 3:49:20 PM (5 days ago) Jul 20
to android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, Zhe Su, droger+w...@chromium.org, kinuko...@chromium.org, alexmo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, creis...@chromium.org, ipc-securi...@chromium.org, keithle...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org

Cammie Smith Barnes added 1 comment

File content/browser/web_contents/web_contents_impl.cc
Line 6491, Patchset 5: if (rvh->frame_tree()->is_primary()) {
Cammie Smith Barnes . resolved

Prerender frame trees will return `false` for `is_primary()`, which means they will skip this block and incorrectly return `true` (embedded). Since prerendered pages are top-level frames, this will incorrectly apply embedded layer tree settings to them (which can affect scrollbars, backgrounds, etc.).

Instead of checking `is_primary()`, it's safer to explicitly allow fenced frames, since guest and surface embeds are already handled above:
```cpp
if (owner_delegate->IsRenderViewHost()) {
auto* rvh = static_cast<RenderViewHostImpl*>(owner_delegate);
return rvh->frame_tree()->is_fenced_frame();
}
```
Cammie Smith Barnes

Done

Open in Gerrit

Related details

Attention set is empty
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: Id971dd7f73673c52a11f1f5276150e472d2c9d0f
Gerrit-Change-Number: 8059786
Gerrit-PatchSet: 10
Gerrit-Owner: Cammie Smith Barnes <cam...@chromium.org>
Gerrit-Reviewer: Cammie Smith Barnes <cam...@chromium.org>
Gerrit-CC: Daniel Cheng <dch...@chromium.org>
Gerrit-CC: Zhe Su <su...@chromium.org>
Gerrit-Comment-Date: Mon, 20 Jul 2026 19:49:11 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Cammie Smith Barnes (Gerrit)

unread,
Jul 20, 2026, 4:12:06 PM (5 days ago) Jul 20
to android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, Zhe Su, droger+w...@chromium.org, kinuko...@chromium.org, alexmo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, creis...@chromium.org, ipc-securi...@chromium.org, keithle...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org

Cammie Smith Barnes added 2 comments

File content/browser/surface_embed/surface_embed_connector_impl_browsertest.cc
Line 1033, Patchset 5:IN_PROC_BROWSER_TEST_F(SurfaceEmbedConnectorImplBrowserTest,
ThrottlingPropagation) {
Cammie Smith Barnes . resolved

should we also be adding a test to surface_embed_plugin_browsertest.cc?

Cammie Smith Barnes

Done

Line 1054, Patchset 5: connector->UpdateRenderThrottlingStatus(true, false, false);
Cammie Smith Barnes . resolved

Can we add parameter name labels to `UpdateRenderThrottlingStatus`?

Cammie Smith Barnes

Done

Open in Gerrit

Related details

Attention set is empty
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: Id971dd7f73673c52a11f1f5276150e472d2c9d0f
    Gerrit-Change-Number: 8059786
    Gerrit-PatchSet: 11
    Gerrit-Owner: Cammie Smith Barnes <cam...@chromium.org>
    Gerrit-Reviewer: Cammie Smith Barnes <cam...@chromium.org>
    Gerrit-CC: Daniel Cheng <dch...@chromium.org>
    Gerrit-CC: Zhe Su <su...@chromium.org>
    Gerrit-Comment-Date: Mon, 20 Jul 2026 20:11:56 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Cammie Smith Barnes (Gerrit)

    unread,
    Jul 20, 2026, 4:22:35 PM (4 days ago) Jul 20
    to android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, Zhe Su, tburkar...@chromium.org, gavin...@chromium.org, prerenderi...@chromium.org, droger+w...@chromium.org, kinuko...@chromium.org, alexmo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, creis...@chromium.org, ipc-securi...@chromium.org, keithle...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org

    Cammie Smith Barnes added 2 comments

    File content/browser/renderer_host/render_widget_host_impl.cc
    Line 1059, Patchset 11 (Latest): visual_properties.is_embedded = delegate_->IsWidgetEmbedded(this);
    Cammie Smith Barnes . unresolved

    If this is a popup widget (`is_frame_widget == false`), `WebContentsImpl::IsWidgetEmbedded` will still return `true` because popups don't have an `owner_delegate` and fall through to its default `return true`.

    Consider changing this to:
    ```cpp
    visual_properties.is_embedded = is_frame_widget && delegate_->IsWidgetEmbedded(this);
    ```
    or handle popups explicitly in `WebContentsImpl::IsWidgetEmbedded` to prevent them from being incorrectly marked as embedded.

    File content/browser/web_contents/web_contents_impl.cc
    Cammie Smith Barnes . unresolved

    Popup widgets (which do not have an `owner_delegate`) will fall through to here and return `true`, incorrectly marking them as embedded. You might want to handle popups explicitly (e.g., by ensuring this is only called/true for frame widgets) or handle this in `RenderWidgetHostImpl::SynchronizeVisualProperties`.

    Open in Gerrit

    Related details

    Attention set is empty
    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: Id971dd7f73673c52a11f1f5276150e472d2c9d0f
      Gerrit-Change-Number: 8059786
      Gerrit-PatchSet: 11
      Gerrit-Owner: Cammie Smith Barnes <cam...@chromium.org>
      Gerrit-Reviewer: Cammie Smith Barnes <cam...@chromium.org>
      Gerrit-CC: Daniel Cheng <dch...@chromium.org>
      Gerrit-CC: Zhe Su <su...@chromium.org>
      Gerrit-Comment-Date: Mon, 20 Jul 2026 20:22:25 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Cammie Smith Barnes (Gerrit)

      unread,
      Jul 20, 2026, 4:48:10 PM (4 days ago) Jul 20
      to android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, Zhe Su, tburkar...@chromium.org, gavin...@chromium.org, prerenderi...@chromium.org, droger+w...@chromium.org, kinuko...@chromium.org, alexmo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, creis...@chromium.org, ipc-securi...@chromium.org, keithle...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org

      Cammie Smith Barnes added 3 comments

      File content/browser/preloading/prerender/prerender_host_unittest.cc
      Line 208, Patchset 12 (Latest): // Popup widget should not be embedded.
      RenderWidgetHostImpl* popup_rwh = RenderWidgetHostFactory::CreateSelfOwned(
      &contents()->GetPrimaryFrameTree(), contents(),
      contents()
      ->GetPrimaryMainFrame()
      ->GetSiteInstance()
      ->group()
      ->GetSafeRef(),
      contents()->GetPrimaryMainFrame()->GetProcess()->GetNextRoutingID(),
      contents()->IsHidden(), contents()->GetPrimaryMainFrame()->GetGlobalId());
      EXPECT_FALSE(contents()->IsWidgetEmbedded(popup_rwh));
      popup_rwh->ShutdownAndDestroyWidget(true);
      Cammie Smith Barnes . unresolved

      is this addition to the test in the correct file? what do popups have to do with the prerender host? I think we should move these newly added lines to a standalone test in a file that is more relevant to popup or widget handling.

      File content/browser/renderer_host/render_widget_host_impl.cc
      Line 1059, Patchset 11: visual_properties.is_embedded = delegate_->IsWidgetEmbedded(this);
      Cammie Smith Barnes . resolved

      If this is a popup widget (`is_frame_widget == false`), `WebContentsImpl::IsWidgetEmbedded` will still return `true` because popups don't have an `owner_delegate` and fall through to its default `return true`.

      Consider changing this to:
      ```cpp
      visual_properties.is_embedded = is_frame_widget && delegate_->IsWidgetEmbedded(this);
      ```
      or handle popups explicitly in `WebContentsImpl::IsWidgetEmbedded` to prevent them from being incorrectly marked as embedded.

      Cammie Smith Barnes

      Done

      File content/browser/web_contents/web_contents_impl.cc
      Line 6479, Patchset 11: return true;
      Cammie Smith Barnes . resolved

      Popup widgets (which do not have an `owner_delegate`) will fall through to here and return `true`, incorrectly marking them as embedded. You might want to handle popups explicitly (e.g., by ensuring this is only called/true for frame widgets) or handle this in `RenderWidgetHostImpl::SynchronizeVisualProperties`.

      Cammie Smith Barnes

      Done

      Open in Gerrit

      Related details

      Attention set is empty
      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: Id971dd7f73673c52a11f1f5276150e472d2c9d0f
      Gerrit-Change-Number: 8059786
      Gerrit-PatchSet: 12
      Gerrit-Owner: Cammie Smith Barnes <cam...@chromium.org>
      Gerrit-Reviewer: Cammie Smith Barnes <cam...@chromium.org>
      Gerrit-CC: Daniel Cheng <dch...@chromium.org>
      Gerrit-CC: Zhe Su <su...@chromium.org>
      Gerrit-Comment-Date: Mon, 20 Jul 2026 20:47:55 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Cammie Smith Barnes (Gerrit)

      unread,
      Jul 20, 2026, 4:59:53 PM (4 days ago) Jul 20
      to android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, Zhe Su, tburkar...@chromium.org, gavin...@chromium.org, prerenderi...@chromium.org, droger+w...@chromium.org, kinuko...@chromium.org, alexmo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, creis...@chromium.org, ipc-securi...@chromium.org, keithle...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org

      Cammie Smith Barnes added 1 comment

      File content/browser/preloading/prerender/prerender_host_unittest.cc
      Line 208, Patchset 12: // Popup widget should not be embedded.

      RenderWidgetHostImpl* popup_rwh = RenderWidgetHostFactory::CreateSelfOwned(
      &contents()->GetPrimaryFrameTree(), contents(),
      contents()
      ->GetPrimaryMainFrame()
      ->GetSiteInstance()
      ->group()
      ->GetSafeRef(),
      contents()->GetPrimaryMainFrame()->GetProcess()->GetNextRoutingID(),
      contents()->IsHidden(), contents()->GetPrimaryMainFrame()->GetGlobalId());
      EXPECT_FALSE(contents()->IsWidgetEmbedded(popup_rwh));
      popup_rwh->ShutdownAndDestroyWidget(true);
      Cammie Smith Barnes . resolved

      is this addition to the test in the correct file? what do popups have to do with the prerender host? I think we should move these newly added lines to a standalone test in a file that is more relevant to popup or widget handling.

      Cammie Smith Barnes

      Done

      Open in Gerrit

      Related details

      Attention set is empty
      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: Id971dd7f73673c52a11f1f5276150e472d2c9d0f
        Gerrit-Change-Number: 8059786
        Gerrit-PatchSet: 13
        Gerrit-Owner: Cammie Smith Barnes <cam...@chromium.org>
        Gerrit-Reviewer: Cammie Smith Barnes <cam...@chromium.org>
        Gerrit-CC: Daniel Cheng <dch...@chromium.org>
        Gerrit-CC: Zhe Su <su...@chromium.org>
        Gerrit-Comment-Date: Mon, 20 Jul 2026 20:59:46 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Cammie Smith Barnes (Gerrit)

        unread,
        Jul 20, 2026, 5:07:07 PM (4 days ago) Jul 20
        to android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, Zhe Su, tburkar...@chromium.org, gavin...@chromium.org, prerenderi...@chromium.org, droger+w...@chromium.org, kinuko...@chromium.org, alexmo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, creis...@chromium.org, ipc-securi...@chromium.org, keithle...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org

        Cammie Smith Barnes added 1 comment

        File components/surface_embed/common/surface_embed.mojom
        Line 59, Patchset 13 (Latest): // Toggles render throttling on the child WebContents.
        Cammie Smith Barnes . unresolved

        **API-T14-01**: Please explicitly document the behavioral semantics of consecutive IPC calls here. The term "Toggles" implies that successive calls invert the current state. However, since the method accepts explicit boolean parameters (`is_throttled`, etc.), it actually replaces the existing state.

        Please update the comment to unambiguously clarify that this method updates or replaces the throttling status to match the provided parameters, rather than toggling it.

        Open in Gerrit

        Related details

        Attention set is empty
        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: Id971dd7f73673c52a11f1f5276150e472d2c9d0f
          Gerrit-Change-Number: 8059786
          Gerrit-PatchSet: 13
          Gerrit-Owner: Cammie Smith Barnes <cam...@chromium.org>
          Gerrit-Reviewer: Cammie Smith Barnes <cam...@chromium.org>
          Gerrit-CC: Daniel Cheng <dch...@chromium.org>
          Gerrit-CC: Zhe Su <su...@chromium.org>
          Gerrit-Comment-Date: Mon, 20 Jul 2026 21:06:56 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Cammie Smith Barnes (Gerrit)

          unread,
          Jul 20, 2026, 5:17:30 PM (4 days ago) Jul 20
          to android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, Zhe Su, tburkar...@chromium.org, gavin...@chromium.org, prerenderi...@chromium.org, droger+w...@chromium.org, kinuko...@chromium.org, alexmo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, creis...@chromium.org, ipc-securi...@chromium.org, keithle...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org

          Cammie Smith Barnes added 1 comment

          File components/surface_embed/common/surface_embed.mojom
          Line 59, Patchset 13: // Toggles render throttling on the child WebContents.
          Cammie Smith Barnes . resolved

          **API-T14-01**: Please explicitly document the behavioral semantics of consecutive IPC calls here. The term "Toggles" implies that successive calls invert the current state. However, since the method accepts explicit boolean parameters (`is_throttled`, etc.), it actually replaces the existing state.

          Please update the comment to unambiguously clarify that this method updates or replaces the throttling status to match the provided parameters, rather than toggling it.

          Cammie Smith Barnes

          Done

          Open in Gerrit

          Related details

          Attention set is empty
          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: Id971dd7f73673c52a11f1f5276150e472d2c9d0f
            Gerrit-Change-Number: 8059786
            Gerrit-PatchSet: 14
            Gerrit-Owner: Cammie Smith Barnes <cam...@chromium.org>
            Gerrit-Reviewer: Cammie Smith Barnes <cam...@chromium.org>
            Gerrit-CC: Daniel Cheng <dch...@chromium.org>
            Gerrit-CC: Zhe Su <su...@chromium.org>
            Gerrit-Comment-Date: Mon, 20 Jul 2026 21:17:22 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Cammie Smith Barnes (Gerrit)

            unread,
            Jul 20, 2026, 5:30:16 PM (4 days ago) Jul 20
            to android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, Zhe Su, tburkar...@chromium.org, gavin...@chromium.org, prerenderi...@chromium.org, droger+w...@chromium.org, kinuko...@chromium.org, alexmo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, creis...@chromium.org, ipc-securi...@chromium.org, keithle...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org

            Cammie Smith Barnes added 1 comment

            File components/surface_embed/common/surface_embed.mojom
            Line 63, Patchset 14 (Latest): bool is_throttled, bool subtree_throttled, bool display_locked);
            Cammie Smith Barnes . unresolved

            Consider grouping these sequential boolean parameters (`is_throttled`, `subtree_throttled`, `display_locked`) into a single strongly-typed struct (e.g., `RenderThrottlingStatus`). In adherence with the spirit of Rule 6 (IPC Type Safety) and to improve code clarity, structured Mojom primitives are preferred over multiple independent boolean flags to prevent "boolean blindness" and accidental parameter swapping across IPC boundaries.

            Open in Gerrit

            Related details

            Attention set is empty
            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: Id971dd7f73673c52a11f1f5276150e472d2c9d0f
              Gerrit-Change-Number: 8059786
              Gerrit-PatchSet: 14
              Gerrit-Owner: Cammie Smith Barnes <cam...@chromium.org>
              Gerrit-Reviewer: Cammie Smith Barnes <cam...@chromium.org>
              Gerrit-CC: Daniel Cheng <dch...@chromium.org>
              Gerrit-CC: Zhe Su <su...@chromium.org>
              Gerrit-Comment-Date: Mon, 20 Jul 2026 21:29:58 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Cammie Smith Barnes (Gerrit)

              unread,
              Jul 20, 2026, 5:54:01 PM (4 days ago) Jul 20
              to android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, Zhe Su, tburkar...@chromium.org, gavin...@chromium.org, prerenderi...@chromium.org, droger+w...@chromium.org, kinuko...@chromium.org, alexmo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, creis...@chromium.org, ipc-securi...@chromium.org, keithle...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org

              Cammie Smith Barnes added 1 comment

              File components/surface_embed/common/surface_embed.mojom
              Line 63, Patchset 14: bool is_throttled, bool subtree_throttled, bool display_locked);
              Cammie Smith Barnes . resolved

              Consider grouping these sequential boolean parameters (`is_throttled`, `subtree_throttled`, `display_locked`) into a single strongly-typed struct (e.g., `RenderThrottlingStatus`). In adherence with the spirit of Rule 6 (IPC Type Safety) and to improve code clarity, structured Mojom primitives are preferred over multiple independent boolean flags to prevent "boolean blindness" and accidental parameter swapping across IPC boundaries.

              Cammie Smith Barnes

              Done

              Open in Gerrit

              Related details

              Attention set is empty
              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: Id971dd7f73673c52a11f1f5276150e472d2c9d0f
                Gerrit-Change-Number: 8059786
                Gerrit-PatchSet: 15
                Gerrit-Owner: Cammie Smith Barnes <cam...@chromium.org>
                Gerrit-Reviewer: Cammie Smith Barnes <cam...@chromium.org>
                Gerrit-CC: Daniel Cheng <dch...@chromium.org>
                Gerrit-CC: Zhe Su <su...@chromium.org>
                Gerrit-Comment-Date: Mon, 20 Jul 2026 21:53:55 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                gwsq (Gerrit)

                unread,
                Jul 20, 2026, 6:01:13 PM (4 days ago) Jul 20
                to Cammie Smith Barnes, Surface Embed Reviews, Keren Zhu, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, Zhe Su, tburkar...@chromium.org, gavin...@chromium.org, prerenderi...@chromium.org, droger+w...@chromium.org, kinuko...@chromium.org, alexmo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, creis...@chromium.org, ipc-securi...@chromium.org, keithle...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org
                Attention needed from Keren Zhu

                Message from gwsq

                Reviewer source(s):
                kere...@chromium.org is from context(googleclient/chrome/chromium_gwsq/components/surface_embed/config.gwsq)

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Keren Zhu
                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: Id971dd7f73673c52a11f1f5276150e472d2c9d0f
                Gerrit-Change-Number: 8059786
                Gerrit-PatchSet: 15
                Gerrit-Owner: Cammie Smith Barnes <cam...@chromium.org>
                Gerrit-Reviewer: Cammie Smith Barnes <cam...@chromium.org>
                Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                Gerrit-CC: Daniel Cheng <dch...@chromium.org>
                Gerrit-CC: Surface Embed Reviews <surface-em...@google.com>
                Gerrit-CC: gwsq
                Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                Gerrit-Comment-Date: Mon, 20 Jul 2026 22:00:59 +0000
                Gerrit-HasComments: No
                Gerrit-Has-Labels: No
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Keren Zhu (Gerrit)

                unread,
                Jul 20, 2026, 9:15:45 PM (4 days ago) Jul 20
                to Cammie Smith Barnes, Surface Embed Reviews, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, Zhe Su, tburkar...@chromium.org, gavin...@chromium.org, prerenderi...@chromium.org, droger+w...@chromium.org, kinuko...@chromium.org, alexmo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, creis...@chromium.org, ipc-securi...@chromium.org, keithle...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org
                Attention needed from Cammie Smith Barnes

                Keren Zhu added 1 comment

                Patchset-level comments
                File-level comment, Patchset 15 (Latest):
                Keren Zhu . resolved

                Thanks for the CL!

                Looks like there're CQ failures and merge conflicts. Let me know if you want my review now or if I should wait for your fix.

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Cammie Smith Barnes
                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: Id971dd7f73673c52a11f1f5276150e472d2c9d0f
                Gerrit-Change-Number: 8059786
                Gerrit-PatchSet: 15
                Gerrit-Owner: Cammie Smith Barnes <cam...@chromium.org>
                Gerrit-Reviewer: Cammie Smith Barnes <cam...@chromium.org>
                Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                Gerrit-CC: Daniel Cheng <dch...@chromium.org>
                Gerrit-CC: Surface Embed Reviews <surface-em...@google.com>
                Gerrit-CC: Zhe Su <su...@chromium.org>
                Gerrit-CC: gwsq
                Gerrit-Attention: Cammie Smith Barnes <cam...@chromium.org>
                Gerrit-Comment-Date: Tue, 21 Jul 2026 01:15:34 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Cammie Smith Barnes (Gerrit)

                unread,
                Jul 22, 2026, 12:56:05 PM (3 days ago) Jul 22
                to Surface Embed Reviews, Keren Zhu, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, Zhe Su, tburkar...@chromium.org, gavin...@chromium.org, prerenderi...@chromium.org, droger+w...@chromium.org, kinuko...@chromium.org, alexmo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, creis...@chromium.org, ipc-securi...@chromium.org, keithle...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org
                Attention needed from Keren Zhu

                Cammie Smith Barnes added 1 comment

                Patchset-level comments
                Keren Zhu . resolved

                Thanks for the CL!

                Looks like there're CQ failures and merge conflicts. Let me know if you want my review now or if I should wait for your fix.

                Cammie Smith Barnes

                Fixed the merge conflict and CQ failures, so it's ready for review. Thanks!

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Keren Zhu
                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: Id971dd7f73673c52a11f1f5276150e472d2c9d0f
                Gerrit-Change-Number: 8059786
                Gerrit-PatchSet: 17
                Gerrit-Owner: Cammie Smith Barnes <cam...@chromium.org>
                Gerrit-Reviewer: Cammie Smith Barnes <cam...@chromium.org>
                Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                Gerrit-CC: Daniel Cheng <dch...@chromium.org>
                Gerrit-CC: Surface Embed Reviews <surface-em...@google.com>
                Gerrit-CC: Zhe Su <su...@chromium.org>
                Gerrit-CC: gwsq
                Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                Gerrit-Comment-Date: Wed, 22 Jul 2026 16:55:46 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                Comment-In-Reply-To: Keren Zhu <kere...@chromium.org>
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Keren Zhu (Gerrit)

                unread,
                Jul 23, 2026, 2:41:10 AM (2 days ago) Jul 23
                to Cammie Smith Barnes, Surface Embed Reviews, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, Zhe Su, tburkar...@chromium.org, gavin...@chromium.org, prerenderi...@chromium.org, droger+w...@chromium.org, kinuko...@chromium.org, alexmo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, creis...@chromium.org, ipc-securi...@chromium.org, keithle...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org
                Attention needed from Cammie Smith Barnes

                Keren Zhu added 13 comments

                Patchset-level comments
                File-level comment, Patchset 17 (Latest):
                Keren Zhu . resolved

                Thank you Cammie! The direction overall looks good but the complexity is a bit overwhelming. I leave some comments.

                Commit Message
                Line 12, Patchset 17 (Latest):
                Keren Zhu . unresolved

                It is worth mentioning the existing OOPIF throttling mechanism and this CL builds on top of that, e.g.,

                ```
                This CL extends the existing OOPIF throttling pipeline to support
                throttling embedded main frame (GuestView and SurfaceEmbed). The
                throttling state is passed through FrameConnector ->
                RenderWidgetHostViewChildFrame -> blink::FrameWidget when
                RWHVChildFrame::UpdateRenderThrottlingStatus() is called.
                ```

                Line 15, Patchset 17 (Latest):This occurred because WebContentsImpl::IsWidgetEmbedded() returned false
                Keren Zhu . unresolved

                This description sounds like `IsWidgetEmbedded` exists today, which is not true. Maybe reword? I also think that maybe we don't need this method (I leave a separate comment for that).

                Line 22, Patchset 17 (Latest):- Adding `UpdateRenderThrottlingStatus` to `mojom::SurfaceEmbedHost` to
                Keren Zhu . unresolved

                Can we mention that `UpdateRenderThrottlingStatus` is a new virtual method in `blink::WebPlugin` and also describe the source of the throttling status (i.e., it originates from the parent LocalFrameView)?

                File components/surface_embed/common/surface_embed.mojom
                Line 39, Patchset 17 (Latest):// Represents the render throttling status of an embedded frame.
                struct RenderThrottlingStatus {
                bool is_throttled;
                bool subtree_throttled;
                bool display_locked;
                };
                Keren Zhu . unresolved

                This is the same set of booleans used by [RemoteFrame](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/public/mojom/frame/remote_frame.mojom;l=191;drc=0a5e9fb6b61cd0e736d3166b99326d33b9ccea66) and [FrameWidget](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/public/mojom/page/widget.mojom;l=160;drc=c0f65cfcd9968553a6d669588ea8dec10d241627). I think we can make it a shared struct (in a follow up).

                For now, can we reference `RemoteFrame::UpdateRenderThrottlingStatus` in a comment? (that the same set of parameters are used).

                Line 67, Patchset 17 (Latest): // provided parameters. Successive calls replace the existing state rather
                // than toggling it.
                Keren Zhu . unresolved

                What does "toggle" mean? This function signature looks stateless to me (i.e. it does not depend on the current throttling state of the child side), and so "toggle" seems redundant. Maybe delete the whole sentence?

                Line 69, Patchset 17 (Latest): UpdateRenderThrottlingStatus(RenderThrottlingStatus status);
                Keren Zhu . unresolved

                About naming, maybe `OnEmbedElementThrottlingStatusChanged`, which hints that `SurfaceEmbedHost` will decide how the state is applied to the child WebContents? For example, it may reject throttling a child WebContents when the WebContents is being screen-captured.

                File content/browser/renderer_host/render_view_host_impl.cc
                Line 1040, Patchset 17 (Latest): } else if (delegate_->IsEmbeddedViaSurfaceEmbed()) {
                Keren Zhu . unresolved

                What will break without this change? If it breaks `CHECK`s, can you point me to them?

                Currently, an surface-embedded Blink frame does not know about itself being embeded. This line will change that (via [CreateFrameParams::is_for_nested_main_frame](https://source.chromium.org/chromium/chromium/src/+/main:content/common/frame.mojom;l=361;drc=60df9044934a2841875904f21e9673afe970da1e) set to true due to [type != kTopLevel](https://source.chromium.org/chromium/chromium/src/+/main:content/browser/renderer_host/render_frame_host_impl.cc;l=4598;drc=03b18568967f29eb7d198a513c9be98291a5ce6c)). We want to make a surface-embedded frame behave like a top-level frame as much as possible, so I am curious if we can avoid this change.

                File content/browser/renderer_host/render_widget_host_impl.h
                Line 576, Patchset 17 (Latest): bool is_frame_widget() const { return !self_owned_; }
                Keren Zhu . unresolved

                We don't actually need this. See my comment in `web_contents_impl.cc`.

                File content/browser/renderer_host/render_widget_host_impl.cc
                Line 1060, Patchset 17 (Latest): is_frame_widget && delegate_->IsWidgetEmbedded(this);
                Keren Zhu . unresolved

                Can we replace this with `GetView()->IsRenderWidgetHostViewChildFrame()`, so that we don't need the new `IsWidgetEmbedded`?

                File content/browser/renderer_host/render_widget_host_owner_delegate.h
                Line 36, Patchset 17 (Latest): virtual bool IsRenderViewHost() const;
                Keren Zhu . unresolved

                Can we avoid adding this virtual method? The RenderView concept is being removed (see comment above this class).

                File content/browser/surface_embed/surface_embed_connector_impl_browsertest.cc
                Line 1135, Patchset 17 (Latest): ThrottlingPropagation) {
                Keren Zhu . unresolved

                I think this test does not really test state propagation? e.g., the state is set then retrieved from connector. No IPC is involved. I think we need better test coverage.

                File content/browser/web_contents/web_contents_impl.cc
                Line 6463, Patchset 17 (Latest): if (!render_widget_host->is_frame_widget()) {
                Keren Zhu . unresolved

                This is equivalent to `render_widget_host->GetView()->GetWidgetType() == WidgetType::kFrame` (no need for the new `is_frame_widget` getter).

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Cammie Smith Barnes
                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: Id971dd7f73673c52a11f1f5276150e472d2c9d0f
                  Gerrit-Change-Number: 8059786
                  Gerrit-PatchSet: 17
                  Gerrit-Owner: Cammie Smith Barnes <cam...@chromium.org>
                  Gerrit-Reviewer: Cammie Smith Barnes <cam...@chromium.org>
                  Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                  Gerrit-CC: Daniel Cheng <dch...@chromium.org>
                  Gerrit-CC: Surface Embed Reviews <surface-em...@google.com>
                  Gerrit-CC: Zhe Su <su...@chromium.org>
                  Gerrit-CC: gwsq
                  Gerrit-Attention: Cammie Smith Barnes <cam...@chromium.org>
                  Gerrit-Comment-Date: Thu, 23 Jul 2026 06:40:59 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: No
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Cammie Smith Barnes (Gerrit)

                  unread,
                  Jul 23, 2026, 2:42:37 PM (2 days ago) Jul 23
                  to Surface Embed Reviews, Keren Zhu, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, Zhe Su, tburkar...@chromium.org, gavin...@chromium.org, prerenderi...@chromium.org, droger+w...@chromium.org, kinuko...@chromium.org, alexmo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, creis...@chromium.org, ipc-securi...@chromium.org, keithle...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org

                  Cammie Smith Barnes added 2 comments

                  File content/browser/renderer_host/render_widget_host_impl.h
                  Line 576, Patchset 17: bool is_frame_widget() const { return !self_owned_; }
                  Keren Zhu . resolved

                  We don't actually need this. See my comment in `web_contents_impl.cc`.

                  Cammie Smith Barnes

                  Done

                  File content/browser/web_contents/web_contents_impl.cc
                  Line 6463, Patchset 17: if (!render_widget_host->is_frame_widget()) {
                  Keren Zhu . resolved

                  This is equivalent to `render_widget_host->GetView()->GetWidgetType() == WidgetType::kFrame` (no need for the new `is_frame_widget` getter).

                  Cammie Smith Barnes

                  Done

                  Open in Gerrit

                  Related details

                  Attention set is empty
                  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: Id971dd7f73673c52a11f1f5276150e472d2c9d0f
                  Gerrit-Change-Number: 8059786
                  Gerrit-PatchSet: 18
                  Gerrit-Owner: Cammie Smith Barnes <cam...@chromium.org>
                  Gerrit-Reviewer: Cammie Smith Barnes <cam...@chromium.org>
                  Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                  Gerrit-CC: Daniel Cheng <dch...@chromium.org>
                  Gerrit-CC: Surface Embed Reviews <surface-em...@google.com>
                  Gerrit-CC: Zhe Su <su...@chromium.org>
                  Gerrit-CC: gwsq
                  Gerrit-Comment-Date: Thu, 23 Jul 2026 18:42:25 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: No
                  Comment-In-Reply-To: Keren Zhu <kere...@chromium.org>
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Cammie Smith Barnes (Gerrit)

                  unread,
                  Jul 23, 2026, 2:58:57 PM (2 days ago) Jul 23
                  to Surface Embed Reviews, Keren Zhu, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, Zhe Su, tburkar...@chromium.org, gavin...@chromium.org, prerenderi...@chromium.org, droger+w...@chromium.org, kinuko...@chromium.org, alexmo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, creis...@chromium.org, ipc-securi...@chromium.org, keithle...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org

                  Cammie Smith Barnes added 2 comments

                  Commit Message
                  Line 15, Patchset 17:This occurred because WebContentsImpl::IsWidgetEmbedded() returned false
                  Keren Zhu . resolved

                  This description sounds like `IsWidgetEmbedded` exists today, which is not true. Maybe reword? I also think that maybe we don't need this method (I leave a separate comment for that).

                  Cammie Smith Barnes

                  Done

                  File content/browser/renderer_host/render_widget_host_impl.cc
                  Line 1060, Patchset 17: is_frame_widget && delegate_->IsWidgetEmbedded(this);
                  Keren Zhu . resolved

                  Can we replace this with `GetView()->IsRenderWidgetHostViewChildFrame()`, so that we don't need the new `IsWidgetEmbedded`?

                  Cammie Smith Barnes

                  Done

                  Open in Gerrit

                  Related details

                  Attention set is empty
                  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: Id971dd7f73673c52a11f1f5276150e472d2c9d0f
                  Gerrit-Change-Number: 8059786
                  Gerrit-PatchSet: 20
                  Gerrit-Owner: Cammie Smith Barnes <cam...@chromium.org>
                  Gerrit-Reviewer: Cammie Smith Barnes <cam...@chromium.org>
                  Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                  Gerrit-CC: Daniel Cheng <dch...@chromium.org>
                  Gerrit-CC: Surface Embed Reviews <surface-em...@google.com>
                  Gerrit-CC: Zhe Su <su...@chromium.org>
                  Gerrit-CC: gwsq
                  Gerrit-Comment-Date: Thu, 23 Jul 2026 18:58:39 +0000
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Cammie Smith Barnes (Gerrit)

                  unread,
                  Jul 23, 2026, 4:44:22 PM (2 days ago) Jul 23
                  to Surface Embed Reviews, Keren Zhu, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, Zhe Su, tburkar...@chromium.org, gavin...@chromium.org, prerenderi...@chromium.org, droger+w...@chromium.org, kinuko...@chromium.org, alexmo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, creis...@chromium.org, ipc-securi...@chromium.org, keithle...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org

                  Cammie Smith Barnes added 2 comments

                  Commit Message
                  Line 12, Patchset 17:
                  Keren Zhu . resolved

                  It is worth mentioning the existing OOPIF throttling mechanism and this CL builds on top of that, e.g.,

                  ```
                  This CL extends the existing OOPIF throttling pipeline to support
                  throttling embedded main frame (GuestView and SurfaceEmbed). The
                  throttling state is passed through FrameConnector ->
                  RenderWidgetHostViewChildFrame -> blink::FrameWidget when
                  RWHVChildFrame::UpdateRenderThrottlingStatus() is called.
                  ```

                  Cammie Smith Barnes

                  Done

                  Line 22, Patchset 17:- Adding `UpdateRenderThrottlingStatus` to `mojom::SurfaceEmbedHost` to
                  Keren Zhu . resolved

                  Can we mention that `UpdateRenderThrottlingStatus` is a new virtual method in `blink::WebPlugin` and also describe the source of the throttling status (i.e., it originates from the parent LocalFrameView)?

                  Cammie Smith Barnes

                  Done

                  Open in Gerrit

                  Related details

                  Attention set is empty
                  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: Id971dd7f73673c52a11f1f5276150e472d2c9d0f
                  Gerrit-Change-Number: 8059786
                  Gerrit-PatchSet: 21
                  Gerrit-Owner: Cammie Smith Barnes <cam...@chromium.org>
                  Gerrit-Reviewer: Cammie Smith Barnes <cam...@chromium.org>
                  Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                  Gerrit-CC: Daniel Cheng <dch...@chromium.org>
                  Gerrit-CC: Surface Embed Reviews <surface-em...@google.com>
                  Gerrit-CC: Zhe Su <su...@chromium.org>
                  Gerrit-CC: gwsq
                  Gerrit-Comment-Date: Thu, 23 Jul 2026 20:44:13 +0000
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Cammie Smith Barnes (Gerrit)

                  unread,
                  Jul 23, 2026, 5:18:17 PM (2 days ago) Jul 23
                  to Surface Embed Reviews, Keren Zhu, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, Zhe Su, tburkar...@chromium.org, gavin...@chromium.org, prerenderi...@chromium.org, droger+w...@chromium.org, kinuko...@chromium.org, alexmo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, creis...@chromium.org, ipc-securi...@chromium.org, keithle...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org

                  Cammie Smith Barnes added 2 comments

                  File components/surface_embed/common/surface_embed.mojom
                  Line 39, Patchset 17:// Represents the render throttling status of an embedded frame.

                  struct RenderThrottlingStatus {
                  bool is_throttled;
                  bool subtree_throttled;
                  bool display_locked;
                  };

                  For now, can we reference `RemoteFrame::UpdateRenderThrottlingStatus` in a comment? (that the same set of parameters are used).

                  Cammie Smith Barnes

                  Done

                  Line 67, Patchset 17: // provided parameters. Successive calls replace the existing state rather
                  // than toggling it.
                  Keren Zhu . resolved

                  What does "toggle" mean? This function signature looks stateless to me (i.e. it does not depend on the current throttling state of the child side), and so "toggle" seems redundant. Maybe delete the whole sentence?

                  Cammie Smith Barnes

                  Done

                  Open in Gerrit

                  Related details

                  Attention set is empty
                  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: Id971dd7f73673c52a11f1f5276150e472d2c9d0f
                  Gerrit-Change-Number: 8059786
                  Gerrit-PatchSet: 24
                  Gerrit-Owner: Cammie Smith Barnes <cam...@chromium.org>
                  Gerrit-Reviewer: Cammie Smith Barnes <cam...@chromium.org>
                  Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                  Gerrit-CC: Daniel Cheng <dch...@chromium.org>
                  Gerrit-CC: Surface Embed Reviews <surface-em...@google.com>
                  Gerrit-CC: Zhe Su <su...@chromium.org>
                  Gerrit-CC: gwsq
                  Gerrit-Comment-Date: Thu, 23 Jul 2026 21:18:09 +0000
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Cammie Smith Barnes (Gerrit)

                  unread,
                  Jul 23, 2026, 5:27:09 PM (2 days ago) Jul 23
                  to Surface Embed Reviews, Keren Zhu, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, Zhe Su, tburkar...@chromium.org, gavin...@chromium.org, prerenderi...@chromium.org, droger+w...@chromium.org, kinuko...@chromium.org, alexmo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, creis...@chromium.org, ipc-securi...@chromium.org, keithle...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org

                  Cammie Smith Barnes added 1 comment

                  File components/surface_embed/common/surface_embed.mojom
                  Line 69, Patchset 17: UpdateRenderThrottlingStatus(RenderThrottlingStatus status);
                  Keren Zhu . resolved

                  About naming, maybe `OnEmbedElementThrottlingStatusChanged`, which hints that `SurfaceEmbedHost` will decide how the state is applied to the child WebContents? For example, it may reject throttling a child WebContents when the WebContents is being screen-captured.

                  Cammie Smith Barnes

                  Done

                  Open in Gerrit

                  Related details

                  Attention set is empty
                  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: Id971dd7f73673c52a11f1f5276150e472d2c9d0f
                  Gerrit-Change-Number: 8059786
                  Gerrit-PatchSet: 25
                  Gerrit-Owner: Cammie Smith Barnes <cam...@chromium.org>
                  Gerrit-Reviewer: Cammie Smith Barnes <cam...@chromium.org>
                  Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                  Gerrit-CC: Daniel Cheng <dch...@chromium.org>
                  Gerrit-CC: Surface Embed Reviews <surface-em...@google.com>
                  Gerrit-CC: Zhe Su <su...@chromium.org>
                  Gerrit-CC: gwsq
                  Gerrit-Comment-Date: Thu, 23 Jul 2026 21:27:02 +0000
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Cammie Smith Barnes (Gerrit)

                  unread,
                  Jul 23, 2026, 5:40:25 PM (2 days ago) Jul 23
                  to Surface Embed Reviews, Keren Zhu, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, Zhe Su, tburkar...@chromium.org, gavin...@chromium.org, prerenderi...@chromium.org, droger+w...@chromium.org, kinuko...@chromium.org, alexmo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, creis...@chromium.org, ipc-securi...@chromium.org, keithle...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org

                  Cammie Smith Barnes added 1 comment

                  File content/browser/renderer_host/render_widget_host_owner_delegate.h
                  Line 36, Patchset 17: virtual bool IsRenderViewHost() const;
                  Keren Zhu . resolved

                  Can we avoid adding this virtual method? The RenderView concept is being removed (see comment above this class).

                  Cammie Smith Barnes

                  Done

                  Open in Gerrit

                  Related details

                  Attention set is empty
                  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: Id971dd7f73673c52a11f1f5276150e472d2c9d0f
                  Gerrit-Change-Number: 8059786
                  Gerrit-PatchSet: 27
                  Gerrit-Owner: Cammie Smith Barnes <cam...@chromium.org>
                  Gerrit-Reviewer: Cammie Smith Barnes <cam...@chromium.org>
                  Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                  Gerrit-CC: Daniel Cheng <dch...@chromium.org>
                  Gerrit-CC: Surface Embed Reviews <surface-em...@google.com>
                  Gerrit-CC: Zhe Su <su...@chromium.org>
                  Gerrit-CC: gwsq
                  Gerrit-Comment-Date: Thu, 23 Jul 2026 21:40:14 +0000
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Cammie Smith Barnes (Gerrit)

                  unread,
                  Jul 23, 2026, 6:00:44 PM (2 days ago) Jul 23
                  to Surface Embed Reviews, Keren Zhu, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, Zhe Su, tburkar...@chromium.org, gavin...@chromium.org, prerenderi...@chromium.org, droger+w...@chromium.org, kinuko...@chromium.org, alexmo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, creis...@chromium.org, ipc-securi...@chromium.org, keithle...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org

                  Cammie Smith Barnes added 1 comment

                  File content/browser/renderer_host/render_view_host_impl.cc
                  Line 1040, Patchset 17: } else if (delegate_->IsEmbeddedViaSurfaceEmbed()) {
                  Keren Zhu . resolved

                  What will break without this change? If it breaks `CHECK`s, can you point me to them?

                  Currently, an surface-embedded Blink frame does not know about itself being embeded. This line will change that (via [CreateFrameParams::is_for_nested_main_frame](https://source.chromium.org/chromium/chromium/src/+/main:content/common/frame.mojom;l=361;drc=60df9044934a2841875904f21e9673afe970da1e) set to true due to [type != kTopLevel](https://source.chromium.org/chromium/chromium/src/+/main:content/browser/renderer_host/render_frame_host_impl.cc;l=4598;drc=03b18568967f29eb7d198a513c9be98291a5ce6c)). We want to make a surface-embedded frame behave like a top-level frame as much as possible, so I am curious if we can avoid this change.

                  Cammie Smith Barnes

                  Done

                  Open in Gerrit

                  Related details

                  Attention set is empty
                  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: Id971dd7f73673c52a11f1f5276150e472d2c9d0f
                  Gerrit-Change-Number: 8059786
                  Gerrit-PatchSet: 28
                  Gerrit-Owner: Cammie Smith Barnes <cam...@chromium.org>
                  Gerrit-Reviewer: Cammie Smith Barnes <cam...@chromium.org>
                  Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                  Gerrit-CC: Daniel Cheng <dch...@chromium.org>
                  Gerrit-CC: Surface Embed Reviews <surface-em...@google.com>
                  Gerrit-CC: Zhe Su <su...@chromium.org>
                  Gerrit-CC: gwsq
                  Gerrit-Comment-Date: Thu, 23 Jul 2026 22:00:25 +0000
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Cammie Smith Barnes (Gerrit)

                  unread,
                  Jul 24, 2026, 11:32:22 AM (17 hours ago) Jul 24
                  to Surface Embed Reviews, Keren Zhu, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, Zhe Su, tburkar...@chromium.org, gavin...@chromium.org, prerenderi...@chromium.org, droger+w...@chromium.org, kinuko...@chromium.org, alexmo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, creis...@chromium.org, ipc-securi...@chromium.org, keithle...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org
                  Attention needed from Keren Zhu

                  Cammie Smith Barnes added 1 comment

                  File content/browser/surface_embed/surface_embed_connector_impl_browsertest.cc
                  Line 1135, Patchset 17: ThrottlingPropagation) {
                  Keren Zhu . resolved

                  I think this test does not really test state propagation? e.g., the state is set then retrieved from connector. No IPC is involved. I think we need better test coverage.

                  Cammie Smith Barnes

                  Done

                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Keren Zhu
                  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: Id971dd7f73673c52a11f1f5276150e472d2c9d0f
                    Gerrit-Change-Number: 8059786
                    Gerrit-PatchSet: 30
                    Gerrit-Owner: Cammie Smith Barnes <cam...@chromium.org>
                    Gerrit-Reviewer: Cammie Smith Barnes <cam...@chromium.org>
                    Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                    Gerrit-CC: Daniel Cheng <dch...@chromium.org>
                    Gerrit-CC: Surface Embed Reviews <surface-em...@google.com>
                    Gerrit-CC: Zhe Su <su...@chromium.org>
                    Gerrit-CC: gwsq
                    Gerrit-Attention: Keren Zhu <kere...@chromium.org>
                    Gerrit-Comment-Date: Fri, 24 Jul 2026 15:32:11 +0000
                    satisfied_requirement
                    unsatisfied_requirement
                    open
                    diffy

                    Keren Zhu (Gerrit)

                    unread,
                    Jul 24, 2026, 11:37:23 PM (5 hours ago) Jul 24
                    to Cammie Smith Barnes, Surface Embed Reviews, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Daniel Cheng, Zhe Su, tburkar...@chromium.org, gavin...@chromium.org, prerenderi...@chromium.org, droger+w...@chromium.org, kinuko...@chromium.org, alexmo...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, creis...@chromium.org, ipc-securi...@chromium.org, keithle...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org
                    Attention needed from Cammie Smith Barnes

                    Keren Zhu voted and added 5 comments

                    Votes added by Keren Zhu

                    Code-Review+1

                    5 comments

                    Patchset-level comments
                    File-level comment, Patchset 32 (Latest):
                    Keren Zhu . resolved

                    Looks great, thanks!

                    File content/browser/surface_embed/surface_embed_connector_impl_browsertest.cc
                    Line 1146, Patchset 32 (Latest): context.rwhvcf = static_cast<RenderWidgetHostViewChildFrame*>(
                    static_cast<WebContentsImpl*>(context.child_web_contents.get())
                    ->GetRenderWidgetHostView());
                    ASSERT_TRUE(context.rwhvcf);

                    connector->SetView(context.rwhvcf, /*allow_paint_holding=*/false);

                    RenderWidgetHostImpl* child_rwh = context.rwhvcf->host();
                    ASSERT_TRUE(child_rwh);

                    mojo::AssociatedRemote<blink::mojom::FrameWidgetHost> blink_frame_widget_host;
                    auto blink_frame_widget_host_receiver =
                    blink_frame_widget_host.BindNewEndpointAndPassDedicatedReceiver();
                    mojo::AssociatedRemote<blink::mojom::FrameWidget> blink_frame_widget;
                    auto blink_frame_widget_receiver =
                    blink_frame_widget.BindNewEndpointAndPassDedicatedReceiver();
                    child_rwh->BindFrameWidgetInterfaces(
                    std::move(blink_frame_widget_host_receiver), blink_frame_widget.Unbind());
                    FakeFrameWidget fake_frame_widget(std::move(blink_frame_widget_receiver));
                    Keren Zhu . resolved

                    This test setup looks magical. Thanks for figuring out a way to test it.

                    File content/browser/web_contents/web_contents_impl.cc
                    Line 3417, Patchset 32 (Latest): if (auto* rwh = inner_web_contents_impl->GetPrimaryMainFrame()
                    ->GetRenderWidgetHost()) {
                    rwh->SynchronizeVisualProperties();
                    }
                    Keren Zhu . unresolved

                    q: (here and around L3714) this code affects only GuestView / GuestContents, not surface embed. Are they added for completeness?

                    File content/browser/web_contents/web_contents_impl_unittest.cc
                    Line 35, Patchset 32 (Latest):#include "content/browser/renderer_host/render_widget_host_factory.h"
                    Keren Zhu . unresolved

                    This can be removed?

                    File third_party/blink/renderer/core/frame/web_frame_widget_impl.cc
                    Line 924, Patchset 32 (Latest): DCHECK(ForSubframe() || widget_base_->is_embedded());
                    Keren Zhu . unresolved

                    nit: `widget_base_->is_embedded()` will be true for subframe, so this can be

                    ```suggestion
                    DCHECK(widget_base_->is_embedded());
                    ```
                    Open in Gerrit

                    Related details

                    Attention is currently required from:
                    • Cammie Smith Barnes
                    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: Id971dd7f73673c52a11f1f5276150e472d2c9d0f
                      Gerrit-Change-Number: 8059786
                      Gerrit-PatchSet: 32
                      Gerrit-Owner: Cammie Smith Barnes <cam...@chromium.org>
                      Gerrit-Reviewer: Cammie Smith Barnes <cam...@chromium.org>
                      Gerrit-Reviewer: Keren Zhu <kere...@chromium.org>
                      Gerrit-CC: Daniel Cheng <dch...@chromium.org>
                      Gerrit-CC: Surface Embed Reviews <surface-em...@google.com>
                      Gerrit-CC: Zhe Su <su...@chromium.org>
                      Gerrit-CC: gwsq
                      Gerrit-Attention: Cammie Smith Barnes <cam...@chromium.org>
                      Gerrit-Comment-Date: Sat, 25 Jul 2026 03:37:15 +0000
                      Gerrit-HasComments: Yes
                      Gerrit-Has-Labels: Yes
                      satisfied_requirement
                      unsatisfied_requirement
                      open
                      diffy
                      Reply all
                      Reply to author
                      Forward
                      0 new messages