0
Commit Graph

794 Commits

Author SHA1 Message Date
b1c91d9b6a [video pip] Add progress bar to 2024 UI
This CL adds a progress bar to the video picture-in-picture controls.
It reuses the existing MediaProgressView element for this, and routes
the commands to the VideoPictureInPictureWindowController.

Bug: 360357715
Change-Id: I209d3d7a0c045fe00ec972861763789ce8c6aa2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5912245
Reviewed-by: Peter Kvitek <kvitekp@chromium.org>
Reviewed-by: Tommy Steimel <steimel@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Tommy Steimel <steimel@chromium.org>
Reviewed-by: Fr <beaufort.francois@gmail.com>
Cr-Commit-Position: refs/heads/main@{#1378645}
2024-11-05 22:06:08 +00:00
731c62b266 use c++20 starts_/ends_-with //blink
Bug: 40256235
Change-Id: If297502ad749bd92360116c3bde90051d81176d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5982559
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Helmut Januschka <helmut@januschka.com>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1378592}
2024-11-05 20:56:46 +00:00
6a0d165067 [web-tests] Dedup --disable-gpu-process-for-dx12-info-collection
`WebTestBrowserMainRunner::Initialize()` adds this switch twice.

Bug: None
Change-Id: I9e9d0954722c632f48c4985a0d3842d3d858eedf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5990232
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Auto-Submit: Jonathan Lee <jonathanjlee@google.com>
Cr-Commit-Position: refs/heads/main@{#1378461}
2024-11-05 18:24:25 +00:00
9a7e491a5c Don't show popups (e.g. <select>) if the tab isn't focused
It was previously possible for pickers like <select>'s picker to be
shown on top of the not-currently-focused tab, confusing the user.
With this change, the select picker must be the currently-focused
tab for the picker to be opened. This is akin to existing protections
for the tab being visible.

Fixed: 365089001
Change-Id: Id2b15f5d310cce877341d7e9d5a5c5d6da882887
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5909884
Reviewed-by: Alexander Timin <altimin@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1377731}
2024-11-04 17:33:17 +00:00
01792837d2 Revert "bluetooth: Use base::span when writing characteristics and descriptors"
This reverts commit c128543f07.

Reason for revert: Failures caused tree closure https://ci.chromium.org/ui/p/chromium/builders/ci/linux-cast-arm64-rel/5543/overview

Original change's description:
> bluetooth: Use base::span when writing characteristics and descriptors
>
> Updates the platform-independent API, platform-specific backends and
> tests.
>
> Change-Id: Ia39d59f568ea7cc25f75d15a11a1fb48fb2b5d52
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5980562
> Auto-Submit: Reilly Grant <reillyg@chromium.org>
> Reviewed-by: Jon Mann <jonmann@chromium.org>
> Commit-Queue: Jon Mann <jonmann@chromium.org>
> Reviewed-by: Jon Mann <jonmann@google.com>
> Reviewed-by: Jack Hsieh <chengweih@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1377107}

Change-Id: I0135c4a4f0b55089565267021d8614160a0c0cad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5984963
Owners-Override: Angela Yoeurng <yoangela@chromium.org>
Commit-Queue: Angela Yoeurng <yoangela@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Angela Yoeurng <yoangela@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1377117}
2024-11-01 22:01:40 +00:00
c128543f07 bluetooth: Use base::span when writing characteristics and descriptors
Updates the platform-independent API, platform-specific backends and
tests.

Change-Id: Ia39d59f568ea7cc25f75d15a11a1fb48fb2b5d52
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5980562
Auto-Submit: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Jon Mann <jonmann@chromium.org>
Commit-Queue: Jon Mann <jonmann@chromium.org>
Reviewed-by: Jon Mann <jonmann@google.com>
Reviewed-by: Jack Hsieh <chengweih@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1377107}
2024-11-01 21:47:27 +00:00
fc7ddc185b Migrate to NOTREACHED() in content/
NOTREACHED() and NOTREACHED_IN_MIGRATION() are both CHECK-fatal now.
The former is [[noreturn]] so this CL also performs dead-code removal
after the NOTREACHED().

This CL does not attempt to do additional rewrites of any surrounding
code, like:

if (!foo) {
  NOTREACHED();
}

to CHECK(foo);

Those transforms take a non-trivial amount of time (and there are
thousands of instances). Cleanup can be left as an exercise for the
reader.

This does clean up kCrashOnDanglingBrowserContext as both paths of the
kill switch are currently fatal. This has been rolled out for a long
time.

