media: Add Save Video Frame feature in Global Media Controls [chromium/src : main]

0 views
Skip to first unread message

Xiaohan Wang (Gerrit)

unread,
Apr 17, 2026, 12:21:28 PMApr 17
to Zijie He, android-bu...@system.gserviceaccount.com, AI Code Reviewer, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, Hongchan Choi, srirama chandra sekhar, fuchsia...@chromium.org, asvitkine...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, steimel+...@chromium.org

Xiaohan Wang added 1 comment

File third_party/blink/renderer/core/html/media/html_video_element.h
Line 292, Patchset 1: bool last_reported_video_frame_availability_ : 1 = false;
AI Code Reviewer . resolved

nit: Blink Style Guide: Naming - Precede boolean values with words like “is” and “did”. Consider renaming `last_reported_video_frame_availability_` to `is_last_reported_video_frame_available_` or `has_reported_video_frame_availability_`.

To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options:
**Done** | **OK But Won't Fix**: reason | **Later**: b/<bug_id> | **Invalid:** reason


_This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent)._
_AI reviews can sometimes be inaccurate; We appreciate your 🙏 feedback 🙏 to help us improve._
_[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_

Xiaohan Wang

Invalid: "video_frame_availability" is a boolean, and this is just to record the last state.

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: Id9c788ff8c35cb3e9f314d0ccf58783bbfcdaf52
Gerrit-Change-Number: 7770777
Gerrit-PatchSet: 6
Gerrit-Owner: Xiaohan Wang <xhw...@chromium.org>
Gerrit-Reviewer: Xiaohan Wang <xhw...@chromium.org>
Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Hongchan Choi <hong...@chromium.org>
Gerrit-CC: Michael Wilson <mjwi...@chromium.org>
Gerrit-CC: Zijie He <zij...@google.com>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Comment-Date: Fri, 17 Apr 2026 16:21:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Xiaohan Wang (Gerrit)

unread,
May 20, 2026, 1:43:46 AMMay 20
to Tommy Steimel, Zijie He, android-bu...@system.gserviceaccount.com, AI Code Reviewer, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, Hongchan Choi, srirama chandra sekhar, fuchsia...@chromium.org, asvitkine...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, steimel+...@chromium.org
Attention needed from Frank Liberato and Tommy Steimel

Xiaohan Wang added 2 comments

Patchset-level comments
File-level comment, Patchset 15 (Latest):
Xiaohan Wang . resolved

Sorry for the large CL size. I already create a prep refactor CL trying to reduce the diff, but I don't think I can make it smaller:

  • Tests should be associated with the CL
  • Icon is strongly recommended to be checked in in the same CL
  • Plumbing code touches a lot of files.

steimel: PTAL at everything, especially the GMC stack
liberato: General media/ OWNER

File components/vector_icons/video_frame_save.icon
Open in Gerrit

Related details

Attention is currently required from:
  • Frank Liberato
  • Tommy Steimel
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: Id9c788ff8c35cb3e9f314d0ccf58783bbfcdaf52
Gerrit-Change-Number: 7770777
Gerrit-PatchSet: 15
Gerrit-Owner: Xiaohan Wang <xhw...@chromium.org>
Gerrit-Reviewer: Frank Liberato <libe...@chromium.org>
Gerrit-Reviewer: Tommy Steimel <ste...@chromium.org>
Gerrit-Reviewer: Xiaohan Wang <xhw...@chromium.org>
Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Hongchan Choi <hong...@chromium.org>
Gerrit-CC: Michael Wilson <mjwi...@chromium.org>
Gerrit-CC: Zijie He <zij...@google.com>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Tommy Steimel <ste...@chromium.org>
Gerrit-Attention: Frank Liberato <libe...@chromium.org>
Gerrit-Comment-Date: Wed, 20 May 2026 05:43:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Xiaohan Wang (Gerrit)

unread,
May 20, 2026, 1:45:24 AMMay 20
to Tommy Steimel, Zijie He, android-bu...@system.gserviceaccount.com, AI Code Reviewer, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, Hongchan Choi, srirama chandra sekhar, fuchsia...@chromium.org, asvitkine...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, steimel+...@chromium.org
Attention needed from Frank Liberato and Tommy Steimel

Xiaohan Wang added 1 comment

File media/base/media_switches.cc
Line 716, Patchset 15 (Latest): base::FEATURE_DISABLED_BY_DEFAULT);
Xiaohan Wang . resolved

