0
Commit Graph

442 Commits

Author SHA1 Message Date
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
Mingyu Lei
0e5fe59bc5 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}
2024-05-28 09:31:28 +00:00
Vasilii Sukhanov
bafcff3be4 Revert "Bundz rename [2]: rename the mojom, caller and implementation"
This reverts commit 42a4032fac.

Reason for revert: Broke compilation here https://ci.chromium.org/ui/p/chromium/builders/ci/Centipede%20Upload%20Linux%20ASan/21958/overview

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: Idcbadcecfd8da4e85a569a634f7f2437d54ea534
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5573791
Owners-Override: Vasilii Sukhanov <vasilii@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Vasilii Sukhanov <vasilii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1306644}
2024-05-28 08:19:10 +00:00
Mingyu Lei
42a4032fac 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}
2024-05-28 06:37:49 +00:00
Mingyu Lei
9da71c87ef 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}
2024-05-28 02:22:02 +00:00
Evan Liu
d725228c05 Move Web Speech API .mojom files to //media/mojo/mojom
This CL moves the Web Speech API .mojom files to //media/mojo/mojom so that they can be used by the speech recognition service. //media cannot depend on //third_party/blink/public/mojom due to circular dependencies.

Bug: 1495388
Change-Id: Ibd59ced528b323497eafc9f8230b609c2ef14445
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5528282
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
Reviewed-by: Brendon Tiszka <tiszka@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Commit-Queue: Evan Liu <evliu@google.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1302179}
2024-05-16 20:10:32 +00:00
Seung Jae Lim
c16c5e138a Create a pipeline from render frame host to VibrationManager
Design doc: go/crca-cspp-ping-vibration-api

Change-Id: I7b34c92559fcca9f650240b4b7afab3c76f9a7da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5490193
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Commit-Queue: Seung Jae Lim <andysjlim@chromium.org>
Reviewed-by: Matt Reynolds <mattreynolds@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299589}
2024-05-10 23:30:00 +00:00
Mingyu Lei
f4477677b5 Bundz: expose model execution to content and implement mocks
This CL adds a mock implementation of model_execution from //content,
so we can write WPT for the API.

Bug: 330833021
Change-Id: I83ffd0d0438629864701e1d65d93cbe27f4363c1
Fuchsia-Binary-Size: The increase looks quite random, and this CL is only adding a mock implementation.
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5440485
Reviewed-by: Fergal Daly <fergal@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Mingyu Lei <leimy@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1286344}
2024-04-12 07:23:56 +00:00
Feras Aldahlawi
d996da7508 Move KeySystems browser mojo channel to per-frame model
Currently, KeySystem channels gets created per-frame on the renderer
side. This change will also move the browser side channel creation to a
per-frame model.

Bug: b/321307544
Change-Id: I1ae7181fc1f1aa89b594a31aa265d5621cefe669
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5410708
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Feras Aldahlawi <feras@chromium.org>
Reviewed-by: Sean Topping <seantopping@chromium.org>
Reviewed-by: Zijie He <zijiehe@google.com>
Reviewed-by: John Rummell <jrummell@chromium.org>
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1282683}
2024-04-04 19:27:29 +00:00
junwei
cdff0aee86 webnn: Enable WebNN implementation on CrOS
This CL uses ML Service on CrOS platform to load and compute the TFLite
model that is converted from WebNN graph. The WebNN Service should be
in browser process because the ML Service connection require as
documented here [1], the connection is initialized in browser process
here [2].

The `ModelLoader` interface needs to be created if needed to load TFLite
model for WebNN graph building, then compute the model with `Model`
interface provided ML Service.

[1] https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform2/ml/mojom/machine_learning_service.mojom;l=48?q=ml%2Fmojom%2Fmachine_learning_service.mojom
[2] https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ash/chrome_browser_main_parts_ash.cc;l=1022;drc=a4c7bbe208f9caf621a85cc5e12aa6892d6a5e7a

Bug: 327026293
Change-Id: I893ddde8fe0442da04ed24fe1457695e71341b41
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5382266
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Alex Gough <ajgo@chromium.org>
Reviewed-by: ningxin hu <ningxin.hu@intel.com>
Reviewed-by: Andrew Moylan <amoylan@chromium.org>
Commit-Queue: Junwei Fu <junwei.fu@intel.com>
Cr-Commit-Position: refs/heads/main@{#1278132}
2024-03-26 05:40:31 +00:00
Ming-Ying Chung
8e11871df8 Clean up PendingBeaconAPI-related implementation
It was an experimental API only enabled for OT from M107-M115 [1].
Since then, it has been replaced by the fetchLater API [2], which is
currently running in OT [3].

[1]: https://chromestatus.com/feature/5690553554436096
[2]: https://github.com/WICG/pending-beacon/blob/main/docs/fetch-later-api.md
[3]: https://chromestatus.com/feature/4654499737632768

OBSOLETE_HISTOGRAM[PendingBeaconHost.BatchAction]=Removed entire API
OBSOLETE_HISTOGRAM[PendingBeaconHost.Action]=Removed entire API

Bug: b:40213606
Change-Id: I391bb3d38cdf11b40f6dc7cd755eded0923deb7d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5367498
Reviewed-by: Sean Harrison <harrisonsean@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Ming-Ying Chung <mych@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1276738}
2024-03-22 07:15:07 +00:00
Takuto Ikuta
0800801574 Revert "content: add an wrapper for ad_auction_service_impl"
This reverts commit 56e15be848.