Bug: 40580068, 40062641
Change-Id: Ib88e710d003e2e48df3fc502ca54d2341d157a0e
Cq-Include-Trybots: luci.chromium.try:linux-dcheck-off-rel
Low-Coverage-Reason: OTHER Should-be-unreachable code
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5974816
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Auto-Submit: Peter Boström <pbos@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1376522}
2024-10-31 19:37:21 +00:00
081c2ad319 Use scoped access for shared image in TestPlugin
As part of the ClientSharedImage refactoring, this CL uses scoped
access objects in TestPlugin to automatically manage the access to
the shared image.

Bug: 40286368
Change-Id: I1adb96b0790aabd583d167d4ff9c8587b80a9526
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5973519
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Commit-Queue: Mingjing Zhang <mjzhang@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1375677}
2024-10-30 05:20:08 +00:00
27cc6bec44 [media] Apply inside blink to renderer/platform/media
Move some more blink media code into platform/media from public/platform/media. This allows us to use KURL directly and
not go to a WebURL on some calls.

Apply INSIDE_BLINK macro to other code that is in platform/media so
it will use the internal types. This is necessary because this code uses
blink mojom types and we want to enforce that blink mojo headers are
only included inside blink. Fortunately this addresses some of the
discouraged type overrides in the media code.

BYPASS_LARGE_CHANGE_WARNING=File move

Change-Id: I712128d82bb7e1971548f22aaadfdf31a7393ad6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5962517
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1374973}
2024-10-29 00:05:45 +00:00
097916145a Ignore native platform mouse events in web tests.
For web tests this stops WindowEventDispatcher::SynthesizeMouseMoveEvent
from sending the renderer a mousemove, which it normally does on startup
and whenever we swap in a new RenderWidgetHostView.

The benefits of this change are:

- Eliminating potential flakiness by making the web tests more order-
  agnostic.  Tests can behave differently with the mouse at (0,0) versus
  the position-unknown state which is restored in between test runs by
  EventHandler::ResetLastMousePositionForWebTest.  This also helps to
  de-risk upcoming web test isolation changes (go/web-test-isolation).

- Aligning Windows and Linux behavior with Mac.  AppKit sends a native
  mousemove to a new on-screen RWHV, similar to what Aura synthesizes.
  But AppKit does NOT send these mousemoves to headless web tests.

Bug: 374783343
Change-Id: I6b1d7234410cd6fa799954845bb5b50f5a2b82ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5808379
Commit-Queue: Steve Kobes <skobes@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372147}
2024-10-22 17:26:30 +00:00
41188d4167 DocumentSubresourceFilter: Switch to RequestDestination.
This patch refactors DocumentSubresourceFilter to use network::mojom::RequestDestination instead of blink::mojom::RequestContextType.
Update subsequent dependencies and tests.

Bug: 373206908
Change-Id: I1c64cdf5ccf1737ec0c1860cfef8a34e60d639e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5933188
Reviewed-by: John Delaney <johnidel@chromium.org>
Commit-Queue: John Kim <johnykim@google.com>
Reviewed-by: Martin Verde <thesalsa@google.com>
Reviewed-by: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372059}
2024-10-22 15:29:09 +00:00
99e9d6690c [shared storage] Check IsInterestGroupAPIAllowed() for interestGroups()
What: Check privacy sandbox settings for interestGroups().

How:
1. Add `browser_context` to the `IsInterestGroupAPIAllowed()` parameters
   to get the `PrivacySandboxSettings` for general permission check.
   This is because `render_frame_host` can be null (e.g., due to the
   initiator frame being destroyed and the worklet is in keep-alive
   phase). In this case, certain operations like console error will
   be skipped, but the core permission check will still be
   performed.
2. Introduce and use a new InterestGroupApiOperation::kRead type.

Bug: 367992703
Change-Id: I9e1b44efc3f67a408433e6284be82197bb594a73
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5936920
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Russ Hamilton <behamilton@google.com>
Reviewed-by: Fiona Macintosh <fmacintosh@google.com>
Reviewed-by: Ben Kelly <wanderview@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1370140}
2024-10-17 18:05:33 +00:00
332e097811 Modernize codec usage in content/
Codec calls have new API that uses std::optional and spans. Switch usage
to those new APIs, and lightly modernize the calling code.

Bug: 370696612
Change-Id: I84589ca62e8ab5ae7c560e295b6b6b20a7403114
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5938466
Auto-Submit: Avi Drissman <avi@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1369823}
2024-10-17 07:11:44 +00:00
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
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
11eecbbd95 Use clearer parameter name in CreateLoginDelegate
The is_request_for_primary_main_frame parameter of CreateLoginDelegate()
could mean whether the request is for any resources in the primary main
frame, or whether the request is for primary main frame navigation.

