This argument only gets passed along for our purposes.
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/54777b8f87dcd034f40ffa2bae1ffe0e5b59d321
commit 54777b8f87dcd034f40ffa2bae1ffe0e5b59d321
Author: Tom Anderson <thomasanderson@chromium.org>
Date: Thu Mar 12 20:04:07 2026 -0700
[Clipboard] Async GetAllAvailableFormats replaces sync IsFormatAvailable
This change replaces the synchronous IsFormatAvailable method in
ui::Clipboard with an asynchronous GetAllAvailableFormats method. The
new method takes a callback and returns a set of all available formats.
All platform implementations (Android, Windows, Mac, Ozone, iOS, and the
non-backed implementation) have been updated. Callers across the
codebase have been refactored to use the new asynchronous API, often
utilizing a pseudo-synchronous pattern where acceptable or updating to
full async.
Synchronous convenience functions were added to clipboard_test_util to
facilitate the update of the extensive test suite.
IsFormatAvailable is most commonly used to enable the "Paste" menu item
in context menus. The strategy is to obtain this state before the menu
is created, since the menu delegate interface for determining if a
command is enabled should remain synchronous.
Behavior is preserved by this change except for a change in Textfield
(and it's subclass OmniboxViewViews): when pasting, the clipboard is
assumed to contain content. The consequence of this is event propagation
of Ctrl-V keypresses will stop on the Textfield when it may otherwise
have been propagated to parent views. This is deemed an acceptable
tradeoff for the async migration since this behavior is unlikely to ever
get hit.
Bug: 40398800
Change-Id: Ibc005d100d9cfd21cb9f06c758ce0a98282fdb97
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7631097
Reviewed-by: Olivier Robin <olivierrobin@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Reviewed-by: Mike Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1598848}