Reason for revert:
https://groups.google.com/a/chromium.org/g/content-owners/c/Derds-ksWGM#:~:text=in%20render_frame_impl.h.-,In%20the%20meantime%20can%20we%20revert%20the%20other%20changes%3F,-For%20future%20problems

Original change's description:
> content: add an wrapper for ad_auction_service_impl
>
> This is to remove one indirect include of render_frame_host_impl.h
> from browser_interface_binders.cc to reduce compile time in critical
> path of build and utilize build parallelism more for faster build.
>
> This is extracted from https://crrev.com/c/5252622.
>
> Bug: b/322102823
> Change-Id: I38d0fb98ff9a160c6cb74734d29a9d8516b63a9c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5256383
> Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
> Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
> Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
> Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1256553}

Bug: b/322102823
Change-Id: I3568a6252dafa6979e3d67ab7940a8e5e21f1f4e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5276687
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1258408}
2024-02-09 09:15:19 +00:00
Takuto Ikuta
7cdebf6eba Revert "content: add an wrapper for keyboard_lock_service_impl"
This reverts commit c03ba0c3fa.

Reason for revert:
https://groups.google.com/a/chromium.org/g/content-owners/c/Derds-ksWGM#:~:text=in%20render_frame_impl.h.-,In%20the%20meantime%20can%20we%20revert%20the%20other%20changes%3F,-For%20future%20problems

Original change's description:
> content: add an wrapper for keyboard_lock_service_impl
>
> This is to remove one indirect include of render_frame_host_impl.h
> from browser_interface_binders.cc to reduce compile time in critical
> path of build and utilize build parallelism more for faster build.
>
> This is extracted from https://crrev.com/c/5252622.
>
> Bug: b/322102823
> Change-Id: I4cfd55855ef267b747ab85c141533a3bf524ae35
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5256384
> Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
> Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
> Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1256626}

Bug: b/322102823
Change-Id: Idff5df4c290b37dd41ab53e637e1248e3e04a1d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5273391
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1258405}
2024-02-09 09:01:41 +00:00
Peter Kotwicz
3a1ff04416 Move RWI code out of federated_auth_request_impl.cc part 2/2
This CL:
- Moves the real world identity code out of
  federated_auth_request_impl.cc
- Changes credentials_container.cc to route through
  mojom::blink::DigitalIdentityRequest instead of through
  mojom::blink::FederatedAuthRequest

BUG=1524182

Change-Id: I4db090cef50994b0ee4edc1038b7a6b57afc585b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5259483
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1257562}
2024-02-07 20:50:39 +00:00
Takuto Ikuta
c03ba0c3fa content: add an wrapper for keyboard_lock_service_impl
This is to remove one indirect include of render_frame_host_impl.h
from browser_interface_binders.cc to reduce compile time in critical
path of build and utilize build parallelism more for faster build.

This is extracted from https://crrev.com/c/5252622.

Bug: b/322102823
Change-Id: I4cfd55855ef267b747ab85c141533a3bf524ae35
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5256384
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1256626}
2024-02-06 06:15:11 +00:00
Takuto Ikuta
56e15be848 content: add an wrapper for ad_auction_service_impl
This is to remove one indirect include of render_frame_host_impl.h
from browser_interface_binders.cc to reduce compile time in critical
path of build and utilize build parallelism more for faster build.

This is extracted from https://crrev.com/c/5252622.

Bug: b/322102823
Change-Id: I38d0fb98ff9a160c6cb74734d29a9d8516b63a9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5256383
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1256553}
2024-02-06 02:06:25 +00:00
Alexis Menard
d99e01fcf7 [Device Posture] Move device posture implementation out of services/
It's becoming clear that the posture is not a global state. On Android
the posture is tied to an Activity : for example an Android Activity can
be on an external screen or two Chrome instances side by side and Android does not return the physical posture of the device. While right now Windows is a global state we can imagine scenarios like this where the "logical" posture doesn't match the physical posture.

This patch moves the device_posture mojo implementation out of services/. This means that now it is attached to a given web content. This allows us to simplify some of the implementation now that we can assume the receivers are from the same web content.

Also now that we are in the content/ layer we can directly hook into the device posture classes to implement the viewport segments support in RWHA.

Bug: 1517764
Change-Id: I173d6913d953134dc6f1973d511b5e874de38158
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5202826
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Commit-Queue: Alexis Menard <alexis.menard@intel.com>
Cr-Commit-Position: refs/heads/main@{#1253273}
2024-01-29 14:39:37 +00:00
Stephen McGruer
b721a3f3fe [SPC] Allow 'publickey-credentials-create' for SPC creation
https://crrev.com/ab904a46 added the ability to use the
'publickey-credentials-create' permissions policy for WebAuthn
credential creation in a cross-origin iframe. However, if the
credential was for SPC (i.e., has the "payment" extension
specified), it still required the 'payment' permission policy.

This CL changes it so that SPC credential creation can occur in a
cross-origin iframe that has *either* the 'payment' (for backwards
compatibility) or 'publickey-credentials-create' policy.

In order to have content/browser/webauth/webauth_browsertest.cc
cover SPC credential creation, we needed //content to have some
sort of PaymentCredential mojo service. As such, this CL also adds
a stub PaymentCredential service for //content (which is overridden
with the real version for //chrome). This has the side effect of
making a WPT test start passing (as it was only failing due to the
lack of a //content hook for the given mojo API).

The change is still behind the
WebAuthnAllowCreateInCrossOriginFrame flag.

Bug: 1512605
Change-Id: Icfd61c5c294e85a5c273b2ff8ccca13e1070dab6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5141746
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1248755}
2024-01-18 14:58:12 +00:00
Mingyu Lei
eca89f29f6 Bundz: implement model manager and binding from browser
Adds blink::mojom::ModelManager implementation and binding logic from
the browser process. It has 1-to-1 association with the RFH and provides
method to create new session.

of the API, more test will be added when it's more finalized.

Bug: 1513585
Low-Coverage-Reason: TESTS_IN_SEPARATE_CL this is an early prototype
Change-Id: I26ae7b2c9b7f563c9fd8295b4411c56b283e0aef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5143649
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Clark DuVall <cduvall@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Mingyu Lei <leimy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1247009}
2024-01-15 04:44:51 +00:00
Alex Gough
6ae9128ea3 Use mojo feature for WebMachineLearningNeuralNetwork
Moves the c++ definition of this feature to mojo, and annotates
the key interfaces with RuntimeFeature= attribute to gate use
and serialization on the feature state.

Note: moves {ml_graph_test_mojo.cc => ml_graph_mojo_test.cc} to
allow blink presubmits to ignore the file.

DanglingUntriaged-notes: renaming existing file.
Bug: 1273291
Change-Id: I6b8dd360945ae1f70dcf0ba1502feb1bdded4fef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5120103
Reviewed-by: Peter McNeeley <petermcneeley@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
Reviewed-by: Jiewei Qian <qjw@chromium.org>
Reviewed-by: Dominic Farolino <dom@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: Mustafa Emre Acer <meacer@chromium.org>
Reviewed-by: ningxin hu <ningxin.hu@intel.com>
Cr-Commit-Position: refs/heads/main@{#1238848}
2023-12-18 23:19:23 +00:00
Wei4 Wang
353aca0476 [ComputePressure] Add PressureServiceForWorker.
This CL adds a class named PressureServiceForWorker which holds
functions only for workers.

Bug: 1500467
Change-Id: Ief9d92dc470c141846a1fe9d2701980a70363e93
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4951586
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Wei4 Wang <wei4.wang@intel.com>
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1237362}
2023-12-14 03:40:58 +00:00
Wei4 Wang
a90dd3122e [ComputePressure] Split PressureServiceImpl.
This CL splits PressureServiceImpl into PressureServiceBase and
PressureServiceForFrame. PressureServiceBase holds common functions
for both frame and workers. PressureServiceForFrame holds functions
only for frame. There will be a class named PressureServiceForWorker
holding functions only for workers.

Bug: 1500467
Change-Id: I877eb3b3b7310a3b79c4d5bd916986c2fafb9be8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4951054
Reviewed-by: Sam McNally <sammc@chromium.org>
Reviewed-by: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Wei4 Wang <wei4.wang@intel.com>
Cr-Commit-Position: refs/heads/main@{#1237347}
2023-12-14 02:35:32 +00:00
Wei4 Wang
78e6eab549 [ComputePressure] Re-route CP through content/browser.
This CL partially reverts commit [1] to re-route CP through
content/browser. The reason for revert is: privacy test is currently
done in Blink. However, we can not get enough information to implement
improved privacy test [2] in Blink. So we should re-route CP through
content/browser first, then we can move privacy test from Blink to
content/browser.

This CL reuses existing mojom IPC (mojom.PressureClient and
mojom.PressureManager) on both sides of the browser module. The code
path is as follows:
blink::PressureObserverManager -> mojom.PressureManager
-> content::PressureServiceImpl -> mojom.PressureManager
-> device::PressureManagerImpl
device::PressureManagerImpl -> mojom.PressureClient
-> content::PressureClientImpl-> mojom.PressureClient
-> blink::PressureClientImpl

[1] https://chromium-review.googlesource.com/c/chromium/src/+/4126666
[2] https://github.com/w3c/compute-pressure/pull/238/files

Bug: 1500467
Change-Id: I8ce020a796a275c0851e5927f920c95391822d51
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4945517
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com>
Commit-Queue: Wei4 Wang <wei4.wang@intel.com>
Cr-Commit-Position: refs/heads/main@{#1237327}
2023-12-14 01:47:28 +00:00