The current name has confused people and caused bugs. The bugs were
fixed in http://crrev.com/c/5882129. As a follow up of that change, this
change adds _navigation to the parameter name to make it clear so that
we don't have this confusion in the future.

Bug: 40792637
Change-Id: I6cb8f729b703ad2ca23488287436424a10a3ace8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5910076
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Emily Stark <estark@chromium.org>
Commit-Queue: Liang Zhao <lzhao@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1367732}
2024-10-11 20:11:51 +00:00
62e70ea809 Also remove content-shell-devtools-tab-target feature
Bug: 330301889
Change-Id: I050a9299d6047f67692b102bce87ac154837810c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5898741
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1365377}
2024-10-08 08:18:06 +00:00
3af929c3e0 Pass isolate to GetCreationContext()
V8 wants to deprecate the use of v8::Object::GetCreationContext()
without the explicit isolate argument (see https://crrev.com/c/5906106). This CL adds isolate as argument for some of the uses in Chromium.

Bug: 336738728
Change-Id: I19044f941c4612a823c4aae8b78c4034a5e0d66c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5904164
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Owners-Override: Rick Byers <rbyers@chromium.org>
Reviewed-by: Rick Byers <rbyers@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1365344}
2024-10-08 05:53:19 +00:00
e31a99df6c AX: Remove isOffScreen property
It's an unused property of a test-only WebAXObject interface.
Equivalent information is now computed in the browser process,
BrowserAccessibility::IsOffscreen().

This CL has no production behavior changes.

Change-Id: Icdbdd36009e0b0c9ad4e48a944a2e25240b20d41
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5905030
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
Auto-Submit: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1365176}
2024-10-07 22:00:26 +00:00
41da4aa10c [A11y] Remove Accessibility Object Model (AOM)
Follow-ups will completely remove AccessibleNode, which is still used
for its static methods for ARIA property retrieval in ordinary
<div aria-foo> situations.

Bug: 369945541
Change-Id: If4201088b86de9a88e1b611fae2e88a8ba3439ac
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5896593
Reviewed-by: Tzarial <zork@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: Richard (Torne) Coles <torne@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Auto-Submit: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1364497}
2024-10-04 23:21:21 +00:00
df26ee6b96 Fix basic auth issues for sub frame and sub resources
There is a is_main_frame parameter used by basic authentication handling
code to interact with WebRequestAPI and login dialog showing code, and
that parameter is not set correctly for certain scenarios.

For WebRequestAPI, the parameter is used to adjust child_id to -1 of
proxied_request_id in WebRequestAPI::MaybeProxyAuthRequest for correctly
identifying the request. However, WebRequestAPI code uses -1 as
render_process_id not by whether it is main frame, but by whether it is
navigation. Therefore, with current code, we will not receive
onAuthRequired for sub frame navigations.

For login dialog showing code, it behaves differently by whether it is
main frame navigation or other requests. However, basic authentication
handling code in StoragePartitionImpl::OnAuthRequired treat this
parameter as meaning requests for main frame navigation or subresource
requests in main frame when the frame is under service worker.
Therefore, with current code, we will not show login dialog for
subresources when the page is under service worker control.

To fix the issues, we add another parameter to indicate whether it is a
request for navigation and use that when interacting with WebRequestAPI,
and correctly set is_main_frame as false for subresource requests when
the page is under service worker control.

Added WebRequestAPI tests for sub frame navigation and sub resource
request, for the cases where the page is under service worker control
and where it is not under service worker control.

Also updated ServiceWorkerBasicAuthTest to reflect the correct
expectation for subresource requests, and expand the tests to cover both
the case where the page is under service worker control and not under
service worker control.

Bug: 40676156,40792637,41459173
Change-Id: I6a716ec0228fcb2332a985c15c9bffbabb4a4dde
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5882129
Reviewed-by: Emily Stark <estark@chromium.org>
Commit-Queue: Liang Zhao <lzhao@microsoft.com>
Reviewed-by: David Bertoni <dbertoni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1363749}
2024-10-03 18:16:53 +00:00
b55f2f1f5e Remove stray const when passing std::string_view arguments.
These may be remnants from a time before string_view when a const
char* would have made sense. Now the const doesn't matter.

Fully automated change.

Change-Id: I2dfc7ce30a54701639535a4f137dc18e71575fe2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5906184
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1363323}
2024-10-02 21:54:33 +00:00
825ad74abd Fenced frames: Remove FencedFramesReportingAttestationsChanges flag
and feature.