Will enable this after the IPH change (separate CL) and more testing.

Gerrit-Comment-Date: Wed, 20 May 2026 05:45:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Tommy Steimel (Gerrit)

unread,
May 20, 2026, 2:31:37 PMMay 20
to Zijie He, android-bu...@system.gserviceaccount.com, AI Code Reviewer, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, Hongchan Choi, srirama chandra sekhar, fuchsia...@chromium.org, asvitkine...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, steimel+...@chromium.org
Attention needed from Frank Liberato and Xiaohan Wang

Tommy Steimel added 7 comments

File content/browser/media/session/media_session_impl.cc
Line 1349, Patchset 16 (Latest): if (ShouldRouteAction(
media_session::mojom::MediaSessionAction::kSaveVideoFrame)) {
DidReceiveAction(media_session::mojom::MediaSessionAction::kSaveVideoFrame,
nullptr);
return;
}
Tommy Steimel . unresolved

Since this action isn't exposed in the JS, this will never be true, so you can delete this

File fuchsia_web/webengine/browser/media_player_impl.cc
Line 92, Patchset 16 (Latest): return fuchsia_media_sessions2::PlayerState::kIdle;
Tommy Steimel . unresolved

Why are you adding this?

File services/media_session/public/mojom/media_session.mojom
Line 254, Patchset 16 (Latest): [MinVersion=26] bool is_video_frame_available;
Tommy Steimel . unresolved

This should be MinVersion=25 and the next MinVersion should be 26

File third_party/blink/renderer/core/html/media/html_media_element_test.cc
Line 358, Patchset 16 (Latest): bool received_video_frame_availability_ = false;
Tommy Steimel . unresolved

Instead of using this, you could make `last_video_frame_availability_` a std::optional<bool>, and then you could tell when you have a value. Though if you want to match the rest of these, then you'd name it `received_video_frame_availability_`

Line 436, Patchset 16 (Parent):
Tommy Steimel . unresolved

Why are you removing this line?

