[OmniboxEverywhere][3/5] Implement screenshare Mojo definitions, capturing, and unit tests [chromium/src : main]

0 views
Skip to first unread message

Hamzah Behery (Gerrit)

unread,
Aug 7, 2026, 11:41:30 AM (9 days ago) Aug 7
to Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, pauladed...@google.com, jdonnel...@chromium.org, christia...@chromium.org, feature-me...@chromium.org, chfreme...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, niharm...@google.com, omnibox-...@chromium.org, orinj...@chromium.org

Hamzah Behery added 1 comment

Patchset-level comments
File-level comment, Patchset 12 (Latest):
Hamzah Behery . resolved

Comment for future reference: patchset 12 implements the native screenpicker

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: Ic35cc192c6e083ae3ab539c99f0d061d9bc25d97
Gerrit-Change-Number: 8177769
Gerrit-PatchSet: 12
Gerrit-Owner: Hamzah Behery <beh...@chromium.org>
Gerrit-Reviewer: Hamzah Behery <beh...@chromium.org>
Gerrit-CC: Andrew Rayskiy <green...@google.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: Simon Hangl <sim...@google.com>
Gerrit-Comment-Date: Fri, 07 Aug 2026 15:41:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Hamzah Behery (Gerrit)

unread,
Aug 11, 2026, 12:44:00 AM (6 days ago) Aug 11
to Tove Petersson, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, chfreme...@chromium.org, christia...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, niharm...@google.com, omnibox-...@chromium.org, orinj...@chromium.org, pauladed...@google.com
Attention needed from Tove Petersson

Hamzah Behery voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Tove Petersson
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: I59a3dba3ca4e9c372d2f67c5ec4c18a0f803d23d
Gerrit-Change-Number: 8229077
Gerrit-PatchSet: 4
Gerrit-Owner: Hamzah Behery <beh...@chromium.org>
Gerrit-Reviewer: Hamzah Behery <beh...@chromium.org>
Gerrit-Reviewer: Tove Petersson <to...@chromium.org>
Gerrit-CC: Andrew Rayskiy <green...@google.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: Simon Hangl <sim...@google.com>
Gerrit-Attention: Tove Petersson <to...@chromium.org>
Gerrit-Comment-Date: Tue, 11 Aug 2026 04:43:48 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

gwsq (Gerrit)

unread,
Aug 11, 2026, 11:27:56 AM (5 days ago) Aug 11
to Hamzah Behery, Chromium IPC Reviews, Ken Buchanan, Ari Chivukula, Nihar Majmudar, Juliet Lévesque Knighton, Foromo Daniel Soromou, Tove Petersson, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, chfreme...@chromium.org, christia...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, niharm...@google.com, omnibox-...@chromium.org, orinj...@chromium.org, pauladed...@google.com
Attention needed from Ari Chivukula, Foromo Daniel Soromou, Juliet Lévesque Knighton, Ken Buchanan, Nihar Majmudar and Tove Petersson

Message from gwsq

From googleclient/chrome/chromium_gwsq/ipc/config.gwsq:
Shadow: ari...@chromium.org; IPC: ke...@chromium.org

📎 It looks like you’re making a possibly security-sensitive change! 📎 IPC security review isn’t a rubberstamp, so your friendly security reviewer will need a fair amount of context to review your CL effectively. Please review your CL description and code comments to make sure they provide context for someone unfamiliar with your project/area. Pay special attention to where data comes from and which processes it flows between (and their privilege levels). Feel free to point your security reviewer at design docs, bugs, or other links if you can’t reasonably make a self-contained CL description. (Also see https://cbea.ms/git-commit/).

Shadow IPC reviewer(s): ari...@chromium.org. Please conduct an IPC review and CR+1 when satisfied. Remember to add the main reviewers to the attention set if needed.

Main IPC reviewer(s): ke...@chromium.org. Please wait for the shadowed IPC reviewer to CR+1 before reviewing.

Shadowed: ari...@chromium.org

Reviewer source(s):
ari...@chromium.org, ke...@chromium.org is from context(googleclient/chrome/chromium_gwsq/ipc/config.gwsq)

Open in Gerrit

Related details

Attention is currently required from:
  • Ari Chivukula
  • Foromo Daniel Soromou
  • Juliet Lévesque Knighton
  • Ken Buchanan
  • Nihar Majmudar
  • Tove Petersson
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: I59a3dba3ca4e9c372d2f67c5ec4c18a0f803d23d
Gerrit-Change-Number: 8229077
Gerrit-PatchSet: 5
Gerrit-Owner: Hamzah Behery <beh...@chromium.org>
Gerrit-Reviewer: Ari Chivukula <ari...@chromium.org>
Gerrit-Reviewer: Foromo Daniel Soromou <koreta...@chromium.org>
Gerrit-Reviewer: Hamzah Behery <beh...@chromium.org>
Gerrit-Reviewer: Juliet Lévesque Knighton <julietl...@google.com>
Gerrit-Reviewer: Ken Buchanan <ke...@chromium.org>
Gerrit-Reviewer: Nihar Majmudar <nih...@google.com>
Gerrit-Reviewer: Tove Petersson <to...@chromium.org>
Gerrit-CC: Andrew Rayskiy <green...@google.com>
Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: Simon Hangl <sim...@google.com>
Gerrit-CC: gwsq
Gerrit-Attention: Nihar Majmudar <nih...@google.com>
Gerrit-Attention: Ken Buchanan <ke...@chromium.org>
Gerrit-Attention: Ari Chivukula <ari...@chromium.org>
Gerrit-Attention: Juliet Lévesque Knighton <julietl...@google.com>
Gerrit-Attention: Tove Petersson <to...@chromium.org>
Gerrit-Attention: Foromo Daniel Soromou <koreta...@chromium.org>
Gerrit-Comment-Date: Tue, 11 Aug 2026 15:27:40 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Ari Chivukula (Gerrit)

unread,
Aug 11, 2026, 12:26:33 PM (5 days ago) Aug 11
to Hamzah Behery, Chromium IPC Reviews, Ken Buchanan, Nihar Majmudar, Juliet Lévesque Knighton, Foromo Daniel Soromou, Tove Petersson, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, chfreme...@chromium.org, christia...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, niharm...@google.com, omnibox-...@chromium.org, orinj...@chromium.org, pauladed...@google.com
Attention needed from Foromo Daniel Soromou, Hamzah Behery, Juliet Lévesque Knighton, Ken Buchanan, Nihar Majmudar and Tove Petersson

Ari Chivukula voted and added 2 comments

Votes added by Ari Chivukula

Code-Review+1

2 comments

Patchset-level comments
File-level comment, Patchset 5 (Latest):
Ari Chivukula . resolved

(shadow IPC) LGTM

File components/omnibox/browser/searchbox.mojom
Line 560, Patchset 5 (Latest): StartScreenshare(bool entire_screen)
Ari Chivukula . unresolved

nit: maybe note entire_screen is just a hint for the picker and not enforced. Maybe `prefer_entire_screen`

Open in Gerrit

Related details

Attention is currently required from:
  • Foromo Daniel Soromou
  • Hamzah Behery
  • Juliet Lévesque Knighton
  • Ken Buchanan
  • Nihar Majmudar
  • Tove Petersson
    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: I59a3dba3ca4e9c372d2f67c5ec4c18a0f803d23d
      Gerrit-Change-Number: 8229077
      Gerrit-PatchSet: 5
      Gerrit-Owner: Hamzah Behery <beh...@chromium.org>
      Gerrit-Reviewer: Ari Chivukula <ari...@chromium.org>
      Gerrit-Reviewer: Foromo Daniel Soromou <koreta...@chromium.org>
      Gerrit-Reviewer: Hamzah Behery <beh...@chromium.org>
      Gerrit-Reviewer: Juliet Lévesque Knighton <julietl...@google.com>
      Gerrit-Reviewer: Ken Buchanan <ke...@chromium.org>
      Gerrit-Reviewer: Nihar Majmudar <nih...@google.com>
      Gerrit-Reviewer: Tove Petersson <to...@chromium.org>
      Gerrit-CC: Andrew Rayskiy <green...@google.com>
      Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
      Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
      Gerrit-CC: Simon Hangl <sim...@google.com>
      Gerrit-CC: gwsq
      Gerrit-Attention: Nihar Majmudar <nih...@google.com>
      Gerrit-Attention: Hamzah Behery <beh...@chromium.org>
      Gerrit-Attention: Ken Buchanan <ke...@chromium.org>
      Gerrit-Attention: Juliet Lévesque Knighton <julietl...@google.com>
      Gerrit-Attention: Tove Petersson <to...@chromium.org>
      Gerrit-Attention: Foromo Daniel Soromou <koreta...@chromium.org>
      Gerrit-Comment-Date: Tue, 11 Aug 2026 16:26:22 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Ari Chivukula (Gerrit)

      unread,
      Aug 11, 2026, 12:29:07 PM (5 days ago) Aug 11
      to Hamzah Behery, Chromium IPC Reviews, Ken Buchanan, Nihar Majmudar, Juliet Lévesque Knighton, Foromo Daniel Soromou, Tove Petersson, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, chfreme...@chromium.org, christia...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, niharm...@google.com, omnibox-...@chromium.org, orinj...@chromium.org, pauladed...@google.com
      Attention needed from Foromo Daniel Soromou, Hamzah Behery, Juliet Lévesque Knighton, Ken Buchanan, Nihar Majmudar and Tove Petersson

      Ari Chivukula voted and added 1 comment

      Votes added by Ari Chivukula

      Code-Review+0

      1 comment

      Patchset-level comments
      Ari Chivukula . unresolved

      actually wait, is the returned token not used anywhere? I'm a little worried about exposing info that isn't used/checked in some way

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Foromo Daniel Soromou
      • Hamzah Behery
      • Juliet Lévesque Knighton
      • Ken Buchanan
      • Nihar Majmudar
      • Tove Petersson
      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
        Gerrit-Comment-Date: Tue, 11 Aug 2026 16:29:00 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Hamzah Behery (Gerrit)

        unread,
        Aug 11, 2026, 3:34:30 PM (5 days ago) Aug 11
        to Ari Chivukula, Chromium IPC Reviews, Ken Buchanan, Nihar Majmudar, Juliet Lévesque Knighton, Foromo Daniel Soromou, Tove Petersson, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, chfreme...@chromium.org, christia...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, niharm...@google.com, omnibox-...@chromium.org, orinj...@chromium.org, pauladed...@google.com
        Attention needed from Ari Chivukula, Foromo Daniel Soromou, Juliet Lévesque Knighton, Ken Buchanan, Nihar Majmudar and Tove Petersson

        Hamzah Behery added 2 comments

        Patchset-level comments
        Ari Chivukula . unresolved

        actually wait, is the returned token not used anywhere? I'm a little worried about exposing info that isn't used/checked in some way

        Hamzah Behery

        not currently, but I intend to implement the token's use in a subsequent CL in this stack to manage the screensharing state on the frontend.

        should follow a similar pattern for image uploads:
        when the WebUI invokes startScreenshare(), it receives the token in the promise resolution. It uses this token synchronously to open the chat window and show a loading placeholder chip. When the screenshot processing is finished, the browser process calls addFileContext(token, file_info) asynchronously, and the WebUI uses the token to match the file info (and base64 image data) to the placeholder chip.

        File components/omnibox/browser/searchbox.mojom
        Line 560, Patchset 5 (Latest): StartScreenshare(bool entire_screen)
        Ari Chivukula . resolved

        nit: maybe note entire_screen is just a hint for the picker and not enforced. Maybe `prefer_entire_screen`

        Hamzah Behery

        Done

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Ari Chivukula
        • Foromo Daniel Soromou
        Gerrit-Attention: Ken Buchanan <ke...@chromium.org>
        Gerrit-Attention: Ari Chivukula <ari...@chromium.org>
        Gerrit-Attention: Juliet Lévesque Knighton <julietl...@google.com>
        Gerrit-Attention: Tove Petersson <to...@chromium.org>
        Gerrit-Attention: Foromo Daniel Soromou <koreta...@chromium.org>
        Gerrit-Comment-Date: Tue, 11 Aug 2026 19:34:22 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Ari Chivukula <ari...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Ari Chivukula (Gerrit)

        unread,
        Aug 11, 2026, 3:36:37 PM (5 days ago) Aug 11
        to Hamzah Behery, Chromium IPC Reviews, Ken Buchanan, Nihar Majmudar, Juliet Lévesque Knighton, Foromo Daniel Soromou, Tove Petersson, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, chfreme...@chromium.org, christia...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, niharm...@google.com, omnibox-...@chromium.org, orinj...@chromium.org, pauladed...@google.com
        Attention needed from Foromo Daniel Soromou, Hamzah Behery, Juliet Lévesque Knighton, Ken Buchanan, Nihar Majmudar and Tove Petersson

        Ari Chivukula voted and added 1 comment

        Votes added by Ari Chivukula

        Code-Review+1

        1 comment

        Patchset-level comments
        Ari Chivukula . unresolved

        actually wait, is the returned token not used anywhere? I'm a little worried about exposing info that isn't used/checked in some way

        Hamzah Behery

        not currently, but I intend to implement the token's use in a subsequent CL in this stack to manage the screensharing state on the frontend.

        should follow a similar pattern for image uploads:
        when the WebUI invokes startScreenshare(), it receives the token in the promise resolution. It uses this token synchronously to open the chat window and show a loading placeholder chip. When the screenshot processing is finished, the browser process calls addFileContext(token, file_info) asynchronously, and the WebUI uses the token to match the file info (and base64 image data) to the placeholder chip.

        Ari Chivukula

        okay that seems reasonable, leaving open for primary IPC reviewer

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Foromo Daniel Soromou
        • Hamzah Behery
        • Juliet Lévesque Knighton
        • Ken Buchanan
        • Nihar Majmudar
        • Tove Petersson
          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: I59a3dba3ca4e9c372d2f67c5ec4c18a0f803d23d
            Gerrit-Change-Number: 8229077
            Gerrit-PatchSet: 5
            Gerrit-Owner: Hamzah Behery <beh...@chromium.org>
            Gerrit-Reviewer: Ari Chivukula <ari...@chromium.org>
            Gerrit-Reviewer: Foromo Daniel Soromou <koreta...@chromium.org>
            Gerrit-Reviewer: Hamzah Behery <beh...@chromium.org>
            Gerrit-Reviewer: Juliet Lévesque Knighton <julietl...@google.com>
            Gerrit-Reviewer: Ken Buchanan <ke...@chromium.org>
            Gerrit-Reviewer: Nihar Majmudar <nih...@google.com>
            Gerrit-Reviewer: Tove Petersson <to...@chromium.org>
            Gerrit-CC: Andrew Rayskiy <green...@google.com>
            Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
            Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
            Gerrit-CC: Simon Hangl <sim...@google.com>
            Gerrit-CC: gwsq
            Gerrit-Attention: Nihar Majmudar <nih...@google.com>
            Gerrit-Attention: Hamzah Behery <beh...@chromium.org>
            Gerrit-Attention: Ken Buchanan <ke...@chromium.org>
            Gerrit-Attention: Juliet Lévesque Knighton <julietl...@google.com>
            Gerrit-Attention: Tove Petersson <to...@chromium.org>
            Gerrit-Attention: Foromo Daniel Soromou <koreta...@chromium.org>
            Gerrit-Comment-Date: Tue, 11 Aug 2026 19:36:30 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            Comment-In-Reply-To: Hamzah Behery <beh...@chromium.org>
            Comment-In-Reply-To: Ari Chivukula <ari...@chromium.org>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Juliet Lévesque Knighton (Gerrit)

            unread,
            Aug 11, 2026, 4:50:10 PM (5 days ago) Aug 11
            to Hamzah Behery, Ari Chivukula, Chromium IPC Reviews, Ken Buchanan, Nihar Majmudar, Foromo Daniel Soromou, Tove Petersson, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, chfreme...@chromium.org, christia...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, niharm...@google.com, omnibox-...@chromium.org, orinj...@chromium.org, pauladed...@google.com
            Attention needed from Foromo Daniel Soromou, Hamzah Behery, Ken Buchanan, Nihar Majmudar and Tove Petersson

            Juliet Lévesque Knighton added 8 comments

            File chrome/browser/ui/webui/cr_components/searchbox/contextual_searchbox_handler.h
            Line 319, Patchset 5 (Latest): void set_bypass_ui_manager_for_testing(bool bypass) {
            Juliet Lévesque Knighton . unresolved

            nit: is this and `bypass_ui_manager_for_testing_` needed? I don't see them used in any tests

            File chrome/browser/ui/webui/cr_components/searchbox/contextual_searchbox_handler.cc
            Line 62, Patchset 5 (Latest):#include "chrome/browser/media/webrtc/desktop_media_picker.h" // nogncheck
            #include "chrome/browser/media/webrtc/desktop_media_picker_controller.h" // nogncheck
            #include "chrome/browser/media/webrtc/desktop_media_picker_factory_impl.h" // nogncheck
            #include "chrome/browser/ui/browser_window/public/profile_browser_collection.h"
            #include "chrome/browser/ui/omnibox/omnibox_everywhere/omnibox_everywhere_ui_manager.h" // nogncheck
            Juliet Lévesque Knighton . unresolved

            Why do we need // nogncheck here? Can these be added to the BUILD file instead?

            Line 66, Patchset 5 (Latest):#include "chrome/browser/ui/omnibox/omnibox_everywhere/omnibox_everywhere_ui_manager.h" // nogncheck
            Juliet Lévesque Knighton . unresolved

            nit: needed? I don't see this used anywhere

            Line 2382, Patchset 5 (Latest): screenshare_picker_controller_ =
            Juliet Lévesque Knighton . unresolved

            Is there any chance that screenshare_picker_controller_ already exists here (a screen share is already in session) and we are rewriting this field? consider adding a guard at the beginning of StartScreenshare or FallbackToChromeDefaultPicker to check if this is already active

            Line 2432, Patchset 5 (Latest): is_capturing_ = true;
            Juliet Lévesque Knighton . unresolved

            similar concern here: should we check to see if we are already capturing something (check if is_capturing_ is true) before continuing this logic?

            Line 2449, Patchset 5 (Latest): ContextualSearchboxHandler::ProcessedScreenshot result;
            Juliet Lévesque Knighton . unresolved

            nit: is it expected that we never populate thumbnail_data_url?

            Line 2494, Patchset 5 (Latest): file_info_mojom->file_name = "Screenshot.png";
            file_info_mojom->mime_type = "image/png";
            Juliet Lévesque Knighton . unresolved

            nit: consider these hard coded strings that are used in multiple places moving to a constant in the anon namespace

            File chrome/browser/ui/webui/searchbox/contextual_searchbox_handler_unittest.cc
            Line 97, Patchset 5 (Latest):#include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h"
            Juliet Lévesque Knighton . unresolved

            nit: needed? I don't see this used anywhere (same with the DEPS file)

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Foromo Daniel Soromou
            • Hamzah Behery
            Gerrit-Attention: Tove Petersson <to...@chromium.org>
            Gerrit-Attention: Foromo Daniel Soromou <koreta...@chromium.org>
            Gerrit-Comment-Date: Tue, 11 Aug 2026 20:49:47 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Ken Buchanan (Gerrit)

            unread,
            Aug 11, 2026, 5:27:14 PM (5 days ago) Aug 11
            to Hamzah Behery, Ari Chivukula, Chromium IPC Reviews, Nihar Majmudar, Juliet Lévesque Knighton, Foromo Daniel Soromou, Tove Petersson, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, chfreme...@chromium.org, christia...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, niharm...@google.com, omnibox-...@chromium.org, orinj...@chromium.org, pauladed...@google.com
            Attention needed from Foromo Daniel Soromou, Hamzah Behery, Nihar Majmudar and Tove Petersson

            Ken Buchanan voted and added 3 comments

            Votes added by Ken Buchanan

            Code-Review+1

            3 comments

            Patchset-level comments
            Ken Buchanan . resolved

            lgtm with one comment

            Ari Chivukula . resolved

            actually wait, is the returned token not used anywhere? I'm a little worried about exposing info that isn't used/checked in some way

            Hamzah Behery

            not currently, but I intend to implement the token's use in a subsequent CL in this stack to manage the screensharing state on the frontend.

            should follow a similar pattern for image uploads:
            when the WebUI invokes startScreenshare(), it receives the token in the promise resolution. It uses this token synchronously to open the chat window and show a loading placeholder chip. When the screenshot processing is finished, the browser process calls addFileContext(token, file_info) asynchronously, and the WebUI uses the token to match the file info (and base64 image data) to the placeholder chip.

            Ari Chivukula

            okay that seems reasonable, leaving open for primary IPC reviewer

            Ken Buchanan

            I agree that it's reasonable.

            File components/omnibox/browser/searchbox.mojom
            Line 559, Patchset 5 (Latest): // Triggers screensharing (window or entire screen picker).
            Ken Buchanan . unresolved

            The comment should mention the purpose of the token and when it will return null.

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Foromo Daniel Soromou
            • Hamzah Behery
            • Nihar Majmudar
            • Tove Petersson
            Gerrit-Attention: Tove Petersson <to...@chromium.org>
            Gerrit-Attention: Foromo Daniel Soromou <koreta...@chromium.org>
            Gerrit-Comment-Date: Tue, 11 Aug 2026 21:27:03 +0000
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Hamzah Behery (Gerrit)

            unread,
            Aug 12, 2026, 1:58:13 AM (4 days ago) Aug 12
            to Ken Buchanan, Ari Chivukula, Chromium IPC Reviews, Nihar Majmudar, Juliet Lévesque Knighton, Foromo Daniel Soromou, Tove Petersson, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, chfreme...@chromium.org, christia...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, niharm...@google.com, omnibox-...@chromium.org, orinj...@chromium.org, pauladed...@google.com
            Attention needed from Foromo Daniel Soromou, Juliet Lévesque Knighton, Nihar Majmudar and Tove Petersson

            Hamzah Behery added 9 comments

            File chrome/browser/ui/webui/cr_components/searchbox/contextual_searchbox_handler.h
            Line 319, Patchset 5: void set_bypass_ui_manager_for_testing(bool bypass) {
            Juliet Lévesque Knighton . resolved

            nit: is this and `bypass_ui_manager_for_testing_` needed? I don't see them used in any tests

            Hamzah Behery

            Done

            File chrome/browser/ui/webui/cr_components/searchbox/contextual_searchbox_handler.cc
            Line 66, Patchset 5:#include "chrome/browser/ui/omnibox/omnibox_everywhere/omnibox_everywhere_ui_manager.h" // nogncheck
            Juliet Lévesque Knighton . resolved

            nit: needed? I don't see this used anywhere

            Hamzah Behery

            removed

            Line 62, Patchset 5:#include "chrome/browser/media/webrtc/desktop_media_picker.h" // nogncheck

            #include "chrome/browser/media/webrtc/desktop_media_picker_controller.h" // nogncheck
            #include "chrome/browser/media/webrtc/desktop_media_picker_factory_impl.h" // nogncheck
            #include "chrome/browser/ui/browser_window/public/profile_browser_collection.h"
            #include "chrome/browser/ui/omnibox/omnibox_everywhere/omnibox_everywhere_ui_manager.h" // nogncheck
            Juliet Lévesque Knighton . resolved

            Why do we need // nogncheck here? Can these be added to the BUILD file instead?

            Hamzah Behery

            These were previously causing CQ to fail despite being inside the build flags, added to DEPS to fix this

            Line 2382, Patchset 5: screenshare_picker_controller_ =
            Juliet Lévesque Knighton . resolved

            Is there any chance that screenshare_picker_controller_ already exists here (a screen share is already in session) and we are rewriting this field? consider adding a guard at the beginning of StartScreenshare or FallbackToChromeDefaultPicker to check if this is already active

            Hamzah Behery

            Done

            Line 2432, Patchset 5: is_capturing_ = true;
            Juliet Lévesque Knighton . resolved

            similar concern here: should we check to see if we are already capturing something (check if is_capturing_ is true) before continuing this logic?

            Hamzah Behery

            Done

            Line 2449, Patchset 5: ContextualSearchboxHandler::ProcessedScreenshot result;
            Juliet Lévesque Knighton . resolved

            nit: is it expected that we never populate thumbnail_data_url?

            Hamzah Behery

            currently yes. populating `thumbnail_data_url` is to be implemented in a subsequent CL in this stack (crrev.com/c/8232123) to keep this CL more focused. added a TODO comment to address this

            Line 2494, Patchset 5: file_info_mojom->file_name = "Screenshot.png";
            file_info_mojom->mime_type = "image/png";
            Juliet Lévesque Knighton . resolved

            nit: consider these hard coded strings that are used in multiple places moving to a constant in the anon namespace

            Hamzah Behery

            Done

            File chrome/browser/ui/webui/searchbox/contextual_searchbox_handler_unittest.cc
            Line 97, Patchset 5:#include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h"
            Juliet Lévesque Knighton . resolved

            nit: needed? I don't see this used anywhere (same with the DEPS file)

            Hamzah Behery

            unless Im mistaken, this is needed to implement `FakeDesktopCapturer` on line 3891

            File components/omnibox/browser/searchbox.mojom
            Line 559, Patchset 5: // Triggers screensharing (window or entire screen picker).
            Ken Buchanan . resolved

            The comment should mention the purpose of the token and when it will return null.

            Hamzah Behery

            Done

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Foromo Daniel Soromou
            • Juliet Lévesque Knighton
            • Nihar Majmudar
            • Tove Petersson
            Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement is not satisfiedCode-Owners
              • requirement satisfiedCode-Review
              • 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: I59a3dba3ca4e9c372d2f67c5ec4c18a0f803d23d
              Gerrit-Change-Number: 8229077
              Gerrit-PatchSet: 6
              Gerrit-Owner: Hamzah Behery <beh...@chromium.org>
              Gerrit-Reviewer: Ari Chivukula <ari...@chromium.org>
              Gerrit-Reviewer: Foromo Daniel Soromou <koreta...@chromium.org>
              Gerrit-Reviewer: Hamzah Behery <beh...@chromium.org>
              Gerrit-Reviewer: Juliet Lévesque Knighton <julietl...@google.com>
              Gerrit-Reviewer: Ken Buchanan <ke...@chromium.org>
              Gerrit-Reviewer: Nihar Majmudar <nih...@google.com>
              Gerrit-Reviewer: Tove Petersson <to...@chromium.org>
              Gerrit-CC: Andrew Rayskiy <green...@google.com>
              Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
              Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
              Gerrit-CC: Simon Hangl <sim...@google.com>
              Gerrit-CC: gwsq
              Gerrit-Attention: Nihar Majmudar <nih...@google.com>
              Gerrit-Attention: Juliet Lévesque Knighton <julietl...@google.com>
              Gerrit-Attention: Tove Petersson <to...@chromium.org>
              Gerrit-Attention: Foromo Daniel Soromou <koreta...@chromium.org>
              Gerrit-Comment-Date: Wed, 12 Aug 2026 05:57:54 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              Comment-In-Reply-To: Ken Buchanan <ke...@chromium.org>
              Comment-In-Reply-To: Juliet Lévesque Knighton <julietl...@google.com>
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Juliet Lévesque Knighton (Gerrit)

              unread,
              Aug 12, 2026, 5:29:44 PM (4 days ago) Aug 12
              to Hamzah Behery, Ken Buchanan, Ari Chivukula, Chromium IPC Reviews, Nihar Majmudar, Foromo Daniel Soromou, Tove Petersson, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, chfreme...@chromium.org, christia...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, niharm...@google.com, omnibox-...@chromium.org, orinj...@chromium.org, pauladed...@google.com
              Attention needed from Foromo Daniel Soromou, Hamzah Behery, Nihar Majmudar and Tove Petersson

              Juliet Lévesque Knighton voted and added 1 comment

              Votes added by Juliet Lévesque Knighton

              Code-Review+1

              1 comment

              Patchset-level comments
              Juliet Lévesque Knighton . resolved

              LGTM

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Foromo Daniel Soromou
              • Hamzah Behery
              • Nihar Majmudar
              • Tove Petersson
              Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement is not satisfiedCode-Owners
              • requirement satisfiedCode-Review
              • 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: I59a3dba3ca4e9c372d2f67c5ec4c18a0f803d23d
              Gerrit-Change-Number: 8229077
              Gerrit-PatchSet: 8
              Gerrit-Owner: Hamzah Behery <beh...@chromium.org>
              Gerrit-Reviewer: Ari Chivukula <ari...@chromium.org>
              Gerrit-Reviewer: Foromo Daniel Soromou <koreta...@chromium.org>
              Gerrit-Reviewer: Hamzah Behery <beh...@chromium.org>
              Gerrit-Reviewer: Juliet Lévesque Knighton <julietl...@google.com>
              Gerrit-Reviewer: Ken Buchanan <ke...@chromium.org>
              Gerrit-Reviewer: Nihar Majmudar <nih...@google.com>
              Gerrit-Reviewer: Tove Petersson <to...@chromium.org>
              Gerrit-CC: Andrew Rayskiy <green...@google.com>
              Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
              Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
              Gerrit-CC: Simon Hangl <sim...@google.com>
              Gerrit-CC: gwsq
              Gerrit-Attention: Nihar Majmudar <nih...@google.com>
              Gerrit-Attention: Hamzah Behery <beh...@chromium.org>
              Gerrit-Attention: Tove Petersson <to...@chromium.org>
              Gerrit-Attention: Foromo Daniel Soromou <koreta...@chromium.org>
              Gerrit-Comment-Date: Wed, 12 Aug 2026 21:29:36 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Foromo Daniel Soromou (Gerrit)

              unread,
              Aug 13, 2026, 9:20:29 AM (3 days ago) Aug 13
              to Hamzah Behery, Juliet Lévesque Knighton, Ken Buchanan, Ari Chivukula, Chromium IPC Reviews, Nihar Majmudar, Tove Petersson, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, chfreme...@chromium.org, christia...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, niharm...@google.com, omnibox-...@chromium.org, orinj...@chromium.org, pauladed...@google.com
              Attention needed from Hamzah Behery, Nihar Majmudar and Tove Petersson

              Foromo Daniel Soromou voted and added 1 comment

              Votes added by Foromo Daniel Soromou

              Code-Review+1

              1 comment

              File chrome/browser/ui/webui/searchbox/contextual_searchbox_handler_unittest.cc
              Line 219, Patchset 8: contextual_search::ContextualSearchSessionHandle*
              GetContextualSessionHandleForTesting() {
              return GetContextualSessionHandle();
              }
              Foromo Daniel Soromou . unresolved

              Unsed, please remove.

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Hamzah Behery
              • Nihar Majmudar
              • Tove Petersson
              Submit Requirements:
                • requirement satisfiedCode-Coverage
                • requirement is not satisfiedCode-Owners
                • requirement satisfiedCode-Review
                • requirement is not satisfiedNo-Unresolved-Comments
                • requirement satisfiedReview-Enforcement
                Gerrit-Comment-Date: Thu, 13 Aug 2026 13:20:15 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Tove Petersson (Gerrit)

                unread,
                Aug 13, 2026, 9:24:07 AM (3 days ago) Aug 13
                to Hamzah Behery, Foromo Daniel Soromou, Juliet Lévesque Knighton, Ken Buchanan, Ari Chivukula, Chromium IPC Reviews, Nihar Majmudar, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, chfreme...@chromium.org, christia...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, niharm...@google.com, omnibox-...@chromium.org, orinj...@chromium.org, pauladed...@google.com
                Attention needed from Hamzah Behery and Nihar Majmudar

                Tove Petersson voted and added 1 comment

                Votes added by Tove Petersson

                Code-Review+1

                1 comment

                Patchset-level comments
                File-level comment, Patchset 10 (Latest):
                Tove Petersson . resolved

                LGTM for chrome/browser/media/webrtc/fake_desktop_media_picker_factory.cc

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Hamzah Behery
                • Nihar Majmudar
                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: I59a3dba3ca4e9c372d2f67c5ec4c18a0f803d23d
                Gerrit-Change-Number: 8229077
                Gerrit-PatchSet: 10
                Gerrit-Owner: Hamzah Behery <beh...@chromium.org>
                Gerrit-Reviewer: Ari Chivukula <ari...@chromium.org>
                Gerrit-Reviewer: Foromo Daniel Soromou <koreta...@chromium.org>
                Gerrit-Reviewer: Hamzah Behery <beh...@chromium.org>
                Gerrit-Reviewer: Juliet Lévesque Knighton <julietl...@google.com>
                Gerrit-Reviewer: Ken Buchanan <ke...@chromium.org>
                Gerrit-Reviewer: Nihar Majmudar <nih...@google.com>
                Gerrit-Reviewer: Tove Petersson <to...@chromium.org>
                Gerrit-CC: Andrew Rayskiy <green...@google.com>
                Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
                Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
                Gerrit-CC: Simon Hangl <sim...@google.com>
                Gerrit-CC: gwsq
                Gerrit-Attention: Nihar Majmudar <nih...@google.com>
                Gerrit-Attention: Hamzah Behery <beh...@chromium.org>
                Gerrit-Comment-Date: Thu, 13 Aug 2026 13:23:56 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Nihar Majmudar (Gerrit)

                unread,
                Aug 13, 2026, 11:33:46 AM (3 days ago) Aug 13
                to Hamzah Behery, Tove Petersson, Foromo Daniel Soromou, Juliet Lévesque Knighton, Ken Buchanan, Ari Chivukula, Chromium IPC Reviews, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, chfreme...@chromium.org, christia...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, niharm...@google.com, omnibox-...@chromium.org, orinj...@chromium.org, pauladed...@google.com
                Attention needed from Hamzah Behery

                Nihar Majmudar added 8 comments

                File chrome/browser/ui/webui/cr_components/searchbox/contextual_searchbox_handler.h
                Line 550, Patchset 10: raw_ptr<DesktopMediaPickerFactory> picker_factory_ = nullptr;
                std::unique_ptr<content::desktop_capture::ScreenshotCaptureRequest>
                active_screenshot_request_;
                bool is_capturing_ = false;
                Nihar Majmudar . unresolved

                This can be move with the variable definition above? i.e. doesn't need separate buildflag

                Line 533, Patchset 10: void FallbackToChromeDefaultPicker(bool prefer_entire_screen,
                StartScreenshareCallback callback);
                void OnChromeDefaultPickerResults(StartScreenshareCallback callback,
                const std::string& err,
                content::DesktopMediaID source);
                void CaptureAndUploadScreenshot(content::DesktopMediaID source,
                StartScreenshareCallback callback);
                void OnScreenshotCaptured(StartScreenshareCallback callback,
                const SkBitmap& bitmap);
                void OnScreenshotRequestCreated(
                std::unique_ptr<content::desktop_capture::ScreenshotCaptureRequest>
                request);
                void OnScreenshotProcessed(StartScreenshareCallback callback,
                ProcessedScreenshot result);
                Nihar Majmudar . unresolved

                Can these be move to where the rest of the functions are defined? Not sure why there's some mixing of variable and function declaration above

                Line 314, Patchset 10:#if !BUILDFLAG(IS_ANDROID)
                void set_desktop_media_picker_factory_for_testing(
                DesktopMediaPickerFactory* factory) {
                picker_factory_ = factory;
                }
                #endif
                Nihar Majmudar . unresolved

                Can you combine with one of the other buildflags above

                File chrome/browser/ui/webui/cr_components/searchbox/contextual_searchbox_handler.cc
                Line 26, Patchset 10:#include "base/mac/mac_util.h"
                Nihar Majmudar . unresolved

                needed?

                Line 52, Patchset 10:#include "media/base/media_switches.h"
                #include "skia/ext/image_operations.h"
                #include "ui/base/base_window.h"
                #include "ui/base/mojom/ui_base_types.mojom-shared.h"
                #include "ui/gfx/geometry/size.h"

                #if !BUILDFLAG(IS_ANDROID)
                #include "base/base64.h"
                #include "base/compiler_specific.h"
                #include "base/task/bind_post_task.h"
                #include "chrome/browser/media/webrtc/desktop_media_picker.h"
                #include "chrome/browser/media/webrtc/desktop_media_picker_controller.h"
                #include "chrome/browser/media/webrtc/desktop_media_picker_factory_impl.h"
                #include "chrome/browser/ui/browser_window/public/profile_browser_collection.h"
                #include "chrome/browser/ui/omnibox/omnibox_everywhere_service.h"
                #include "chrome/browser/ui/omnibox/omnibox_everywhere_service_factory.h"
                #include "chrome/browser/ui/webui/top_chrome/webui_contents_wrapper.h"
                #include "chrome/grit/branded_strings.h"
                #include "content/public/browser/browser_thread.h"
                #include "content/public/browser/desktop_capture.h"
                #include "third_party/skia/include/core/SkCanvas.h"
                #include "third_party/skia/include/core/SkImage.h"
                #include "third_party/skia/include/core/SkPath.h"
                #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h"
                #include "ui/base/l10n/l10n_util.h"
                #include "ui/gfx/codec/png_codec.h"
                Nihar Majmudar . unresolved

                Can you make sure all of these are needed? Doesn't look like all of them are used but not sure

                Line 2451, Patchset 10:constexpr char kScreenshotFileName[] = "Screenshot.png";
                constexpr char kScreenshotMimeType[] = "image/png";

                ContextualSearchboxHandler::ProcessedScreenshot ProcessScreenshotInBackground(
                const SkBitmap& bitmap) {
                ContextualSearchboxHandler::ProcessedScreenshot result;
                std::optional<std::vector<uint8_t>> png_bytes =
                gfx::PNGCodec::EncodeBGRASkBitmap(bitmap,
                /*discard_transparency=*/false);
                if (png_bytes) {
                result.png_bytes = std::move(*png_bytes);
                }
                // TODO(crbug.com/532197177): Populate result.thumbnail_data_url with the
                // optimized base64 thumbnail URL.
                return result;
                }
                Nihar Majmudar . unresolved

                Move logic in namepsace at the top of file namespace?

                Line 2472, Patchset 10: is_capturing_ = false;
                Nihar Majmudar . unresolved

                Should this be set after the screenshot is actually captured or is this safe here (i.e. a user can't trigger screenshot again in the middle of all of this)

                Line 2507, Patchset 10: file_info_mojom->image_data_url = result.thumbnail_data_url.value_or("");
                Nihar Majmudar . unresolved

                should this be std::nullopt since image_data_url is optional?

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Hamzah Behery
                Gerrit-Attention: Hamzah Behery <beh...@chromium.org>
                Gerrit-Comment-Date: Thu, 13 Aug 2026 15:33:38 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Hamzah Behery (Gerrit)

                unread,
                Aug 13, 2026, 11:34:53 AM (3 days ago) Aug 13
                to Tove Petersson, Foromo Daniel Soromou, Juliet Lévesque Knighton, Ken Buchanan, Ari Chivukula, Chromium IPC Reviews, Nihar Majmudar, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, chfreme...@chromium.org, christia...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, niharm...@google.com, omnibox-...@chromium.org, orinj...@chromium.org, pauladed...@google.com

                Hamzah Behery added 1 comment

                File chrome/browser/ui/webui/searchbox/contextual_searchbox_handler_unittest.cc
                Line 219, Patchset 8: contextual_search::ContextualSearchSessionHandle*
                GetContextualSessionHandleForTesting() {
                return GetContextualSessionHandle();
                }
                Foromo Daniel Soromou . resolved

                Unsed, please remove.

                Hamzah Behery

                Done

                Open in Gerrit

                Related details

                Attention set is empty
                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: I59a3dba3ca4e9c372d2f67c5ec4c18a0f803d23d
                Gerrit-Change-Number: 8229077
                Gerrit-PatchSet: 11
                Gerrit-Owner: Hamzah Behery <beh...@chromium.org>
                Gerrit-Reviewer: Ari Chivukula <ari...@chromium.org>
                Gerrit-Reviewer: Foromo Daniel Soromou <koreta...@chromium.org>
                Gerrit-Reviewer: Hamzah Behery <beh...@chromium.org>
                Gerrit-Reviewer: Juliet Lévesque Knighton <julietl...@google.com>
                Gerrit-Reviewer: Ken Buchanan <ke...@chromium.org>
                Gerrit-Reviewer: Nihar Majmudar <nih...@google.com>
                Gerrit-Reviewer: Tove Petersson <to...@chromium.org>
                Gerrit-CC: Andrew Rayskiy <green...@google.com>
                Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
                Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
                Gerrit-CC: Simon Hangl <sim...@google.com>
                Gerrit-CC: gwsq
                Gerrit-Comment-Date: Thu, 13 Aug 2026 15:34:39 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                Comment-In-Reply-To: Foromo Daniel Soromou <koreta...@chromium.org>
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Hamzah Behery (Gerrit)

                unread,
                Aug 13, 2026, 12:06:06 PM (3 days ago) Aug 13
                to Tove Petersson, Foromo Daniel Soromou, Juliet Lévesque Knighton, Ken Buchanan, Ari Chivukula, Chromium IPC Reviews, Nihar Majmudar, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, chfreme...@chromium.org, christia...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, niharm...@google.com, omnibox-...@chromium.org, orinj...@chromium.org, pauladed...@google.com
                Attention needed from Nihar Majmudar

                Hamzah Behery added 8 comments

                File chrome/browser/ui/webui/cr_components/searchbox/contextual_searchbox_handler.h
                Line 550, Patchset 10: raw_ptr<DesktopMediaPickerFactory> picker_factory_ = nullptr;
                std::unique_ptr<content::desktop_capture::ScreenshotCaptureRequest>
                active_screenshot_request_;
                bool is_capturing_ = false;
                Nihar Majmudar . resolved

                This can be move with the variable definition above? i.e. doesn't need separate buildflag

                Hamzah Behery

                Done

                Line 533, Patchset 10: void FallbackToChromeDefaultPicker(bool prefer_entire_screen,
                StartScreenshareCallback callback);
                void OnChromeDefaultPickerResults(StartScreenshareCallback callback,
                const std::string& err,
                content::DesktopMediaID source);
                void CaptureAndUploadScreenshot(content::DesktopMediaID source,
                StartScreenshareCallback callback);
                void OnScreenshotCaptured(StartScreenshareCallback callback,
                const SkBitmap& bitmap);
                void OnScreenshotRequestCreated(
                std::unique_ptr<content::desktop_capture::ScreenshotCaptureRequest>
                request);
                void OnScreenshotProcessed(StartScreenshareCallback callback,
                ProcessedScreenshot result);
                Nihar Majmudar . resolved

                Can these be move to where the rest of the functions are defined? Not sure why there's some mixing of variable and function declaration above

                Hamzah Behery

                Done

                Line 314, Patchset 10:#if !BUILDFLAG(IS_ANDROID)
                void set_desktop_media_picker_factory_for_testing(
                DesktopMediaPickerFactory* factory) {
                picker_factory_ = factory;
                }
                #endif
                Nihar Majmudar . resolved

                Can you combine with one of the other buildflags above

                Hamzah Behery

                Done

                File chrome/browser/ui/webui/cr_components/searchbox/contextual_searchbox_handler.cc
                Line 26, Patchset 10:#include "base/mac/mac_util.h"
                Nihar Majmudar . resolved

                needed?

                Hamzah Behery

                Done

                Nihar Majmudar . resolved

                Can you make sure all of these are needed? Doesn't look like all of them are used but not sure

                Hamzah Behery

                Fixed, got left behind when this CL was split

                Line 2451, Patchset 10:constexpr char kScreenshotFileName[] = "Screenshot.png";
                constexpr char kScreenshotMimeType[] = "image/png";

                ContextualSearchboxHandler::ProcessedScreenshot ProcessScreenshotInBackground(
                const SkBitmap& bitmap) {
                ContextualSearchboxHandler::ProcessedScreenshot result;
                std::optional<std::vector<uint8_t>> png_bytes =
                gfx::PNGCodec::EncodeBGRASkBitmap(bitmap,
                /*discard_transparency=*/false);
                if (png_bytes) {
                result.png_bytes = std::move(*png_bytes);
                }
                // TODO(crbug.com/532197177): Populate result.thumbnail_data_url with the
                // optimized base64 thumbnail URL.
                return result;
                }
                Nihar Majmudar . resolved

                Move logic in namepsace at the top of file namespace?

                Hamzah Behery

                Done

                Line 2472, Patchset 10: is_capturing_ = false;
                Nihar Majmudar . resolved

                Should this be set after the screenshot is actually captured or is this safe here (i.e. a user can't trigger screenshot again in the middle of all of this)

                Hamzah Behery

                `is_capturing_` is meant to only guard the active OS capture session, which is complete once OnScreenshotCaptured receives the SkBitmap. The remaining flow is standard async attachment upload, so resetting it here allows subsequent captures without blocking on background PNG encoding or upload.

                Line 2507, Patchset 10: file_info_mojom->image_data_url = result.thumbnail_data_url.value_or("");
                Nihar Majmudar . resolved

                should this be std::nullopt since image_data_url is optional?

                Hamzah Behery

                Done

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Nihar Majmudar
                Submit Requirements:
                  • requirement satisfiedCode-Coverage
                  • requirement is not satisfiedCode-Owners
                  • requirement satisfiedCode-Review
                  • 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: I59a3dba3ca4e9c372d2f67c5ec4c18a0f803d23d
                  Gerrit-Change-Number: 8229077
                  Gerrit-PatchSet: 12
                  Gerrit-Owner: Hamzah Behery <beh...@chromium.org>
                  Gerrit-Reviewer: Ari Chivukula <ari...@chromium.org>
                  Gerrit-Reviewer: Foromo Daniel Soromou <koreta...@chromium.org>
                  Gerrit-Reviewer: Hamzah Behery <beh...@chromium.org>
                  Gerrit-Reviewer: Juliet Lévesque Knighton <julietl...@google.com>
                  Gerrit-Reviewer: Ken Buchanan <ke...@chromium.org>
                  Gerrit-Reviewer: Nihar Majmudar <nih...@google.com>
                  Gerrit-Reviewer: Tove Petersson <to...@chromium.org>
                  Gerrit-CC: Andrew Rayskiy <green...@google.com>
                  Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
                  Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
                  Gerrit-CC: Simon Hangl <sim...@google.com>
                  Gerrit-CC: gwsq
                  Gerrit-Attention: Nihar Majmudar <nih...@google.com>
                  Gerrit-Comment-Date: Thu, 13 Aug 2026 16:05:52 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: No
                  Comment-In-Reply-To: Nihar Majmudar <nih...@google.com>
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Nihar Majmudar (Gerrit)

                  unread,
                  Aug 13, 2026, 1:29:21 PM (3 days ago) Aug 13
                  to Hamzah Behery, Tove Petersson, Foromo Daniel Soromou, Juliet Lévesque Knighton, Ken Buchanan, Ari Chivukula, Chromium IPC Reviews, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, chfreme...@chromium.org, christia...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, niharm...@google.com, omnibox-...@chromium.org, orinj...@chromium.org, pauladed...@google.com
                  Attention needed from Hamzah Behery

                  Nihar Majmudar voted and added 1 comment

                  Votes added by Nihar Majmudar

                  Code-Review+1

                  1 comment

                  Patchset-level comments
                  File-level comment, Patchset 12 (Latest):
                  Nihar Majmudar . resolved

                  `cr_components` LGTM

                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Hamzah Behery
                  Submit Requirements:
                  • requirement satisfiedCode-Coverage
                  • requirement satisfiedCode-Owners
                  Gerrit-Attention: Hamzah Behery <beh...@chromium.org>
                  Gerrit-Comment-Date: Thu, 13 Aug 2026 17:29:07 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: Yes
                  satisfied_requirement
                  open
                  diffy

                  Hamzah Behery (Gerrit)

                  unread,
                  Aug 14, 2026, 6:13:50 PM (2 days ago) Aug 14
                  to Nihar Majmudar, Tove Petersson, Foromo Daniel Soromou, Juliet Lévesque Knighton, Ken Buchanan, Ari Chivukula, Chromium IPC Reviews, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, chfreme...@chromium.org, christia...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, niharm...@google.com, omnibox-...@chromium.org, orinj...@chromium.org, pauladed...@google.com

                  Hamzah Behery voted Commit-Queue+2

                  Commit-Queue+2
                  Open in Gerrit

                  Related details

                  Attention set is empty
                  Submit Requirements:
                  • requirement satisfiedCode-Coverage
                  • requirement satisfiedCode-Owners
                  • requirement satisfiedCode-Review
                  • 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: I59a3dba3ca4e9c372d2f67c5ec4c18a0f803d23d
                  Gerrit-Change-Number: 8229077
                  Gerrit-PatchSet: 16
                  Gerrit-Owner: Hamzah Behery <beh...@chromium.org>
                  Gerrit-Reviewer: Ari Chivukula <ari...@chromium.org>
                  Gerrit-Reviewer: Foromo Daniel Soromou <koreta...@chromium.org>
                  Gerrit-Reviewer: Hamzah Behery <beh...@chromium.org>
                  Gerrit-Reviewer: Juliet Lévesque Knighton <julietl...@google.com>
                  Gerrit-Reviewer: Ken Buchanan <ke...@chromium.org>
                  Gerrit-Reviewer: Nihar Majmudar <nih...@google.com>
                  Gerrit-Reviewer: Tove Petersson <to...@chromium.org>
                  Gerrit-CC: Andrew Rayskiy <green...@google.com>
                  Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
                  Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
                  Gerrit-CC: Simon Hangl <sim...@google.com>
                  Gerrit-CC: gwsq
                  Gerrit-Comment-Date: Fri, 14 Aug 2026 22:13:42 +0000
                  Gerrit-HasComments: No
                  Gerrit-Has-Labels: Yes
                  satisfied_requirement
                  open
                  diffy

                  Hamzah Behery (Gerrit)

                  unread,
                  Aug 14, 2026, 9:58:29 PM (2 days ago) Aug 14
                  to Nihar Majmudar, Tove Petersson, Foromo Daniel Soromou, Juliet Lévesque Knighton, Ken Buchanan, Ari Chivukula, Chromium IPC Reviews, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, chfreme...@chromium.org, christia...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, niharm...@google.com, omnibox-...@chromium.org, orinj...@chromium.org, pauladed...@google.com
                  Gerrit-Comment-Date: Sat, 15 Aug 2026 01:58:19 +0000
                  Gerrit-HasComments: No
                  Gerrit-Has-Labels: Yes
                  satisfied_requirement
                  open
                  diffy

                  Chromium LUCI CQ (Gerrit)

                  unread,
                  Aug 14, 2026, 10:07:46 PM (2 days ago) Aug 14
                  to Hamzah Behery, Nihar Majmudar, Tove Petersson, Foromo Daniel Soromou, Juliet Lévesque Knighton, Ken Buchanan, Ari Chivukula, Chromium IPC Reviews, chromium...@chromium.org, Andrew Rayskiy, Rijubrata Bhaumik, Simon Hangl, chfreme...@chromium.org, christia...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, niharm...@google.com, omnibox-...@chromium.org, orinj...@chromium.org, pauladed...@google.com

                  Chromium LUCI CQ submitted the change

                  Unreviewed changes

                  12 is the latest approved patch-set.
                  No files were changed between the latest approved patch-set and the submitted one.

                  Change information

                  Commit message:
                  [OmniboxEverywhere][3a/5] Implement screenshare Mojo definitions, capturing, and unit tests

                  Wires the frontend screenshare buttons to the C++ backend via Mojo IPC,
                  implements screenshot capturing, formatting, and adds test coverage.

                  This CL serves two major purposes:
                  1. It implements the integration and triggering of the Default Capture
                  Picker (utilizing WebRTC's DesktopCapturer to capture screenshots of
                  windows/screens).
                  2. It acts as the shared Mojo IPC controller and post-processor for both
                  the macOS Native Picker and the Default Capture Picker CLs
                  (crrev.com/c/8177909 and crrev.com/c/8179066), handling bitmap
                  formatting and attaching them to the searchbox session context.

                  Key implementation details:
                  - Declares the StartScreenshare Mojo interface method in
                  searchbox.mojom.
                  - Configures the fallback desktop media picker to present both Screen
                  and Window tabs, pre-selecting the appropriate tab based on the user's
                  initial selection (entire screen vs window).
                  - Implements Mojo page handler receivers to trigger screensharing and
                  post the task to content::desktop_capture::CaptureScreenshot (which
                  spawns the Default Capture Picker).
                  - Performs asynchronous post-processing on the captured SkBitmap (from
                  both pickers) to format it as PNG bytes and attaches the resulting
                  file context to the active OmniboxEverywhere session.
                  - Adds comprehensive unit tests for ContextualSearchboxHandler and
                  core screensharing logic.
                  Bug: 532197177
                  Change-Id: I59a3dba3ca4e9c372d2f67c5ec4c18a0f803d23d
                  Reviewed-by: Foromo Daniel Soromou <koreta...@chromium.org>
                  Commit-Queue: Hamzah Behery <beh...@chromium.org>
                  Reviewed-by: Tove Petersson <to...@chromium.org>
                  Reviewed-by: Ari Chivukula <ari...@chromium.org>
                  Reviewed-by: Juliet Lévesque Knighton <julietl...@google.com>
                  Reviewed-by: Nihar Majmudar <nih...@google.com>
                  Reviewed-by: Ken Buchanan <ke...@chromium.org>
                  Cr-Commit-Position: refs/heads/main@{#1680097}
                  Files:
                  • M chrome/browser/contextual_tasks/contextual_tasks_extension_handler.cc
                  • M chrome/browser/contextual_tasks/contextual_tasks_extension_handler.h
                  • M chrome/browser/media/webrtc/fake_desktop_media_picker_factory.cc
                  • M chrome/browser/ui/webui/DEPS
                  • M chrome/browser/ui/webui/cr_components/searchbox/BUILD.gn
                  • M chrome/browser/ui/webui/cr_components/searchbox/contextual_searchbox_handler.cc
                  • M chrome/browser/ui/webui/cr_components/searchbox/contextual_searchbox_handler.h
                  • M chrome/browser/ui/webui/cr_components/searchbox/searchbox_handler.h
                  • M chrome/browser/ui/webui/searchbox/DEPS
                  • M chrome/browser/ui/webui/searchbox/contextual_searchbox_handler_unittest.cc
                  • M chrome/test/data/webui/cr_components/searchbox/test_searchbox_browser_proxy.ts
                  • M chrome/test/data/webui/lens/overlay/test_searchbox_browser_proxy.ts
                  • M chrome/test/data/webui/omnibox_everywhere/test_searchbox_browser_proxy.ts
                  • M components/omnibox/browser/searchbox.mojom
                  Change size: L
                  Delta: 14 files changed, 401 insertions(+), 2 deletions(-)
                  Branch: refs/heads/main
                  Submit Requirements:
                  • requirement satisfiedCode-Review: +1 by Ari Chivukula, +1 by Foromo Daniel Soromou, +1 by Ken Buchanan, +1 by Tove Petersson, +1 by Juliet Lévesque Knighton, +1 by Nihar Majmudar
                  Open in Gerrit
                  Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                  Gerrit-MessageType: merged
                  Gerrit-Project: chromium/src
                  Gerrit-Branch: main
                  Gerrit-Change-Id: I59a3dba3ca4e9c372d2f67c5ec4c18a0f803d23d
                  Gerrit-Change-Number: 8229077
                  Gerrit-PatchSet: 17
                  Gerrit-Owner: Hamzah Behery <beh...@chromium.org>
                  Gerrit-Reviewer: Ari Chivukula <ari...@chromium.org>
                  Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
                  Gerrit-Reviewer: Foromo Daniel Soromou <koreta...@chromium.org>
                  Gerrit-Reviewer: Hamzah Behery <beh...@chromium.org>
                  Gerrit-Reviewer: Juliet Lévesque Knighton <julietl...@google.com>
                  Gerrit-Reviewer: Ken Buchanan <ke...@chromium.org>
                  Gerrit-Reviewer: Nihar Majmudar <nih...@google.com>
                  Gerrit-Reviewer: Tove Petersson <to...@chromium.org>
                  Gerrit-CC: Andrew Rayskiy <green...@google.com>
                  Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
                  open
                  diffy
                  satisfied_requirement
                  Reply all
                  Reply to author
                  Forward
                  0 new messages