This feature is obsolete and has never been enabled. It was added in
https://chromium-review.googlesource.com/c/chromium/src/+/4949771.
It is a temporary solution for an issue in post-impression beacon.

The problem is when an adtech needs to measure Protected Audience ads
via post-impression beacon, but is not using any of the ads personalization or targeting features of Protected Audiences. A
different approach was taken. This feature was implemented but never planned to ship.

Bug: 361119170
Change-Id: Ife04241f0e3a69fe36ad18236b29beb2617af8f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5867036
Commit-Queue: Xiaochen Zhou <xiaochenzh@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Liam Brady <lbrady@google.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1359962}
2024-09-25 15:38:01 +00:00
c76f7f7a04 WebTestControlHost::CompositeNodeQueueThen uses SiteInstanceGroup
This function wants to check if a frame is a local root. Previously it
was doing this by comparing SiteInstances. Change it to compare
SiteInstanceGroups.

Selection of tests that cover this change:
 animations/stability/base-render-style-crash.html
 css3/viewport-percentage-lengths/vh-resize.html
 fast/backgrounds/background-image-relative-url-in-iframe.html
 external/wpt/accessibility/crashtests/br-in-changed-subtree.html
 external/wpt/css/css-pseudo/marker-content-014.html

Test: See tests listed above
Bug: 40269084
Change-Id: Ib47ffd6015015c4f8bb139c66cbfd1098f8615b1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5651674
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Sharon Yang <yangsharon@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1358856}
2024-09-23 16:43:56 +00:00
582c88e77c Fix the Null-dereference READ of gpu_channel in content::TestPlugin::Initialize
If EstablishGpuChannelSync fails, just return false in
content::TestPlugin::Initialize instead of DCHECK. This fixes the
ASAN Null-dereference READ crash on Linux.

Bug: 365818202
Change-Id: I137ab2dcc6a32c9d797c6d770ac0df523a98e729
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5879541
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Commit-Queue: Maggie Chen <magchen@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1358855}
2024-09-23 16:38:36 +00:00
09dd02b2e4 View transitions layered capture
Instead of baking tree-effects into view transition snapshots,
render the snapshot without these effects and add them as CSS to the
::view-transition-group pseudo-element.

This is done by changing the effect order in PaintPropertyTreeBuilder, so that these effects are ancestors of the capture effect. In that way
the effects are not applied inside the capture.

Also had to modify draw_property_utils, to ensure some of the surface
computations don't assume that the view-transition capture would later
be painted into an effect surface.

See design document with detailed conversation and alternatives:
https://docs.google.com/document/d/1jSkIqqlrI4rzZ34cTWC-6TB81cspvHxTcpBD6nDCbE4/edit?tab=t.0#heading=h.tf5nf0fynnc2

Impacted CSS properties:
- opacity
- mask
- clip-path
- filter

The following properties are also affected, will need a follow-up patch to finish this:
- clip
- border-radius (when clipping overflow). This is not entirely set up yet, and will follow up.

Bug: 347947051
Change-Id: I8f24adf0c2be89ff673f111f099eac065fd4bf7f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5789282
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org>
Reviewed-by: Vladimir Levin <vmpstr@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1358591}
2024-09-21 21:05:52 +00:00
106daafcdc [a11y] Deprecate GetIntListAttribute(attribute, value)
This method is being deprecated in place of calling Has...Attribute
followed by Get...Attribute.  The 2 argument version of Get forces
a copy of the int list, where the single argument version returns a
const reference and is thus more efficient.  Though the 2 argument
version is convenient for testing, it was also being used in
production code where efficiency matters.

Bug: 365536926
Change-Id: I91117ffc5fa02e48165ed8b8df413ef49540f9d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5866855
Reviewed-by: David Tseng <dtseng@chromium.org>
Commit-Queue: Kevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1357552}
2024-09-19 12:33:54 +00:00
fcbbe8d425 FSA: Re-enable manual WPTs
The check for frame_ was accidentally flipped in this refactor:
2827c75415.

A lot of the WPTs this bug was causing to fail are still failing because
they haven't been run in a long time. These will be fixed in follow up
CLs.

Bug: 346991169
Change-Id: I865e379f2048ecfaf044dd9467c53af2ef381b07
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5837824
Reviewed-by: Christine Hollingsworth <christinesm@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Nathan Memmott <memmott@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1355953}
2024-09-16 17:08:59 +00:00
44c1658a34 controlledframe: Disable Web Bluetooth for <webview> & <controlledframe>
Controlled Frame and WebView will share origin-keyed permissions with
the rest of the profile. Therefore we want to disable these permissions.
This CL disables Web Bluetooth for these contexts similar to what
crrev.com/c/5838413 does for Web Serial.