File third_party/blink/renderer/core/html/media/html_video_element.cc
Line 371, Patchset 16 (Latest): if (!video_has_played_) {
Tommy Steimel . unresolved

Why are you changing this?

File third_party/blink/renderer/modules/mediasession/media_session.cc
Line 75, Patchset 16 (Latest): case MediaSessionAction::kSaveVideoFrame:
Tommy Steimel . unresolved

Is there a reason you're reordering these? It doesn't really matter I guess but it would make the blame harder to interpret

Open in Gerrit

Related details

Attention is currently required from:
  • Frank Liberato
  • Xiaohan Wang
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: Id9c788ff8c35cb3e9f314d0ccf58783bbfcdaf52
    Gerrit-Change-Number: 7770777
    Gerrit-PatchSet: 16
    Gerrit-Owner: Xiaohan Wang <xhw...@chromium.org>
    Gerrit-Reviewer: Frank Liberato <libe...@chromium.org>
    Gerrit-Reviewer: Tommy Steimel <ste...@chromium.org>
    Gerrit-Reviewer: Xiaohan Wang <xhw...@chromium.org>
    Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Hongchan Choi <hong...@chromium.org>
    Gerrit-CC: Michael Wilson <mjwi...@chromium.org>
    Gerrit-CC: Zijie He <zij...@google.com>
    Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
    Gerrit-Attention: Xiaohan Wang <xhw...@chromium.org>
    Gerrit-Attention: Frank Liberato <libe...@chromium.org>
    Gerrit-Comment-Date: Wed, 20 May 2026 18:31:28 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Zijie He (Gerrit)

    unread,
    May 20, 2026, 5:49:46 PMMay 20
    to Tommy Steimel, android-bu...@system.gserviceaccount.com, AI Code Reviewer, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, Hongchan Choi, srirama chandra sekhar, fuchsia...@chromium.org, asvitkine...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, steimel+...@chromium.org
    Attention needed from Frank Liberato and Xiaohan Wang

    Zijie He added 1 comment

    File fuchsia_web/webengine/browser/media_player_impl.cc
    Line 92, Patchset 16 (Latest): return fuchsia_media_sessions2::PlayerState::kIdle;
    Tommy Steimel . unresolved

    Why are you adding this?

    Zijie He

    🙏

    Gerrit-Comment-Date: Wed, 20 May 2026 21:49:37 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Tommy Steimel <ste...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Xiaohan Wang (Gerrit)

    unread,
    May 21, 2026, 9:59:16 PMMay 21
    to Tommy Steimel, Zijie He, android-bu...@system.gserviceaccount.com, AI Code Reviewer, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, Hongchan Choi, srirama chandra sekhar, fuchsia...@chromium.org, asvitkine...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, steimel+...@chromium.org
    Attention needed from Frank Liberato, Tommy Steimel and Zijie He

    Xiaohan Wang added 7 comments

    Patchset-level comments
    File-level comment, Patchset 18 (Latest):
    Xiaohan Wang . resolved

    Thanks for catching these issues, and I apologize that I didn't check the change thoroughly to catch them. PTAL again!

    File content/browser/media/session/media_session_impl.cc
    Line 1349, Patchset 16: if (ShouldRouteAction(

    media_session::mojom::MediaSessionAction::kSaveVideoFrame)) {
    DidReceiveAction(media_session::mojom::MediaSessionAction::kSaveVideoFrame,
    nullptr);
    return;
    }
    Tommy Steimel . resolved

    Since this action isn't exposed in the JS, this will never be true, so you can delete this

    Xiaohan Wang

    Done

    File fuchsia_web/webengine/browser/media_player_impl.cc
    Line 92, Patchset 16: return fuchsia_media_sessions2::PlayerState::kIdle;
    Tommy Steimel . resolved

    Why are you adding this?

    Zijie He

    🙏

    Xiaohan Wang

    Done

    File services/media_session/public/mojom/media_session.mojom
    Line 254, Patchset 16: [MinVersion=26] bool is_video_frame_available;
    Tommy Steimel . resolved

    This should be MinVersion=25 and the next MinVersion should be 26

    Xiaohan Wang

    Done

    File third_party/blink/renderer/core/html/media/html_media_element_test.cc
    Line 358, Patchset 16: bool received_video_frame_availability_ = false;
    Tommy Steimel . resolved

    Instead of using this, you could make `last_video_frame_availability_` a std::optional<bool>, and then you could tell when you have a value. Though if you want to match the rest of these, then you'd name it `received_video_frame_availability_`

    Xiaohan Wang

    Done

    File third_party/blink/renderer/core/html/media/html_video_element.cc
    Line 371, Patchset 16: if (!video_has_played_) {
    Tommy Steimel . resolved

    Why are you changing this?

    Xiaohan Wang

    Done

    File third_party/blink/renderer/modules/mediasession/media_session.cc
    Line 75, Patchset 16: case MediaSessionAction::kSaveVideoFrame:
    Tommy Steimel . resolved

    Is there a reason you're reordering these? It doesn't really matter I guess but it would make the blame harder to interpret

    Xiaohan Wang

    Was trying to match the MediaSessionAction declaration order, but you have a good point. Done.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Frank Liberato
    • Tommy Steimel
    • Zijie He
    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: Id9c788ff8c35cb3e9f314d0ccf58783bbfcdaf52
    Gerrit-Change-Number: 7770777
    Gerrit-PatchSet: 18
    Gerrit-Owner: Xiaohan Wang <xhw...@chromium.org>
    Gerrit-Reviewer: Frank Liberato <libe...@chromium.org>
    Gerrit-Reviewer: Tommy Steimel <ste...@chromium.org>
    Gerrit-Reviewer: Xiaohan Wang <xhw...@chromium.org>
    Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Hongchan Choi <hong...@chromium.org>
    Gerrit-CC: Michael Wilson <mjwi...@chromium.org>
    Gerrit-CC: Zijie He <zij...@google.com>
    Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
    Gerrit-Attention: Tommy Steimel <ste...@chromium.org>
    Gerrit-Attention: Zijie He <zij...@google.com>
    Gerrit-Attention: Frank Liberato <libe...@chromium.org>
    Gerrit-Comment-Date: Fri, 22 May 2026 01:59:03 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Tommy Steimel <ste...@chromium.org>
    Comment-In-Reply-To: Zijie He <zij...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Frank Liberato (Gerrit)

    unread,
    May 27, 2026, 12:32:37 PMMay 27
    to Code Review Nudger, Tommy Steimel, Zijie He, android-bu...@system.gserviceaccount.com, AI Code Reviewer, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, Hongchan Choi, srirama chandra sekhar, fuchsia...@chromium.org, asvitkine...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, steimel+...@chromium.org
    Attention needed from Tommy Steimel, Xiaohan Wang and Zijie He

    Frank Liberato added 1 comment

    Patchset-level comments
    File-level comment, Patchset 19 (Latest):
    Frank Liberato . resolved

    moving myself to cc since i think Tommy is reviewing ~everything i own except media_switches (which lgtm).

    -fl

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Tommy Steimel
    • Xiaohan Wang
    • Zijie He
    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: Id9c788ff8c35cb3e9f314d0ccf58783bbfcdaf52
    Gerrit-Change-Number: 7770777
    Gerrit-PatchSet: 19
    Gerrit-Owner: Xiaohan Wang <xhw...@chromium.org>
    Gerrit-Reviewer: Tommy Steimel <ste...@chromium.org>
    Gerrit-Reviewer: Xiaohan Wang <xhw...@chromium.org>
    Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-CC: Frank Liberato <libe...@chromium.org>
    Gerrit-CC: Hongchan Choi <hong...@chromium.org>
    Gerrit-CC: Michael Wilson <mjwi...@chromium.org>
    Gerrit-CC: Zijie He <zij...@google.com>
    Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
    Gerrit-Attention: Tommy Steimel <ste...@chromium.org>
    Gerrit-Attention: Zijie He <zij...@google.com>
    Gerrit-Attention: Xiaohan Wang <xhw...@chromium.org>
    Gerrit-Comment-Date: Wed, 27 May 2026 16:32:27 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Tommy Steimel (Gerrit)

    unread,
    May 28, 2026, 10:11:45 AMMay 28
    to Code Review Nudger, Zijie He, android-bu...@system.gserviceaccount.com, AI Code Reviewer, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, Hongchan Choi, srirama chandra sekhar, fuchsia...@chromium.org, asvitkine...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, steimel+...@chromium.org
    Attention needed from Xiaohan Wang and Zijie He

    Tommy Steimel added 2 comments

    File services/media_session/public/mojom/media_session.mojom
    Line 254, Patchset 19 (Latest): [MinVersion=25] bool is_video_frame_available;
    Tommy Steimel . unresolved

    Instead of adding this bool to the session info, should we instead just add the action to the list of actions? So the in `MediaSessionImpl::OnVideoFrameAvailabilityChanged()` we'd call `MediaSessionImpl::RebuildAndNotifyActionsChanged()` and in there we'd decide whether or not to add the action. Then in `MediaItemUIUpdatedView::UpdateMediaActionButtonsVisibility()` we can depend on the usual logic (though with a temporary check for the feature flag). As it stands we've added this new action but it acts differently

    File third_party/blink/renderer/core/html/media/html_media_element_test.cc
    Tommy Steimel . resolved

    Why are you removing this line?

    Tommy Steimel

    Marked as resolved.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Xiaohan Wang
    • Zijie He
    Gerrit-Attention: Zijie He <zij...@google.com>
    Gerrit-Attention: Xiaohan Wang <xhw...@chromium.org>
    Gerrit-Comment-Date: Thu, 28 May 2026 14:11:38 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Tommy Steimel <ste...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Xiaohan Wang (Gerrit)

    unread,
    Jun 24, 2026, 4:35:46 PM (16 hours ago) Jun 24
    to Code Review Nudger, Tommy Steimel, Zijie He, android-bu...@system.gserviceaccount.com, AI Code Reviewer, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, Hongchan Choi, srirama chandra sekhar, fuchsia...@chromium.org, asvitkine...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, steimel+...@chromium.org
    Attention needed from Zijie He

    Xiaohan Wang added 1 comment

    Patchset-level comments
    Xiaohan Wang . resolved

    Sorry for being silent. I did plan to work on this but got distracted. I'll resume working on this soon.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Zijie He
    Gerrit-Comment-Date: Wed, 24 Jun 2026 20:35:34 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages