0
Commit Graph

464 Commits

Author SHA1 Message Date
Sergey Ulanov
647ad46d95 [Fuchsia] Remove dependency on devtools-frontend
Devtools frontend is not supported on Fuchsia. Remove dependencies
on the corresponding resources.

Bug: 396724495
Change-Id: I5b31e5d0cf96af849b4070b6786472f75a1a7568
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6278810
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Junji Watanabe <jwata@google.com>
Reviewed-by: Sam McNally <sammc@chromium.org>
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: John Lee <johntlee@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1422107}
2025-02-19 11:34:33 -08:00
Sandor «Alex» Major
c41217fd82 Reland "Fix Permissions Policy includes"
This reverts commit 720f465c92.

Reason for revert: https://crrev.com/c/6269804 shouldn't affect tests

Original change's description:
> Revert "Fix Permissions Policy includes"
>
> This reverts commit 989865934e.
>
> Reason for revert: Causing SharedStorageFencedFrameChromeBrowserTest failure (crbug/396718068)
>
> Original change's description:
> > Fix Permissions Policy includes
> >
> > This should make reviews of https://crrev.com/c/6254141 easier
> >
> > Bug: 382291442
> > Change-Id: Ibf1b3b0d17914c457074f9d39e054654822109ad
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6269804
> > Auto-Submit: Sandor «Alex» Major <sandormajor@chromium.org>
> > Reviewed-by: Rick Byers <rbyers@chromium.org>
> > Commit-Queue: Rick Byers <rbyers@chromium.org>
> > Reviewed-by: Ari Chivukula <arichiv@chromium.org>
> > Owners-Override: Rick Byers <rbyers@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1420643}
>
> Bug: 382291442, 396718068
> Change-Id: I5654fa7f5cdb6a5e086e18161ffe39176b43b630
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6271463
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Owners-Override: Wenyu Fu <wenyufu@chromium.org>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Auto-Submit: Wenyu Fu <wenyufu@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1420743}

Bug: 382291442, 396718068
Change-Id: Id1d4b3fd098df7c5aa61daa1b1b247a016ec1472
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6271184
Commit-Queue: Wenyu Fu <wenyufu@chromium.org>
Commit-Queue: Sandor «Alex» Major <sandormajor@chromium.org>
Reviewed-by: Wenyu Fu <wenyufu@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Wenyu Fu <wenyufu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1420774}
2025-02-14 15:33:13 -08:00
Wenyu Fu
720f465c92 Revert "Fix Permissions Policy includes"
This reverts commit 989865934e.

Reason for revert: Causing SharedStorageFencedFrameChromeBrowserTest failure (crbug/396718068)

Original change's description:
> Fix Permissions Policy includes
>
> This should make reviews of https://crrev.com/c/6254141 easier
>
> Bug: 382291442
> Change-Id: Ibf1b3b0d17914c457074f9d39e054654822109ad
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6269804
> Auto-Submit: Sandor «Alex» Major <sandormajor@chromium.org>
> Reviewed-by: Rick Byers <rbyers@chromium.org>
> Commit-Queue: Rick Byers <rbyers@chromium.org>
> Reviewed-by: Ari Chivukula <arichiv@chromium.org>
> Owners-Override: Rick Byers <rbyers@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1420643}

Bug: 382291442, 396718068
Change-Id: I5654fa7f5cdb6a5e086e18161ffe39176b43b630
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6271463
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Wenyu Fu <wenyufu@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Wenyu Fu <wenyufu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1420743}
2025-02-14 14:14:07 -08:00
Sandor Major
989865934e Fix Permissions Policy includes
This should make reviews of https://crrev.com/c/6254141 easier

Bug: 382291442
Change-Id: Ibf1b3b0d17914c457074f9d39e054654822109ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6269804
Auto-Submit: Sandor «Alex» Major <sandormajor@chromium.org>
Reviewed-by: Rick Byers <rbyers@chromium.org>
Commit-Queue: Rick Byers <rbyers@chromium.org>
Reviewed-by: Ari Chivukula <arichiv@chromium.org>
Owners-Override: Rick Byers <rbyers@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1420643}
2025-02-14 11:49:01 -08:00
Garfield Tan
6aba0031ec serial: Enable serial frontend on Android
This CL enables serial related code from Blink layer to Chrome layer. It
introduces an entry point to serial port chooser dialog, and also
enables relevant prefs for settings and policies. Site setting pages and
device polices are left to be done.

This CL also ties the Serial feature in Blink to the
BluetoothRfcommAndroid Chrome feature, and also a Serial Chrome feature
to avoid loss of Finch switches on non-Android platforms.

An APK size increase is expected with this CL, as this CL adds a bunch
of serial related source code to Android builds. While this CL doesn't
include every thing needed to enable serial ports on Android, this is
the only CL that contributes to APK size increase significant enough
that requires explicit approvals. Compared to serial support on desktop
systems, this CL removes unnecessary string resources, as well as a list
of USB vendors and devices, which takes 400 KB+ by itself.

Bug: 380129064
Test: Builds.
Binary-Size: See commit description.
Change-Id: I43bc0d07811913adcf3214e521c519033c9b48a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6237561
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Matt Reynolds <mattreynolds@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Commit-Queue: Garfield Tan <xutan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1420254}
2025-02-13 18:07:35 -08:00
Andrew Rayskiy
fa93b82740 DirectSockets: support service workers on the browser side
This CL wires up the browser side pieces to achieve end-to-end support
for the Direct Sockets API in ServiceWorker contexts. Some bits are yet
to be figured out, especially wrt to permissions policies and their
applications.

Mirror CL for SharedWorker contexts: crrev.com/c/6218914

Bug: 392843918
Change-Id: I74f75476e8062c2874dc0fb85d4308420012d3ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4627574
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Andrew Rayskiy <greengrape@google.com>
Reviewed-by: Robbie McElrath <rmcelrath@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1418536}
2025-02-11 02:24:16 -08:00
Andrew Rayskiy
f807b71647 DirectSockets: support shared workers on the browser side
This CL wires up the browser side pieces to achieve end-to-end support
for the Direct Sockets API in SharedWorker contexts. Some bits are yet
to be figured out, especially wrt to permissions policies and their
applications.

Mirror CL for ServiceWorker contexts: crrev.com/c/4627574

Bug: 393539884
Change-Id: I5b51302c92a346a8ba40d7781f8ab2b2e4c93fd2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6218914
Commit-Queue: Andrew Rayskiy <greengrape@google.com>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Robbie McElrath <rmcelrath@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1418297}
2025-02-10 12:31:56 -08:00
Phillis Tang
4247919d79 webnn: wait on coreml cache dir setup
Move Core ML cache directory setup logic to be called on WebNN context
creation and let context creation wait on the cache directory setup to
be finished.

Bug: 344935458
Change-Id: I045d7f644df7d3db0b5985e3b647812919ab820e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6237277
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Phillis Tang <phillis@chromium.org>
Auto-Submit: Phillis Tang <phillis@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1417848}
2025-02-08 22:02:06 -08:00
Sandor «Alex» Major
e9545a72e6 Reland "Move PermissionsPolicyFeature from Blink to the Network service"
This is a reland of commit 1b851527a0

A new usage of `PermissionsPolicyFeature` appeared in the meantime.
Fixed in this CL.

Original change's description:
> Move `PermissionsPolicyFeature` from Blink to the Network service
>
> The network service is going to need access to the "storage-access"
> Permissions Policy. This is the first step of moving some of the
> Permissions Policy logic out of Blink to maintain a single
> implementation of https://w3c.github.io/webappsec-permissions-policy
> across Chromium.
>
> Tha main change here is moving the `PermissionsPolicyFeature` type from
> `blink.mojom` to `network.mojom`:
> https://crrev.com/c/6180431/7/services/network/public/mojom/permissions_policy/permissions_policy_feature.mojom
>
> Bug: 382291442
> Change-Id: Ib99fbd285031936dbf40d5f210816cc775c51dfa
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6180431
> Auto-Submit: Sandor «Alex» Major <sandormajor@chromium.org>
> Reviewed-by: Ari Chivukula <arichiv@chromium.org>
> Reviewed-by: Maks Orlovich <morlovich@chromium.org>
> Owners-Override: Rick Byers <rbyers@chromium.org>
> Reviewed-by: Rick Byers <rbyers@chromium.org>
> Commit-Queue: Sandor «Alex» Major <sandormajor@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1414133}

Bug: 382291442
Change-Id: I853b73f61ab7ecd807fc3d16cd2895c353ebd126
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6219635
Auto-Submit: Sandor «Alex» Major <sandormajor@chromium.org>
Owners-Override: Rick Byers <rbyers@chromium.org>
Reviewed-by: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Rick Byers <rbyers@chromium.org>
Commit-Queue: Sandor «Alex» Major <sandormajor@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1414345}
2025-01-31 12:40:46 -08:00
Kevin McNee
4a02d170a9 Revert "Move PermissionsPolicyFeature from Blink to the Network service"
This reverts commit 1b851527a0.

Reason for revert: Broke the build https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20MSan%20Builder/86647/overview

Original change's description:
> Move `PermissionsPolicyFeature` from Blink to the Network service
>
> The network service is going to need access to the "storage-access"
> Permissions Policy. This is the first step of moving some of the
> Permissions Policy logic out of Blink to maintain a single
> implementation of https://w3c.github.io/webappsec-permissions-policy
> across Chromium.
>
> Tha main change here is moving the `PermissionsPolicyFeature` type from
> `blink.mojom` to `network.mojom`:
> https://crrev.com/c/6180431/7/services/network/public/mojom/permissions_policy/permissions_policy_feature.mojom
>
> Bug: 382291442
> Change-Id: Ib99fbd285031936dbf40d5f210816cc775c51dfa
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6180431
> Auto-Submit: Sandor «Alex» Major <sandormajor@chromium.org>
> Reviewed-by: Ari Chivukula <arichiv@chromium.org>
> Reviewed-by: Maks Orlovich <morlovich@chromium.org>
> Owners-Override: Rick Byers <rbyers@chromium.org>
> Reviewed-by: Rick Byers <rbyers@chromium.org>
> Commit-Queue: Sandor «Alex» Major <sandormajor@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1414133}

Bug: 382291442
Change-Id: I068a9cbfb77057ded4295dc214aee51bee8a503c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6219376
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Kevin McNee <mcnee@chromium.org>
Owners-Override: Kevin McNee <mcnee@google.com>
Cr-Commit-Position: refs/heads/main@{#1414150}
2025-01-31 08:22:14 -08:00
Sandor Major
1b851527a0 Move PermissionsPolicyFeature from Blink to the Network service
The network service is going to need access to the "storage-access"
Permissions Policy. This is the first step of moving some of the
Permissions Policy logic out of Blink to maintain a single
implementation of https://w3c.github.io/webappsec-permissions-policy
across Chromium.

Tha main change here is moving the `PermissionsPolicyFeature` type from
`blink.mojom` to `network.mojom`:
https://crrev.com/c/6180431/7/services/network/public/mojom/permissions_policy/permissions_policy_feature.mojom

Bug: 382291442
Change-Id: Ib99fbd285031936dbf40d5f210816cc775c51dfa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6180431
Auto-Submit: Sandor «Alex» Major <sandormajor@chromium.org>
Reviewed-by: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Owners-Override: Rick Byers <rbyers@chromium.org>
Reviewed-by: Rick Byers <rbyers@chromium.org>
Commit-Queue: Sandor «Alex» Major <sandormajor@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1414133}
2025-01-31 07:48:32 -08:00
Stephen McGruer
18ed1a0641 Rename PaymentCredential --> SecurePaymentConfirmationService
The PaymentCredential mojom interface was poorly named, as (1) the
interface is actually a service that can create and store
PaymentCredentials, and does not represent a single credential, and (2)
we want to expand this service to provide other SPC-related
functionality such as the upcoming isSecurePaymentConfirmationAvailable
API.

As such, this CL renames the interface. It should have no behavioral
change in doing so.

Bug: 40258712
Change-Id: I44eb215cd34be1acb6b9b48ab36eba010bb3f885
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6175882
Reviewed-by: Nina Satragno <nsatragno@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Darwin Yang <darwinyang@chromium.org>
Reviewed-by: Dominic Farolino <dom@chromium.org>
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1408760}
2025-01-20 12:18:52 -08:00
Nina Satragno
e8cffbbac7 [webauthn] Only disable BFCache during request
Before this CL, Chrome disabled the back forward cache for the lifetime
of the page whenever any WebAuthn related function was called by the
page. After this CL, Chrome will only disable the cache if the page is
navigated away during a get assertion or make credential request
instead.

Bug: 41492758
Change-Id: I7452a2eb9e4f8d95b81c09b8e476fdb58b11fa29
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6081700
Commit-Queue: Nina Satragno <nsatragno@chromium.org>
Reviewed-by: Scott Haseley <shaseley@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Fergal Daly <fergal@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Auto-Submit: Nina Satragno <nsatragno@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1407939}
2025-01-17 08:15:02 -08:00
Jiacheng Guo
c62e3c02cf Add mojo binding for the language detection in workers
The CL adds mojo binding for the language detection in workers. This
will fix the test failures in the corresponding WPT tests.
The CL also updates the WPT test to run in all types of workers.

Bug: 368206184, 388961572
Change-Id: I45f0632bd7df1ed403f88b398494019ea7a35679
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6148112
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Commit-Queue: Jiacheng Guo <gjc@google.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1404644}
2025-01-10 00:37:57 -08:00
Nathan Memmott
b3e20ab0b3 Code Health: Clean up stale WebNFC flag
This feature flag has been enabled by default for atleast 10 milestones
and is safe to remove.

Fixed: 356624525
Change-Id: Iff8155292f5f037a05bf37c8c849ea2a8ea4fbaf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6087077
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Nathan Memmott <memmott@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Mustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1396297}
2024-12-13 18:04:42 -08:00
Sunggook Chue
469ea17762 SetPreferredSinkId uses GlobalRenderFrameHostToken instead of Id.
There are recent requirement change to use GlobalRenderFrameHostToken
instead of GlobalRenderFrameHostId.

The fix is made to follow the guideline for the SetPreferredSinkId.

Bug: 380109522
Change-Id: I9af768b49fda2f3913fc398c180ab9795f91c9a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6071974
Reviewed-by: David Dorwin <ddorwin@chromium.org>
Reviewed-by: David Song <wintermelons@google.com>
Commit-Queue: Sunggook Chue <sunggch@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1394614}
2024-12-11 01:12:54 +00:00
Emily Andrews
d15fd76ecb Change RenderProcessHost::GetID to RenderProcessHost::GetDeprecatedID
This change bulk changes RenderProcessHost::GetID to
RenderProcessHost::GetDeprecatedID to support the transition to a
strongly typed ChildProcessId.

Bug: 379869738
Change-Id: Ib0c991536486ef29702ea166cdcf12ea68ed70ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6065543
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Owners-Override: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Emily Andrews <emiled@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1394500}
2024-12-10 20:41:54 +00:00
Fergal Daly
b65f07b411 When language detection is on, set up a binder on all render frames.
This replaces the Chrome UI-Translate-specific binder when the flag is
on.

Bug: 354069716
Fixed: 377615981
Change-Id: Idae0b77841c47f23fb8e424f465006aaffc9604f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6029830
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Trevor Perrier <perrier@chromium.org>
Commit-Queue: Fergal Daly <fergal@chromium.org>
Auto-Submit: Fergal Daly <fergal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1393533}
2024-12-09 07:52:38 +00:00
Tsuyoshi Horo
5f067a2a0f Support Translator API on workers
Previously, the `mojom::TranslationManager` interface was only
accessible from frames because it was registered with the mojo binder
map only within the `PopulateChromeFrameBinders` method.

This CL makes the `mojom::TranslationManager` interface available to
workers by introducing a new public method in `ContentBrowserClient`
`BindTranslationManager()`. This method is called by the following
methods:
 - `PopulateFrameBinders()`
 - `PopulateDedicatedWorkerBinders()`
 - `PopulateSharedWorkerBinders()`
 - `PopulateServiceWorkerBinders()`

Additionally, this CL updates the relevant IDL files to expose the
Translator API to workers.

Fixed: 381983087
Change-Id: Ib14ef9137340054f05fac4b67dd29ae928b64bfc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6069226
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Fergal Daly <fergal@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1392829}
2024-12-06 12:01:44 +00:00
Fergal Daly
b810d69a2e Rename various AI base feature flags from EnableFoo to just Foo.
The Enable prefix is confusing and not necessary.

These base feature flags have 2 uses
- testing, this CL will have to wait for https://crrev.com/i/7836570
  to be rolled into the main repo before submitting
- kill-switch, not currently used, if we do kill, we will need to
  consider that older milestones use the old names.


Change-Id: I672b0fce708bdecf0b881d938d5ca654f148d289
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6029594
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Jiacheng Guo <gjc@google.com>
Reviewed-by: Monica Basta <msalama@chromium.org>
Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Owen Min <zmin@chromium.org>
Commit-Queue: Fergal Daly <fergal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1386616}
2024-11-22 04:07:23 +00:00
Sunggook Chue
41263fe26d IPC btw the browser and renderer for setPreferredSinkId.
It provides mojo API under MediaDevicesDispatcherHost for the renderer to call the browser.

Bug: 337094880
Change-Id: I141c6b219d8c140cb93c8366d4ef8491ef2b3372
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5546311
Reviewed-by: Antonio Sartori <antoniosartori@chromium.org>
Reviewed-by: Michael Wilson <mjwilson@chromium.org>
Reviewed-by: Elly FJ <ellyjones@chromium.org>
Commit-Queue: Sunggook Chue <sunggch@microsoft.com>
Reviewed-by: Olga Sharonova <olka@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1386435}
2024-11-21 21:00:02 +00:00
Fergal Daly
2935c7a86e Stop using a variant for receiver context and just use SupportsUserData.
The variant was for RenderFrameHost vs FooWorkerHost. We only care
about SupportsUserData. So instead of a variant we can deal with SUD
directly. The only tricky part that RenderFrameHostImpl both *is* and
*has* an SUD. We need the SUD that follows the document lifecycle
so we use `document_associated_data()`.

Change-Id: I6dbe995c8ca9dd7c24d204c08577c80d34328996
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5964316
Reviewed-by: Mingyu Lei <leimy@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Commit-Queue: Fergal Daly <fergal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1379484}
2024-11-07 06:29:43 +00:00
Yao Xiao
bfec2c8277 [shared storage] Add Web Locks to the worklet
Explainer: https://github.com/WICG/shared-storage/pull/199

Key points:
- `SharedStorageWorkletNavigator` is a new interface that only
  supports `locks`. Implementation-wise, we inherit NavigatorBase
  so it's compatible with the LockManager implementation. Some
  methods are obviously unreachable (e.g. GetAcceptLanguages()).
- Add the member `LockManager<OriginLockGroupId> lock_manager_;` to
  SharedStorageWorkletHostManager: The locks have a shared storage
  specific scope (separate from the Window/Worker locks), and are
  further partitioned by shared storage origin.

Bug: 373899210
Change-Id: I9908962949088356c2a61c1556183ccd5772985f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5937903
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1370865}
2024-10-18 22:34:52 +00:00
Jason Chase
1439d2fe02 Move origin_trial_state_host mojom into common directory
There are now three directories containing origin trial-related
mojoms under third_party/blink/public/mojom:
- origin_trials
- origin_trial_state
- origin_trial_feature

There doesn't seem to be any technical reason for the separation.
Instead, it seems to be coincidental from different teams landing code
at different times (including renames).

To improve cohesion, the intent is to move all the mojoms into one
directory, specifically `origin_trials`. This CL removes the `origin_trial_state` directory, as a first step.


Change-Id: I355fb7120efa51e6d881f3045f527ff173d9c142
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5925798
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Joe Mason <joenotcharles@google.com>
Commit-Queue: Jason Chase <chasej@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1369481}
2024-10-16 17:12:51 +00:00
Nina Satragno
0d0e1ba7cc [webauthn] Remove mojo testing API
My first project at Google was implementing the WebAuthn WebDriver
testing API. Some time after, I added a TODO [1] to remove it once web
platform tests no longer depended on it.

Four years later, the day of reckoning has come. The CI now runs
WebAuthn WPTs using real Chrome, and all the internal web tests that
depended on mojo were migrated to WPTs. The mojo testing API can be put
to rest. Farewell, old friend. I won't miss you.

https://media0.giphy.com/media/JOG3AA9pCgHCw/200w.gif

[1] https://source.chromium.org/chromium/chromium/src/+/main:content/public/common/content_switches.cc;l=428;drc=4b44bd63028a5aa82976dc4d7ed51cb78cbc6891;bpv=1;bpt=1

Fixed: 372169469
Change-Id: I6d31e0c51e06673694e02e26180561f1ec7db743
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5921534
Commit-Queue: Nina Satragno <nsatragno@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1368923}
2024-10-15 19:10:07 +00:00
Peter Kasting
6e6af3cdb6 Move cc switches from ::cc::switches to ::switches.
This is more compliant with
https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++-dos-and-donts.md#named-namespaces
and prevents namespace hiding issues. It is also a more typical practice
in Chrome (though there are also many counterexamples at the moment).

This uncovered a duplicate switch in ui/base/ that I believe was
supposed to have been the same as the cc/ switch. It was only used
once; changing components/viz/ to use the cc/ switch directly
required modifying DEPS.

Bug: 364987728
Change-Id: I3af891f18851836cc7ffd918bd5e2e253024efed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5912279
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Owners-Override: danakj <danakj@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Victor Miura <vmiura@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1368521}
2024-10-15 00:13:18 +00:00
François Beaufort
d7269ab39d WebHID: Add support for dedicated workers
This CL exposes the WebHID API to dedicated workers behind the blink
runtime feature WebHIDOnDedicatedWorkers.

Intent to prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/y__BOYfZWzI
Spec PR: https://github.com/WICG/webhid/pull/121
Spec issue: https://github.com/WICG/webhid/issues/120
Demo: https://webhid-worker.glitch.me/

Change-Id: If145f34faf9211a54c8b4a15fbe7e903411b8d1d
Bug: 365932453
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5841991
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Yoav Weiss (@Shopify) <yoavweiss@chromium.org>
Reviewed-by: Matt Reynolds <mattreynolds@chromium.org>
Commit-Queue: Fr <beaufort.francois@gmail.com>
Cr-Commit-Position: refs/heads/main@{#1357046}
2024-09-18 13:18:00 +00:00
Austin Sullivan
38614b4e0b webnn: Remove the CrOS-specific TFLite backend
As of this CL, WebNN will no longer use ChromeOS's ModelLoader API from
the ML Service to execute TFLite models. ChromeOS will use the same
copy of TFLite that's used on other platforms (the one that's shipped
with the browser)

This removes the only consumer of the ModelLoader API, so that
interface will be removed in a follow-up CL

Bug: 350407897
Change-Id: I3ea5a7e2796d9ca3216008d005985412658cc8e1
Cq-Include-Trybots: luci.chromium.try:mac14-blink-rel,win11-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5868415
Reviewed-by: Alex Gough <ajgo@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
Commit-Queue: Austin Sullivan <asully@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1356602}
2024-09-17 18:02:44 +00:00
Evan Stade
cbb1e00cda IDB: legibility-focused cleanups, part 2.
Add indexed_db namespace and remove IndexedDB prefix from many classes.

The indexed_db namespace already existed but was used sparingly. Use it
more thoroughly in //content/browser/indexed_db and
//components/services/storage/indexed_db

Bug: none
Change-Id: Id4bb701a86bd25645737bd045b71d4964adef422
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5854146
Reviewed-by: Mike Wasserman <msw@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: John Lee <johntlee@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1355379}
2024-09-13 20:06:57 +00:00
Yao Xiao
94203f54e2 [shared storage] Provide BrowserInterfaceBroker to the worklet
Why:
This change will allow the reuse of existing components that already
utilize BrowserInterfaceBroker for Mojo connection setup. One
potential example is blink::LockManager for Web Locks API support,
which sets up a mojom::blink::LockManager connection. Regardless,
the BrowserInterfaceBroker provides a streamlined approach to
bootstrap Mojo service connections.

Note:
- 1. No behavior change -- I went through the caller sites for
  WorkletGlobalScope::GetBrowserInterfaceBroker() and identified
  ukm::mojom::UkmRecorderFactory as the only potential interface that
  can be requested within a SharedStorageWorklet. To maintain code
  simplicity, we avoid special-casing renderer logic and disable
  ukm::mojom::UkmRecorderFactory on the browser side.
- 2. Other usages appear to originate from non-(SharedStorage)Worklet
  contexts. If any usages were overlooked, this could lead to
  renderer crashes. We will actively monitor overall crash reports
  to promptly address any issues arising from this change.

Bug: 365578420
Change-Id: Ie0df93761f3194b6a90a4b7e7b867a43047a69b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5847692
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1355290}
2024-09-13 17:35:57 +00:00
Adithya Srinivasan
0d3e571812 AnchorElementInteraction: Remove feature flag guarding
Stops guarding code behind kAnchorElementInteraction, which has been
enabled for more than a year and is now only being used for two
parameters. Removes kAnchorElementMouseMotionEstimator which was
always enabled by default.

Change-Id: I4dfd95879260947681d3e2b2a89c96cf3846f1bb
Bug: 40268716
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5845653
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Adithya Srinivasan <adithyas@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1353320}
2024-09-10 14:10:34 +00:00
Mingyu Lei
f6f9bc1c91 Reland "Prompt API: bind the lifetime of AITextSession to the BucketContext"
This is a reland of commit d37f2ff988

Now we are adding AITextSessionSet either as a DocumentUserData (for
document) or SupportsUserData::Data (for workers). There is at most
1 AITextSessionSet per BucketContext, but we can create multiple
AITextSessions and store them in the AITestSessionSet. This solves
the problem that causes the revert of the previous CL.

There is also some refactor done to make the code more organized,
and easier for future changes to support more AI features.

Please compare patch set 7 against patch set 1 for the change.

Original change's description:
> Prompt API: bind the lifetime of AITextSession to the BucketContext
>
> According to the guideline, it's discouraged to bind a document-scoped
> object to the receiver, since the IPC connection may be kept beyond
> the document's life time.
>
> In this CL, the AITextSession object will own the receiver, and it
> will be either
> - added to the BucketContext through SupportsUserData if it's for
> workers, or
> - wrapped in a DocumentUserData if it's for document.
>
> More information can be found from this doc: https://docs.google.com/document/d/1oVIEXqqjBEEq5VqPgQXiHfN5u8fKDz6IAf-AczJGXIU
>
> Bug: 356809696
> Change-Id: I42e04f2729c6330433e745f88379a134db191b73
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5759567
> Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
> Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
> Commit-Queue: Mingyu Lei <leimy@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1339002}

Bug: 356809696
Change-Id: I59553fb27929ba8a40b8c14dc0d919135722e8f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5775466
Reviewed-by: Jiacheng Guo <gjc@google.com>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Mingyu Lei <leimy@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1342131}
2024-08-15 05:23:21 +00:00
Arnaud Mandy
624afa3320 compute pressure: Do not build code on Android and Fuchsia
The Compute Pressure API does not have any OS-specific backend
implementations for Android nor Fuchsia.

To reduce image size of these two builds, this patch excludes
the Compute Pressure code from the compilation.

Bug: 352144902
Change-Id: I1bee57f2f6846b08f666977f8321103a0bdce2e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5741247
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Arnaud Mandy <arnaud.mandy@intel.com>
Cr-Commit-Position: refs/heads/main@{#1339611}
2024-08-09 13:33:54 +00:00
Mingyu Lei
c75abf1f14 Revert "Prompt API: bind the lifetime of AITextSession to the BucketContext"
This reverts commit d37f2ff988.

Reason for revert: DocumentService should be used instead of DocumentUserData

Original change's description:
> Prompt API: bind the lifetime of AITextSession to the BucketContext
>
> According to the guideline, it's discouraged to bind a document-scoped
> object to the receiver, since the IPC connection may be kept beyond
> the document's life time.
>
> In this CL, the AITextSession object will own the receiver, and it
> will be either
> - added to the BucketContext through SupportsUserData if it's for
> workers, or
> - wrapped in a DocumentUserData if it's for document.
>
> More information can be found from this doc: https://docs.google.com/document/d/1oVIEXqqjBEEq5VqPgQXiHfN5u8fKDz6IAf-AczJGXIU
>
> Bug: 356809696
> Change-Id: I42e04f2729c6330433e745f88379a134db191b73
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5759567
> Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
> Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
> Commit-Queue: Mingyu Lei <leimy@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1339002}

Bug: 356809696
Change-Id: I6327617ff5b15746a2ef30b6d5d7866539f1ef07
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5775762
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Owners-Override: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1339478}
2024-08-09 05:10:26 +00:00
Mingyu Lei
d37f2ff988 Prompt API: bind the lifetime of AITextSession to the BucketContext
According to the guideline, it's discouraged to bind a document-scoped
object to the receiver, since the IPC connection may be kept beyond
the document's life time.

In this CL, the AITextSession object will own the receiver, and it
will be either
- added to the BucketContext through SupportsUserData if it's for
workers, or
- wrapped in a DocumentUserData if it's for document.

More information can be found from this doc: https://docs.google.com/document/d/1oVIEXqqjBEEq5VqPgQXiHfN5u8fKDz6IAf-AczJGXIU

Bug: 356809696
Change-Id: I42e04f2729c6330433e745f88379a134db191b73
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5759567
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Commit-Queue: Mingyu Lei <leimy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1339002}
2024-08-08 12:28:16 +00:00
Jiacheng Guo
3dbfb8a9f6 Decouple feature flags for running model in javascript with prompt API
The CL creates a new feature flag `AIPromptAPI` for controlling whether
`AITextSession.prompt` is available. The original `ModelExecutionAPI`
will be used for all the APIs using the on-device model infrastructure.

More detailed description can be found at:
https://docs.google.com/document/d/1ItyTz3Zi1fLko6NXbNLrdBNedS-oagBW66V4wX-oJeA/edit?usp=sharing

Bug: 351727485
Change-Id: Icebbdeab924ed1ceee33287e86a760642d291dca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5681534
Reviewed-by: Mingyu Lei <leimy@chromium.org>
Commit-Queue: Jiacheng Guo <gjc@google.com>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1330011}
2024-07-19 03:53:27 +00:00
janiceliu
2457d49d76 Remove SupportPartitionedBlobUrl feature flag
The flag now acts as always-enabled.

Bug: 346498600
Change-Id: Ifb4c977a748149e9e10ae68066cd960d137a5e4c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5647510
Reviewed-by: Brendon Tiszka <tiszka@chromium.org>
Reviewed-by: David Baron <dbaron@chromium.org>
Auto-Submit: Janice Liu <janiceliu@google.com>
Commit-Queue: Janice Liu <janiceliu@google.com>
Reviewed-by: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1324991}
2024-07-09 18:15:57 +00:00
Andrew Verge
9c6d4216dc Don't bind P2PSocketManager in fenced frames.
We've already disallowed RTCPeerConnection in fenced frames in the
renderer (behind a flag). This should prevent WebRTC P2P connections from being established legitimately. See renderer CL here:
https://chromium-review.googlesource.com/c/chromium/src/+/5527514

However, we should have an extra layer of protection in the browser
to defend against a compromised renderer. This change prevents
the browser from binding a P2PSocketManager in the network service
if the corresponding frame is in a fenced frame tree. Essentially
we've severed the connection between the fenced frame and the
network service by using the browser as an intermediary, so that
no P2P connections can be established within the frame.

This does feel like a roundabout way to achieve the desired behavior. However, from what I can tell, RTCPeerConnection doesn't have a "host object" in the browser, and creating peer-to-peer sockets occurs directly between the renderer and the network service via IPC[1]. So blocking that IPC connection from being established in the trusted browser process seemed like the next best thing.

I don't think there's a great way to test this change, since the renderer already prevents p2p communication, so a browsertest that tries to exercise the RTCPeerConnection API won't provide additional coverage. Additionally, we can't probe the network service to see if the P2PSocketManager exists or not.

[1]: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/p2p/ipc_socket_factory.cc;drc=b0b102b6582fe1fca4a5eb6b156f198113674ec7;l=392

Change-Id: I492ab7bd7e900a0ca009e9a880c871a77d9ee76a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5672111
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Commit-Queue: Andrew Verge <averge@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1322704}
2024-07-03 11:43:56 +00:00
Austin Sullivan
1eab2dc05a Remove the Model Loader API - part 2/n
Deletes all flags related to the Model Loader API. The code these flags
guarded was deleted in https://crrev.com/c/5666054

Bug: 350407897
Change-Id: I9361b000395ea076e4ff826286544ac9b32fe0cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5669977
Reviewed-by: Vladimir Levin <vmpstr@chromium.org>
Reviewed-by: Alex Gough <ajgo@chromium.org>
Commit-Queue: Charlie Reis <creis@chromium.org>
Commit-Queue: Austin Sullivan <asully@chromium.org>
Auto-Submit: Austin Sullivan <asully@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1322334}
2024-07-02 18:50:52 +00:00
Raphael Kubo da Costa
e8d284ae32 compute pressure: Add WebPressureManager to Blink
For now it exposes the same method as the PressureManager Mojo interface
in //services, but they will ultimately diverge when the latter starts
supporting virtual pressure sources.

Make Blink's FakePressureService inherit from WebPressureManager, not
//service's PressureManager. SetBinderForTesting() can only intercept
requests from Blink, which means it should be intercepting attempts to
connect to the WebPressureManager interface instead.

Bug: 347031400
Change-Id: I19da6513c2e5328780ea0f7ec9bc66e4ce9d9e26
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5660418
Reviewed-by: Arnaud Mandy <arnaud.mandy@intel.com>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/main@{#1321579}
2024-07-01 08:46:30 +00:00
Lukasz Anforowicz
5fd0efb315 Remove unused, unsafe AgentGroupSchedulerImpl::broker_ field.
This field is:

* Unsafe in presence of Oilpan (see https://crbug.com/40261265)
* Not actually used - there are no callers of
  `AgentGroupScheduler::GetBrowserInterfaceBroker`.  This method was
  added in https://crrev.com/c/2677585 and AFAICT no callers have ever
  been added later - for example this command finds no other commits:
  `git log -S AgentSched -- content/browser/browser_interface_binders.cc`

Removing this field also helps to make progress on
https://crbug.com/41482945 - this field is related to 1 out of 5 callers
of `BrowserInterfaceBrokerProxy::Bind` and the linked bug requires
passing `ContextLifecycleNotifier` to `HeapMojoRemote`.  I note that
`AgentGroupSchedulerImpl::BindInterfaceBroker` seems to be the only
caller of `BrowserInterfaceBrokerProxy::Bind` which doesn't have a 1:1
relationship with a `ContextLifecycleNotifier` (which IIUC roughly
corresponds to the `ExecutionContext`).  The other callers are 1)
constructor of `WorkerGlobalScope`, 2) constructor of
`content::RenderFrameImpl`, 3)
`MojoBindingContext::SetMojoJSInterfaceBroker` (we ignore here
`GetEmptyBrowserInterfaceBroker` which doesn't actually need to bind an
actual mojo remote).

Fixed: 40261265
Bug: 41482945
Change-Id: Id07826bb008bea6157a30868a56ad05ad3bbc675
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5646657
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Auto-Submit: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Emily Stark <estark@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Scott Haseley <shaseley@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1319775}
2024-06-26 15:29:53 +00:00
Austin Sullivan
d57e15705b webnn: Move mojom feature flag to //services/webnn/public
This feature flag was the only remaining code in components/ml/webnn/

This CL has no functional changes

Cq-Include-Trybots: luci.chromium.try:win11-blink-rel
Change-Id: I7865ead612c3f78b961d974502e0f307c1041faa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5648306
Reviewed-by: Alex Gough <ajgo@chromium.org>
Commit-Queue: Austin Sullivan <asully@chromium.org>
Commit-Queue: Kyle Charbonneau <kylechar@chromium.org>
Reviewed-by: Maggie Chen <magchen@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Auto-Submit: Austin Sullivan <asully@chromium.org>
Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1318775}
2024-06-24 20:53:16 +00:00
Abhishek Shanthkumar
7aee48b20b IDB: Add an inspect control in indexeddb-internals
This CL adds an "Inspect" action in chrome://indexeddb-internals
for each client (tab/worker) making IDB transactions.
Web developers can use this to identify the exact tab that
transactions originated from.

Bug: 336960312
Fuchsia-Binary-Size: Uncompressed growth (8K) is below threshold
Change-Id: Ib8452afb421bb95781d2e9bcf908d56d531e01ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5607565
Reviewed-by: Brad Triebwasser <btriebw@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Evan Stade <estade@chromium.org>
Commit-Queue: Abhishek Shanthkumar <abhishek.shanthkumar@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1318574}
2024-06-24 15:02:47 +00:00
Mingyu Lei
3cb40d600d Prompt API: support shared workers and service workers
The prompt API is now able to run on shared workers and service
workers. This CL also adds some WPTs to test that using the mock
implementation of AIManager.

Bug: 342939487
Change-Id: Ib615497d49403b64930dc99cf6005f28a17d4d14
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5613194
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Mingyu Lei <leimy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1315035}
2024-06-14 04:38:19 +00:00
Mingyu Lei
682f6584a7 Prompt API: make AIManager a BrowserContextKeyedService
The AIManager was per RenderFrameHost when the AI API is only
available on DOM windows and dedicated workers. To support the API for
shared worker / service worker, the AIManager is now changed to be
per browser context. Each of the AIManagerKeyedService may have
multiple receivers from different execution contexts.

Bug: 342939487
Change-Id: Ide28c7675cf3e48ef1dc0bd357bb7d9563a36dc7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5589190
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Ryan Sultanem <rsult@google.com>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Mingyu Lei <leimy@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1315034}
2024-06-14 04:26:59 +00:00
Mingyu Lei
0b5079a888 Prompt API: make the api available on dedicated workers
Bug: 342939487
Change-Id: I1cc3dc0bf4525966e7442819e8ea08afa11256bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5573694
Commit-Queue: Mingyu Lei <leimy@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Domenic Denicola <domenic@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1307977}
2024-05-30 14:00:58 +00:00
Mingyu Lei
9de94c6d49 Reland "Reland "Bundz rename [2]: rename the mojom, caller and implementation""
This reverts commit f3e06ca6cb.

Reason for revert: the previous reland CL2 was reverted to allowed another revert of CL1, now the other CL1 has been relanded, so we will revert this revert to reland CL2 again.

Original change's description:
> Revert "Reland "Bundz rename [2]: rename the mojom, caller and implementation""
>
> This reverts commit 0e5fe59bc5.
>
> Reason for revert: Prevents revert at https://crrev.com/c/5571347 which fixes generate issues like in https://ci.chromium.org/ui/p/chrome/builders/ci/android-arm/37311/overview
> Example log:
> Step generate_build_files failed. Error logs are shown below:
> ERROR at //build/config/android/internal_rules.gni:171:21: Unable to load "/b/s/w/ir/cache/builder/src/chrome/browser/model_execution/android/BUILD.gn".
>           deps += [ "$_dep_label$build_config_target_suffix" ]
>
> Original change's description:
> > Reland "Bundz rename [2]: rename the mojom, caller and implementation"
> >
> > This is a reland of commit 42a4032fac
> >
> > The previous CL didn't update the mojo interface name from chrome/test/fuzzing/renderer_fuzzing/ipc_fuzzing/mojom_interfaces.gni so it causes compilation failure.
> >
> > The fix is added in Patchset 2.
> >
> > Original change's description:
> > > Bundz rename [2]: rename the mojom, caller and implementation
> > >
> > > Bug: 341851444
> > > Change-Id: Iae6e3c7a621f1812ee7a8d53d54c3e5b1bf6a5ea
> > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5553518
> > > Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
> > > Reviewed-by: Kentaro Hara <haraken@chromium.org>
> > > Reviewed-by: Erik Chen <erikchen@chromium.org>
> > > Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
> > > Commit-Queue: Mingyu Lei <leimy@chromium.org>
> > > Reviewed-by: Fergal Daly <fergal@chromium.org>
> > > Cr-Commit-Position: refs/heads/main@{#1306609}
> >
> > Bug: 341851444
> > Change-Id: Ia3ec4f886ede74356c788a59be30467cebf57f1d
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5568406
> > Commit-Queue: Mingyu Lei <leimy@chromium.org>
> > Reviewed-by: Erik Chen <erikchen@chromium.org>
> > Reviewed-by: Kentaro Hara <haraken@chromium.org>
> > Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
> > Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1306663}
>
> Bug: 341851444
> Change-Id: Ibd2370ebd0bc2ea3c24010adb68f9593b6c52b36
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5569201
> Auto-Submit: Friedrich Horschig <fhorschig@chromium.org>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
> Owners-Override: Vasilii Sukhanov <vasilii@chromium.org>
> Commit-Queue: Vasilii Sukhanov <vasilii@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1306668}

Bug: 341851444
Change-Id: I908aa7f38a2538c85da98b432b9048edf7eed726
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5580094
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Mingyu Lei <leimy@chromium.org>
Reviewed-by: Fergal Daly <fergal@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1307251}
2024-05-29 07:14:42 +00:00
Mingyu Lei
65f1a30b7b Reland "Bundz rename [1]: rename the browser implementation of the AI manager"
This is a reland of commit 9da71c87ef

To avoid breaking the android tryjob, the
//chrome/model_execution/android now stays in its original location.

Please see patchset 2 for the changes made during the reland.

Original change's description:
> Bundz rename [1]: rename the browser implementation of the AI manager
>
> Bug: 341851444
> Change-Id: Ib98561e00c3316a3214b7c429cf2d5fc4089bf57
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5553216
> Reviewed-by: Erik Chen <erikchen@chromium.org>
> Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
> Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
> Commit-Queue: Mingyu Lei <leimy@chromium.org>
> Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#1306573}

Bug: 341851444
Change-Id: I73abfe4d0a51dc79f5f34b0c7b10ad47a93201fb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5575794
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Fergal Daly <fergal@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Mingyu Lei <leimy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1307232}
2024-05-29 06:21:47 +00:00
Timofey Chudakov
5ebcad980b Revert "Bundz rename [1]: rename the browser implementation of the AI manager"
This reverts commit 9da71c87ef.

Reason for revert: this CL break android compilation.

Original change's description:
> Bundz rename [1]: rename the browser implementation of the AI manager
>
> Bug: 341851444
> Change-Id: Ib98561e00c3316a3214b7c429cf2d5fc4089bf57
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5553216
> Reviewed-by: Erik Chen <erikchen@chromium.org>
> Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
> Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
> Commit-Queue: Mingyu Lei <leimy@chromium.org>
> Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#1306573}

Bug: 341851444
Change-Id: Ia2b8963dfee3f4241be449f956c9972cc369d3b0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5571347
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Sayed El-Abady <elabadysayed@google.com>
Reviewed-by: Friedrich Horschig <fhorschig@chromium.org>
Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
Commit-Queue: Friedrich Horschig <fhorschig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1306669}
2024-05-28 10:05:23 +00:00
Friedrich Horschig
f3e06ca6cb Revert "Reland "Bundz rename [2]: rename the mojom, caller and implementation""
This reverts commit 0e5fe59bc5.

Reason for revert: Prevents revert at https://crrev.com/c/5571347 which fixes generate issues like in https://ci.chromium.org/ui/p/chrome/builders/ci/android-arm/37311/overview
Example log:
Step generate_build_files failed. Error logs are shown below:
ERROR at //build/config/android/internal_rules.gni:171:21: Unable to load "/b/s/w/ir/cache/builder/src/chrome/browser/model_execution/android/BUILD.gn".
          deps += [ "$_dep_label$build_config_target_suffix" ]

Original change's description:
> Reland "Bundz rename [2]: rename the mojom, caller and implementation"
>
> This is a reland of commit 42a4032fac
>
> The previous CL didn't update the mojo interface name from chrome/test/fuzzing/renderer_fuzzing/ipc_fuzzing/mojom_interfaces.gni so it causes compilation failure.
>
> The fix is added in Patchset 2.
>
> Original change's description:
> > Bundz rename [2]: rename the mojom, caller and implementation
> >
> > Bug: 341851444
> > Change-Id: Iae6e3c7a621f1812ee7a8d53d54c3e5b1bf6a5ea
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5553518
> > Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
> > Reviewed-by: Kentaro Hara <haraken@chromium.org>
> > Reviewed-by: Erik Chen <erikchen@chromium.org>
> > Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
> > Commit-Queue: Mingyu Lei <leimy@chromium.org>
> > Reviewed-by: Fergal Daly <fergal@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1306609}
>
> Bug: 341851444
> Change-Id: Ia3ec4f886ede74356c788a59be30467cebf57f1d
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5568406
> Commit-Queue: Mingyu Lei <leimy@chromium.org>
> Reviewed-by: Erik Chen <erikchen@chromium.org>
> Reviewed-by: Kentaro Hara <haraken@chromium.org>
> Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
> Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1306663}

Bug: 341851444
Change-Id: Ibd2370ebd0bc2ea3c24010adb68f9593b6c52b36
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5569201
Auto-Submit: Friedrich Horschig <fhorschig@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
Owners-Override: Vasilii Sukhanov <vasilii@chromium.org>
Commit-Queue: Vasilii Sukhanov <vasilii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1306668}
2024-05-28 10:00:55 +00:00