In this CL, we introduce MayUseBluetooth() to bluetooth delegate, which
checks whether a frame is allowed to use bluetooth.

We also move some of Chrome bluetooth browser test setup to shared test
utility file, in order to reuse the setup for both Controlled Frame and
WebView browser tests.


Change-Id: I4e8d4352b8193b02e5cd607a60bb38c437c20c1a
Bug: b/40191772 b/353328857 b/40066989
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5844369
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Chase Phillips <cmp@chromium.org>
Commit-Queue: Elias Klim <elklm@chromium.org>
Reviewed-by: Kevin McNee <mcnee@chromium.org>
Auto-Submit: Zelin Liu <zelin@chromium.org>
Reviewed-by: Elias Klim <elklm@chromium.org>
Reviewed-by: Jack Hsieh <chengweih@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1354431}
2024-09-12 09:37:31 +00:00
451a3f1732 Use WebViewObserver to access WebView in FakeScreenOrientationImpl.
This object is part of content::TestRunner, which will outlive the
WebView when a navigation replaces the RenderFrameHost.  Clearing the
pointer in ResetData() after navigating to about:blank?reset-web-test
trips raw_ptr's dangling pointer detection.

Bug: 40946696
Change-Id: Id7abf50dc684748eb125352466e40ed5ef88eaa0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5835797
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Steve Kobes <skobes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1353440}
2024-09-10 17:29:20 +00:00
49075372db [FedCM] Pass accounts separately to UI code and use smart pointers
This CL allows passing the accounts separately from the IDPs to the UI
code. This allows the backend to sort the accounts before passing them,
simplifying the logic in the UI. In order to do this, the memory
management is changed to use scoped_refptr for IdentityProviderData and
IdentityRequestAccount. The following is the rationale:

* The data is already being stored twice: in the backend code as well
as UI code, so using smart pointers saves some memory.
* The classes are fairly simple so it is obvious there are no circular
dependencies since an account points to its IDP, and these are both
owned by backend and UI code, but e.g. IDPs do not point to their
accounts.
* We already have to copy the newly logged in accounts as well since
we pass those as a separate parameter, and using scoped_refptr makes
this cheaper.
* One option would be to save the IDP in the account. In this case, we
would still need to save the IDP in all other places, which means we
increase the IDP copies. The IDP struct is not that small, so this is
not desirable.
* Another option would be to use raw_ptr in the account. This is not
ideal because of the two copies of accounts/IDPs stored: an account
could point to the wrong copy of the IDP, making the code hard to
follow and messy.
* Another option would be to store the index of the IDP that the
account belongs to. This is ugly.

Fixed: 349348653
Change-Id: I7df829ece664c15f7114fbe3dad67d183871f938
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5813195
Reviewed-by: Yi Gu <yigu@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1353044}
2024-09-09 23:11:09 +00:00
3531888d8c Ensure that WebFrameTestProxy resetting code is always called.
With RenderDocument behavior enabled (RenderFrameHost replacement on
main frame navigations), WebFrameTestProxy::Reset was being skipped in
TestRunner::ResetRendererAfterWebTest, for the reasons explained by the
comment in that method.

We cannot skip these resetting steps, even when the RenderFrameHost is
replaced, because some of them touch process-global state.  For example,
Internals::ResetToConsistentState resets g_mock_overlay_scrollbars.

Also, do NOT reset overlay scrollbars in ~Internals.  Changing global
state in the destructor of a GC'ed object is a recipe for flakiness.

Bug: 40946696
Change-Id: I33d4385261222c0d0d0465516e7c78b54972fedf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5838810
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Steve Kobes <skobes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1352979}
2024-09-09 20:58:14 +00:00
5ab949e1f9 Use an opaque type for FrameTreeNode IDs, part 10
content/public/test, content/test and content/web_test

Bug: 361344235
Change-Id: I373be4b5251ef29c625b3030644d956c5a4581a9
Include-Ci-Only-Tests: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5837703
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Charlie Reis <creis@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1351799}
2024-09-06 00:18:21 +00:00
0db1a0248c spanification: WebPlugin / WebPluginContainerImpl
Pass a span<const char> to DidReceiveData().

Bug: 351564777
Change-Id: Ib8e36cbe12025bef3b2f83ad1f31491dff7e89d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5834089
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/main@{#1351293}
2024-09-05 09:24:59 +00:00
0d624c9255 Enable kCanvasSharedBitmapToSharedImage for content_shell TestPlugin
This is to convert SharedBitmap to SharedImage. AllocateSharedBitmap() is replaced with CreateSharedImage().

Bug: 40064122
Change-Id: I81af740ca23b9a561c43075c612f3e1313ea88c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5821320
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Maggie Chen <magchen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1348658}
2024-08-29 15:44:12 +00:00
a5c8e40f17 blink: reduces work done during loading for cached resources
Specifically if we're going to use a resource from the cache
then a lot of the work during prepare isn't necessary. To enable
this I've moved some of the work earlier, specifically into
a new function PopulateResourceRequestBeforeCacheAccess. I've also
introduced a new client interface specifically for modifying the url
(rather than through WillSendRequest). In FetchContext I renamed
PopulateResourceRequest to UpgradeResourceRequestForLoader. In
resource_requestion_utils I renamed PrepareResourceRequest to
UpgradeResourceRequestForLoader.

This change is quite risky, so I added a kill switch. Unfortunately
the kill switch makes the code pretty ugly at the moment. This is
part of the reason I haven't looked into combining
PopulateResourceRequest and PrepareResourceRequest. I will tackle
that assuming this change sticks.

There are a couple of things not gated by the kill switch:

. new function is always called on client
. transparent placeholder image logic in ResourceFetcher.

These changes are pretty straightforward though, and it would
have made the code even more awkward to gate it by the kill switch.

Bug: 359910398

Change-Id: Ic25b302b9b3372084ff23496e623d0b6a21ed908
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5794358
Commit-Queue: Scott Violet <sky@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1347392}
2024-08-27 15:50:46 +00:00
0b2cf1f0a0 Delete dead code for content settings.
Bug: 40282541
Change-Id: Ie60a1f13ab37be40b07551851b4d6b5a8cdd1c75
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5808574
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1347007}
2024-08-26 22:15:35 +00:00
59fa7f25f0 SharedBitmap to ShareImage conversion for ImageContext
Replace AllocateSharedBitmap() with CreateShareImage() in
ImageLayerBridge.

Bug: 40064122
Change-Id: Ib67567cc444c9f70a7b6b0d997456754231f70f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5807093
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Maggie Chen <magchen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1347005}
2024-08-26 22:14:25 +00:00
73cb985343 Don't have default arguments on virtual functions in render_frame_host.h
Bug: none
Change-Id: Iaca8ce785bc22f731663eae009749b031c32e102
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5809399
Owners-Override: Avi Drissman <avi@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Reviewed-by: Jayson Adams <shrike@chromium.org>
Commit-Queue: Jayson Adams <shrike@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1346845}
2024-08-26 18:10:58 +00:00
006519d9a1 Revert "[Android EMEA sheriff] Revert "[Permission] Remove SubscribeToPermissionStatusChange from PermissionManager""
This reverts commit ca0aec69cc.

Reason for revert: https://crrev.com/c/5772812 fixed the issue.

Original change's description:
> [Android EMEA sheriff] Revert "[Permission] Remove SubscribeToPermissionStatusChange from PermissionManager"
>
> This reverts commit c129a1b9ae.
>
> Reason for revert: breaks `NFCHostTest.GetNFCTwice` content unittest on https://ci.chromium.org/ui/p/chrome/builders/ci/android-arm64-tests
>
> Original change's description:
> > [Permission] Remove SubscribeToPermissionStatusChange from PermissionManager
> >
> > This CL:
> > * creates a separate file for Subscription enum
> > * Removed duplicating `SubscribeToPermissionStatusChange` from PermissionManager
> > * Move related unittests into new test file `chrome/browser/permissions/permission_subscription_unittest.cc`
> >
> > Bug: 40238954
> > Change-Id: Ic1e106880a0ee2b12384d151e95de9ded783c72b
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5498921
> > Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
> > Reviewed-by: Peter Beverloo <peter@chromium.org>
> > Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
> > Commit-Queue: Yifan Luo <lyf@chromium.org>
> > Reviewed-by: Sean Topping <seantopping@chromium.org>
> > Reviewed-by: Elias Klim <elklm@chromium.org>
> > Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1325782}
>
> Bug: 40238954
> Change-Id: Ib1e0d21baa33075f5d0f93b127692824bd707378
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5690963
> Owners-Override: Igor Kraskevich <kraskevich@google.com>
> Auto-Submit: Igor Kraskevich <kraskevich@google.com>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Igor Kraskevich <kraskevich@google.com>
> Cr-Commit-Position: refs/heads/main@{#1326078}

Bug: 40238954
Change-Id: I549d5d8c3993fcb010e5ff9066d5f63d1a39a0f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5695045
Reviewed-by: Elias Klim <elklm@chromium.org>
Auto-Submit: Yifan Luo <lyf@chromium.org>
Reviewed-by: Sean Topping <seantopping@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Commit-Queue: Elias Klim <elklm@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: David Vallet <dvallet@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1345460}
2024-08-22 16:11:34 +00:00
12ca48fb7b [blink scheduler] Add wpt_internal policy integration tests
This integration tests for several blink scheduler policies, along with
some test infra changes to make async keyboard events more realistic.

EventSender changes:
===========================
Previously, EventSenderBindings::KeyEventAsync() posted a task to run
the keyboard event using the frame scheduler's kInternalTest task
runner. But there are several important differences with how this
affects scheduler policy, e.g. it bypasses the main thread input queue,
does not invoke certain compositor --> main thread scheduler observer
callbacks, and the input doesn't run out of the input task queue.

To make the async keyboard input more realistic for scheduler tests,
this CL:
 - Adds WidgetInputHandlerManager::DispatchEventOnInputThreadForTesting.
   This posts a task on the input task runner to dispatch the event.

 - Adds WebWidget::DispatchNonBlockingEventForTesting, which forwards
   the event to the WidgetBase's WidgetInputHandlerManager. This is
   similar to TestWebFrameWidget::DispatchThroughCcInputHandler(), but
   it posts a task via WidgetInputHandlerManager's input task runner.

 - Changes EventSender::HandleInputEventOnViewOrPopup to use the new
   WebWidget method for callers that pass async (bool). This currently
   only affects eventSender.keyDownAsync, which is used by the new tests
   and a few soft navigation heuristics tests. We can expand this to
   other eventSender methods a needed.

Scheduler Tests:
===========================
Integration tests are added for:
 - Rendering Starvation Prioritization, which prioritizes rendering
   after 100 ms if we haven't produced a frame in that time. No input
   is needed for this.

 - Prioritize Rendering After Input, which makes rendering
   (BeginMainFrame) highest priority, matching discrete input. This
   is tested with both keyboard and click input.

   Note: test_driver.click() goes through the production input path in
   the renderer, so no changes to EventSender were needed.

 - Prioritize Discrete Input, which runs discrete input events at the
   highest priority. This is also tested with both keyboard and click
   input.

Note: these policies have unit tests coverage in blink scheduler, but
not integration testing to check that the scheduler signals are wired up
correctly.

Bug: 354143233
Change-Id: Ibc9d130ddb5fce8c7b0fd212a79e5545bdf3a145
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5727172
Reviewed-by: Noam Rosenthal <nrosenthal@chromium.org>
Commit-Queue: Scott Haseley <shaseley@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1342423}
2024-08-15 19:23:43 +00:00
01ab59ae08 Migrate NOTREACHED_NORETURN -> NOTREACHED
NOTREACHED() has turned [[noreturn]] so the former macro isn't needed
anymore.

This does not attempt to do a rewrite of any surrounding code, like:

if (!foo) {
  NOTREACHED();
}

to CHECK(foo);

Those transforms take a non-trivial amount of time (and there are
thousands of instances). Cleanup can be left as an exercise for the
reader.

NO_IFTTT=No-op-rename migration.

Bug: 40580068
Change-Id: I068c5fdce9dc4c352d8bdd62bb3cd2c0a2d59659
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5782602
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1342096}
2024-08-15 02:39:49 +00:00
e9b4dd5523 Prepare to mark UNSAFE_BUFFER_USAGE for unsafe methods in file.h.
Find the existing callers and tag them with UNSAFE_TODO() rather than
trying to re-write them all to safer forms in a large patch such as
this. They can be addressed individually later on.

Stop short of marking these unsafe in file.h. This should happen in
a single-file patch to ease reversion should it be necessary.

-- Mark file.cc implementation as UNSAFE_BUFFERS() and justify safety.

Change-Id: Iea0763a950944cd0601dc55aeb1f2d1d4ab58201
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5787102
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1342002}
2024-08-14 22:44:29 +00:00
2dc2f1b5bf Remove unused blink::WebPlugin::IsPlaceholder()
It has no callers.

Change-Id: I5e38983096dc4f87ca5610c669505d7d93e8fe3b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5772101
Reviewed-by: Peter Beverloo <peter@chromium.org>
Auto-Submit: Lei Zhang <thestig@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Peter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1340278}
2024-08-12 09:35:13 +00:00
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
c59336f303 [FedCM] Move delegate implementation to content/browser
Currently, there is no default implementation of the federated identity
delegates in content/browser. In order to make FedCM work in headless,
this CL moves the in-memory delegate implementation from content/shell
to content/browser.

Bug: 336561988
Change-Id: I5097f86c76bcd5bb41193ef14f16d1b2f0eef6a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5740871
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Christian Biesinger <cbiesinger@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1333637}
2024-07-26 17:08:22 +00:00
12851b35a7 compute pressure: Add a content_shell code path for virtual pressure source calls
This is similar to https://crrev.com/c/4770865 for sensors: it exposes
some new calls in the Internals object that are routed to
content/web_test via a separate Mojo interface exposed only when
content_shell is run in web tests mode, WebPressureManagerAutomation.

Noteworthy items:
- The testdriver calls have not been written yet, but one can play with
  the new calls in WPT by directly calling e.g.

    await internals.createVirtualPressureSource("cpu");

- The Internals object is only exposed to the Window global, so the
  above does not work for workers directly. Workers are supposed to make
  calls via testdriver.js on a Window object.

Bug: 347031400
Change-Id: Ib341bb63a6ebcec1571140e35f501d570a67a108
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5665299
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1332385}
2024-07-24 16:34:07 +00:00
7b09c54dd5 ui: remove SelectFileDialog impl params
This change removes params from all the implementations of
SelectFileDialog::SelectFileImpl. The next and final CL in this chain
will remove the parameter from SelectFileDialog::SelectFile() at every
call site.

Bug: 340178601
Change-Id: I1f76776330113601a9d50d1f946f58223f5b2e35
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5709097
Commit-Queue: Elly FJ <ellyjones@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1328917}
2024-07-17 16:23:21 +00:00
0b8b562243 ui: remove params variants of SelectFile listener functions
This change:
* Removes all remaining overrides of the params variants of
  SelectFileDialog::Listener functions (none of which used the params)
* Removes all calls to the variants of SelectFileDialog::Listener
  functions that accept a params pointer
* Removes some parameters and class members that were used to plumb the
  params field through

A subsequent change will remove the parameter from SelectFileImpl()
itself, but that would entail touching dozens more files than this CL.

Bug: 340178601
Change-Id: Idcba88a1efe1f4df44b5dca3a367024e4a093a60
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5691321
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Elly FJ <ellyjones@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1327734}
2024-07-15 19:53:53 +00:00
9bc03e7ac6 Move blink/public/common/browser_interface_broker_proxy.h to platform/
This CL moves
`third_party/blink/public/common/browser_interface_broker_proxy.h`
to
`third_party/blink/public/platform/browser_interface_broker_proxy.h`

Motivation:

* This header is not included from any browser-process code and
  therefore doesn't need to be in `.../common/...`.
* This resolves layering ickiness introduced by the previous CL (see
  https://crrev.com/c/5647559) which moved implementation of this type
  deeper into Blink (e.g. using `CrossVariantMojoRemote` and similar
  utilities which are normally available to the `platform` code but not
  to the `common` code).

This CL has been generated semi-automatically - most of the files
changed by this CL have just been updated to use the new `#include` path
(as generated by `tools/git/mass-rename.sh`).  Manual changes are
concentrated in the following files:

* Moving
  `third_party/blink/public/common/browser_interface_broker_proxy.h`
  to
  `third_party/blink/public/platform/browser_interface_broker_proxy.h`
    - This also removed a `nogncheck` ickiness left by the previous CL
    - This had to switch from `BLINK_COMMON_EXPORT` to
      `BLINK_PLATFORM_EXPORT`
* Removing layering ickiness in `third_party/blink/public/common/DEPS`
* `DEPS` update and/or simplification in:
    - `chromecast/media/DEPS`
    - `components/page_image_annotation/content/renderer/DEPS`
    - `components/translate/content/renderer/DEPS`
    - `media/mojo/clients/DEPS`
* Changing a dependency in `media/fuchsia/video/BUILD.gn` and
  `chromecast/media/audio/BUILD.gn`
* Adjusting which target builds the moved files:
    - `third_party/blink/common/BUILD.gn`
    - `third_party/blink/public/BUILD.gn`
* Deleting `third_party/blink/common/browser_interface_broker_proxy.cc`
    - This also involves tweaking
      `third_party/blink/public/common/BUILD.gn`
    - Parts of that `.cc` file have been preserved in
      `.../platform/mojo/browser_interface_broker_proxy_impl.cc`
      (e.g. `EmptyBrowserInterfaceBrokerProxy` and default definitions
      of `BrowserInterfaceBrokerProxy`'s constructor and destructor)

Bug: 41482945
Change-Id: I6048c855279c438b7dbfc8467b859df70e2d2012
AX-Relnotes: n/a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5651622
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Łukasz Anforowicz <lukasza@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1327283}
2024-07-14 20:25:02 +00:00