Commit Graph
67675 Commits
Author SHA1 Message Date
AlexeyBarabash fcaeb2bbb9 [cr134] [Android] Changes related to InterceptNavigationDelegate.ShouldIgnoreNavigation:
- new args at InterceptNavigationDelegate.ShouldIgnoreNavigation: should_run_async, result_callback;
- return type changed from bool to void

Related Chromium change:
https://source.chromium.org/chromium/chromium/src/+/8c2b10e85ff860959aaf6bf86f48bd03fc998ccb

	Reland "Fix Async Navigation Intercept using the wrong URL for fast redirects"

	Original change's description:
	Fix Async Navigation Intercept using the wrong URL for fast redirects

	Prior to this change, if we received a redirect before the async
	shouldIgnoreNavigation call was run (which does happen in practice) we
	would still run the pending shouldIgnoreNavigation call but the
	NavigationHandle would already be updated to the redirect URL and so
	the result would potentially be wrong. It's also complicted to reason
	about multiple checks in flight at once.

	This change ensures that before processing the redirect, we finish
	processing the previous step in the navigation (either the initial
	navigation or a previous redirect).

	Also, I moved the async task to Java to make use of the cached ExternalNavigationParams as the NavigationHandle is mutable and could be modified between when the task is posted and when it's run.

	We'll still get the vast majority of the benefit from the async path
	as it's extremely rare that we get a redirect before finishing the
	check, so this should be performance neutral.

	No new Kill Switch is needed for this change, as we can re-use the
	kAsyncCheck Kill Switch to disable async nav altogether if we really
	need to.

	Bug: 381535042
	Change-Id: I674aca65a4f2e5ca31670cf52929e8f87daf0528
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6194176
2025-02-18 12:46:57 +00:00
AlexeyBarabash 6f51da08f5 [cr134] [Android] Port to/improve compat with std::ranges::: chrome/
Related Chromium change:
https://source.chromium.org/chromium/chromium/src/+/8debbfa670236888641794699348ec76b5ae7fef

	Port to/improve compat with std::ranges::: chrome/

	Bug: 386918226
	Change-Id: Iba5c04c5be0b092990335cf5c43835ae3a55a10b
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6177197
2025-02-18 12:46:57 +00:00
AlexeyBarabash cf2ea2fe97 [cr134] [Android] TemplateUrlService.isEeaChoiceCountry was removed
Related Chromium change:
https://source.chromium.org/chromium/chromium/src/+/25de988ad1d08cf2713249eb412ca42033a45b7a

	rcaps: Switch to IsInEeaCountry from rcaps in Java code

	Removes TemplateUrlService#IsEeaCountry from the Java class, replacing
	it with RegionalCapabilitiesService#IsInEeaCountry calls.

	Bug: 328040066
	Change-Id: I8bf9240cecb5b5394640221f62a68948e89aa388
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6190388
2025-02-18 12:46:57 +00:00
Claudio DeSouza dc58b590ef gnrt run for Chromium 134.0.6984.1 2025-02-18 12:46:57 +00:00
Claudio DeSouza 273ae4e6a0 [cr134] ContentsLayoutManager requires a scrim view
This has to be provided in `SplitView`, and it can be retrieved from
`BrowserView` using a `Browser` instance.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/9edaed6454cfcda778d760221c6d874e1bf9eb46

commit 9edaed6454cfcda778d760221c6d874e1bf9eb46
Author: Keren Zhu <kerenzhu@chromium.org>
Date:   Fri Jan 24 11:24:50 2025 -0800

    Add a content scrim view

    BrowserView::contents_scrim_view() is a scrim that covers the content
    area. When visible, it darkens the content. This will be used as the
    visual cue when showing tab-modal dialogs.

    This scrim does not cover the devtools or the side panel.

    screenshots,
    - https://screenshot.googleplex.com/8TTc9QKUABpSLST
    - https://screenshot.googleplex.com/9ZH2GNWSK3X5E53 (devtools open)
    - https://screenshot.googleplex.com/3JqfcC9Z9jbhx27 (side panel open)

    This CL does not include the toggling of scrim on showing tab modals.
    They will come in follow up CLs.

    Bug: 391903216
2025-02-18 12:46:57 +00:00
Claudio DeSouza 6c6b70c139 [cr134] version_ui moved under webui/
This pathing change does affects a patch file an a related shadow file.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/aeb05c8ac2b1be5e5cb2f2feebf3817313554a76

commit aeb05c8ac2b1be5e5cb2f2feebf3817313554a76
Author: rbpotter <rbpotter@chromium.org>
Date:   Fri Jan 24 10:41:04 2025 -0800

    Components: Move version_ui and user_actions_ui to webui component

    Followup from refactoring recommended by components/ OWNER in
    https://chromium-review.googlesource.com/c/chromium/src/+/6178599

    Bug: 379889249
2025-02-18 12:46:57 +00:00
Claudio DeSouza 7031887b51 [cr134] WriteBookmarks taking a callback
This function used to take a pointer to an observer, however it has been
recently simplified to take a callback. This is of no consequence for
the use in brave, where a `nullptr` was being passed in.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/a00f28906327914733c18715a878e1b9ba274bec

commit a00f28906327914733c18715a878e1b9ba274bec
Author: James Lee <ljjlee@google.com>
Date:   Thu Jan 23 01:55:15 2025 -0800

    Use callback rather than observer interface in BookmarkHtmlWriter

    This simplifies the error-handling branches and reduces repetition.

    Bug: 390643468
2025-02-18 12:46:57 +00:00
Claudio DeSouza 9880701369 [cr134] ShouldUpgradeToSSL added is_top_level_nav
This argument is getting passed along in the existing overrides. For the
existing tests the default behaviour has been preserved as true.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/bed1bc72123f67fc50f94c18c71f745207d7cc19

commit bed1bc72123f67fc50f94c18c71f745207d7cc19
Author: sbingler <bingler@chromium.org>
Date:   Thu Jan 23 09:00:48 2025 -0800

    Propagate is_top_level_nav to ShouldUpgradeToSSL

    Expose is_top_level_nav through ShouldUpgradeToSSL to its callers.

    As part of this CL preconnect HSTS upgrades will be disabled whenever
    kHstsTopLevelNavigationsOnly is active. This is a tentative decision
    and may be adjusted in future once we have more metrics data regarding
    preconnect's HSTS usage.

    The metric's collection is also modified to only occur when the feature
    is disabled. Since it's never been enabled yet this is effectively a
    no-op on metric collection and doesn't affect existing data.

    Bug: 40725781
2025-02-18 12:46:57 +00:00
AlexeyBarabash 01f46439a0 [Android] [cr134] Fixed AssertEqualsArgumentOrderChecker warnings
Related Chromium commits:

https://source.chromium.org/chromium/chromium/src/+/526df992739203a06410b715088aa0de0bdc34ae

	Android: Enable -parameters flag in javac

	Makes Error Prone's ParameterName check work for calls across target
	boundaries.

	Bug: 40286681
	Change-Id: I5c9c6e3314783bbd9445d4a6832e50ad9c3b5360
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6185925

https://source.chromium.org/chromium/chromium/src/+/05547e8845479c9224433acd50a92f4b9f8c03a0

	Fix AssertEqualsArgumentOrderChecker warnings in //chromecast

	Automated fix via Error Prone suggested fixes.

	Bug: 40286681
	Change-Id: Ib0c61fe3837d29e8f5e9965bf01ca92347ef8aea
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6187727

https://source.chromium.org/chromium/chromium/src/+/4c284a737e2b8b03e3872e6a77fda7da8efebc7e

	Android: Fix AssertEqualsArgumentOrderChecker error prone warnings

	This warning was not working previously due to not passing -parameters
	when invoking javac.

	Fix was automated via Error Prone's suggested fixes.

	Bug: 40286681
	Change-Id: I1a85388bc7db8365852329157eb03d861a42f4e6
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6184603
2025-02-18 12:46:57 +00:00
AlexeyBarabash 8681222831 [Android] [cr134] New arg browserControlsStateProvider at LocationBarMediator.ctor
Related Chromium change:
https://source.chromium.org/chromium/chromium/src/+/1c6160dc6933c4813715da1ff449f870ea8c8caf

	[Anchor] Skip status icon crossfade when focusing from bottom

	To match the lack of horizontal animation, we also want to skip the
	crossfade when focusing the omnibox from the bottom. A mechanism exists
	for this already so we are just implementing a new state in which it
	applies.

	Bug: 369134015
	Change-Id: Ifbd33b38ac69e4b75bdcef8422e51b4e45236724
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6179194
2025-02-18 12:46:56 +00:00
AlexeyBarabash ef875b5f6f Revert "[Android] Disable quick delete flag"
This reverts commit 7f843663e4d5b0f4230a967739fd290e60b95fc2.

Reason: the flag is removed completely at cr134

Related Chromium change:
https://source.chromium.org/chromium/chromium/src/+/a49153686134a72ff189024392df6aad09e71fb0

	[Quick Delete] Clean up kQuickDeleteAndroidFollowup flag

	Clean up Quick Delete phase 2 feature checks now that the experiment is
	fully launched. This includes removing the obsolete tabbed layout and
	basic tab from CBD on Android.

	OBSOLETE_HISTOGRAM[History.ClearBrowsingData.UserDeletedFromTab]=No longer logged

	Bug: 40255099
	Change-Id: I340afa9692f17ad3b472f501522a9e6ff8fb061c
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6162502
2025-02-18 12:46:56 +00:00
Claudio DeSouza ad4704215f gnrt run for Chromium 134.0.6974.3 2025-02-18 12:46:56 +00:00
Claudio DeSouza fd7d83e667 [cr134] Reverting login db upstream fix for build flags
This is now part of M134.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/d243d5ed9a757daf1b2fefc831ccf8b1af1dd249

commit d243d5ed9a757daf1b2fefc831ccf8b1af1dd249
Author: Ioana Pandele <ioanap@chromium.org>
Date:   Thu Jan 9 06:51:40 2025 -0800

    [UPMLoginDbSunset] Update buildflag checks for the exporter

    Bug:378650395

    Change-Id: Ia8e73baaf34552d5e8bac507438cbf033ab72492
2025-02-18 12:46:56 +00:00
AlexeyBarabash 9ae7949689 [Android] [cr134] New arg compositorViewHolderSupplier at TabSwitcherPaneBase/IncognitoTabSwitcherPane ctor
Related Chromium change
https://source.chromium.org/chromium/chromium/src/+/ac120e353f0c5f027cb02697d3e7e2cb7c5f2467

	Update Tab Switcher to Use CompositorViewHolder for Tab's Rect

	This CL updates TabSwitcherPane to utilize CompositorViewHolder for
	retrieving the tab's web view Rect during shrink and expand
	animations.

	Bug:390712793

	Change-Id: I78c90bc00e87a1bf540b99a13f27d9ac64acaf2e
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6171387
2025-02-18 12:46:56 +00:00
Claudio DeSouza cb34564ae7 [cr134] side_search_param/side_image_search_param removed
This field is gone however it was not being used in brave anyway, and it
was just being referred for instantiation/copies.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/e7adca16d31ff65896b85708e5541aa20760b1c9

commit e7adca16d31ff65896b85708e5541aa20760b1c9
Author: Justin Donnelly <jdonnelly@chromium.org>
Date:   Tue Jan 21 14:50:02 2025 -0800

    [search_engines] Remove side_search_param and side_image_search_param.

    These values are unused after the code cleanup tracked in the bug. After this lands, I will make an upstream change remove the values from prepopulated_engines.json.

    Bug: 357910230
2025-02-18 12:46:56 +00:00
Claudio DeSouza 0ce6f1a235 [cr134] ExclusionReason now a scoped enum
Chromium change:
https://chromium.googlesource.com/chromium/src/+/0a9673e574a887c8fc4ee121b1299496b7804810

commit 0a9673e574a887c8fc4ee121b1299496b7804810
Author: Chris Fredrickson <cfredric@chromium.org>
Date:   Tue Jan 21 08:45:14 2025 -0800

    Convert ExclusionReason to a scoped enum

    This CL is mechanical; it changes `enum` to `enum class`, and then
    adds the missing qualifications and static_casts.

    Change-Id: Id82475659afa6ee0ad12fed4c635e6e231597c9d
2025-02-18 12:46:56 +00:00
Claudio DeSouza 6d8586bec7 [cr134] EventTypes now a scoped enum
This affects only how we refer the enum keys.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/21d95e3de2539fabcbd15d2d6e140ff885a46b78

commit 21d95e3de2539fabcbd15d2d6e140ff885a46b78
Author: Solomon Kinard <solomonkinard@chromium.org>
Date:   Tue Jan 21 17:42:04 2025 -0800

    Extensions: CodeHealth: Give enum some class

    Bug: chromium:346952289
2025-02-18 12:46:56 +00:00
Claudio DeSouza ba81f2e29c [cr134] EntityData passed for sync entry deletion
This is only used in tests, so it can be a default constructed instance.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/5eaeb769a8d8d68f590633148be14254e3be3181

commit 5eaeb769a8d8d68f590633148be14254e3be3181
Author: Rushan Suleymanov <rushans@google.com>
Date:   Tue Jan 21 07:51:54 2025 -0800

    [Sync] Add EntityData for remote entity deletions

    This CL adds EntityData content when EntityChange for a deletion is
    created. This data is populated for remote tombstones only (i.e.
    deletions for commit-only types and removed membership in collaborations
    won't have this data).

    Bug: 352214654, 385133876
2025-02-18 12:46:56 +00:00
Claudio DeSouza 4d6e57f4fa [cr134][WIP] Fix TabDragController tab dragging calculation
Chromium change:
https://chromium.googlesource.com/chromium/src/+/8f3d075ebf5ff02504a72ac34e0adcc088376881

commit 8f3d075ebf5ff02504a72ac34e0adcc088376881
Author: Taylor Bergquist <tbergquist@chromium.org>
Date:   Tue Jan 21 14:40:53 2025 -0800

    Simplify layout when creating a window during tab dragging.

    There were several compounding complexities in the old approach:
    - the window and tab bounds calculations were distributed across several
    methods, with unclear responsibilities and interactions
    - the two cases (dragging all tabs in a window, and dragging some tabs
    out into a new window) reused some of these methods, and duplicated
    (with some important differences) other parts of the logic
    - Wayland doesn't support screen coordinates or programmatically
    positioning windows; this required special handling whenever any window
    origin math was done (as that all happens in screen space)

    It turns out that a lot of this complexity can just cancel out if you
    arrange things the right way.

    This CL does several things:
    - skips calculating the detached window origin (over and over, and
    incrementally nudging the window around). The move loop will reposition
    it for us, so we can just calculate the drag offset once at the end.
    - greatly simplifies the dragging all tabs in a window case, which was
    only complicated because it was reusing too much of the other case
    - clearly defines the responsibilities of, and information flow between,
    the helper methods of DragBrowserToNewTabStrip
    - unifies calculations between Wayland (which doesn't support screen
    coordinates or programmatically positioning windows) and other platforms
    - more strictly separates the calculation of different pieces of
    information (mainly window size/origin and tab sizes/origins)

    Bug: 382754501
2025-02-18 12:46:56 +00:00
Claudio DeSouza 99ed493209 [cr134] GetTooltipText now GetRenderedTooltipText
This is a renaming to nudge people to use other constructs for hints.
This change doesn't go much further than to keep the code as is, with
execption of `SidebarButtonView`.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/af6f4b9c4f3b02fbcba3ffa3c7f4b65b0995aba3

commit af6f4b9c4f3b02fbcba3ffa3c7f4b65b0995aba3
Author: Javier Contreras Tenorio (from Dev Box) <javiercon@microsoft.com>
Date:   Tue Jan 21 11:32:35 2025 -0800

    [views-ax] Cleanup of GetTooltipText (part 2)

    This CL cleans up the last bits of the refactor to make Views cache
    their tooltip text.

    * Rename GetCachedTooltipText and SetCachedTooltipText to just
    Get/SetTooltipText.
            - This involved some renaming in some Views that had a
            method named the same to set a custom tooltip text. That method
            on those Views was then renamed to make clearer that it was "custom".
            - Some Views also had some custom logic in their SetTooltipText and so
            this CL handled those by adding a PropertyChangedCallback with that logic
            that would run on those Views when the tooltip property changed.

    * Rename GetTooltipText(Point) to GetRenderedTooltipText(Point)
            - This is the method that the tooltip controller uses to expose
            the tooltip, and in most cases this and GetTooltipText() return the same
            string, but there are some Views such as TableView and MenuItemView that
            require a Point to calculate the tooltip text.

    * This CL also includes the small refactor of a couple of Views
    for which their tooltip text had not been refactored. These were small
    refactors, one just needed a callback and the other just had to call
    SetTooltipText.

    * For the Views that had their own custom logic in a local
    `SetTooltipText`, this CL moves that custom logic to an override
    of a function in view that will run when the tooltip text changes.
    This is needed in many cases over adding a property callback because
    these Views used the value of the tooltip text BEFORE it changes,
    which was not possible to get via the property callback.

    *`Label` had a local `SetTooltipText` that set a local custom
    tooltip variable. To accommodate this along with the new method
    of the same name in View, we renamed the Label version
    to SetCustomTooltip text, which also fits the behavior better.

    * More information can be found on the linked bug, but TLDR
    is that Views now cache their tooltip text. This CL then renames
    and cleans up a bit to finish up the refactor.
    `View::GetTooltipText()` returns this cached tooltip for all Views.
    `View::GetRenderedTooltipText(point)` exists so Views that require
    of a point to compute their tooltip can override this method to do so.
    The base version of this method will simply return the cached member.
    `GetRenderedTooltipText` is the method that is used by the tooltip
    manager.

    This CL is part of the ViewsAX project:
    https://docs.google.com/document/d/1Ku7HOyDsiZem1yaV6ccZ-tz3lO2XR2NEcm8HjR6d-VY/edit#heading=h.ke1u3utej413

    Bug: 325137417, 378724151
2025-02-18 12:46:56 +00:00
Claudio DeSouza 95388ac2ff [cr134] Adjust java test patch exclusions
The list of tests in `chrome/android/BUILD.gn` has been moved under
`chrome/android/javatests/BUILD.gn`. This affects an exclusion in place
for removing one of these tests.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/b4c1dcd2f21521a4f3ab5fedca31b29d52653eb1

commit b4c1dcd2f21521a4f3ab5fedca31b29d52653eb1
Author: Martin Kong <martinkong@google.com>
Date:   Tue Jan 21 10:02:28 2025 -0800

    Split chrome_unit_test_java into multiple targets

    This CL splits the chrome_unit_test_java target into multiple targets
    based on the package, so that a change to a single test file will not
    cause all test files to be recompiled.

    Bug: 40286190
2025-02-18 12:46:56 +00:00
AlexeyBarabash 4f8b40115d [Android] [cr134] Removed REPLACE_SYNC_PROMOS_WITH_SIGN_IN_PROMOS flag
Related Chromium change:
https://source.chromium.org/chromium/chromium/src/+/c542837129816959214a3558befa761137060d6c

	[Android][Signin] Remove the UNO phase 2 flag from Android code

	This CL remove the REPLACE_SYNC_PROMOS_WITH_SIGN_IN_PROMOS flag from
	Android java code, along with annotations in tests that enable it, given
	the related usages has been removed from production code.

	Bug: 350461111
	Change-Id: Ib2858c253bffbad71240be607f16930063951611
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6172621
2025-02-18 12:46:55 +00:00
AlexeyBarabash 6bac559202 [cr134] [Android] Attribute supports_android removed from third_party/android_deps:com_google_code_gson_gson_java
Related Chromium change
https://source.chromium.org/chromium/chromium/src/+/6e0b8108cad22d3f2bc0d8f99ac48868860faf2d

	Android: Delete unused //third_party/grpc-java

	Looks like it was only ever used by autofill assistant, which was
	removed.

	Bug: 259509313
	Change-Id: Ia3558a2fb440e94b733a395940282ede5e5f718d
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6162034
2025-02-18 12:46:55 +00:00
AlexeyBarabash d17e71bb72 [cr134] [Android] Changes at TabSwitcherPaneBase
int getCurrentTabId() replaced with @Nullable Tab getCurrentTab()

Related Chromium change:
https://source.chromium.org/chromium/chromium/src/+/052f94ec2a329c0bef43a949cd84fe058a32710f

	[Hub] Fix Tab Pane interaction with Bottom Toolbar for non-NTP pages

	Improve interaction between the tab switcher and the bottom toolbar by
	animating the shrinking/expanding tab to the top of the screen
	subtracting the toolbar space if bottom toolbar is in use.

	The bottom toolbar area still has a somewhat unpolished transition
	because the area where the bottom toolbar is remains blank during the
	animation rather than something nicer like a crossfade. For now this is
	still significantly better than the previous state. However, there is
	probably room to improve this with help from UX. Unfortunately, the fact
	Hub is layered over the rest of the UI and we are using LayoutManager to
	handle the transition makes this somewhat more difficult than it might
	otherwise seem.

	See demo on bug.

	Fixed: 385704998
	Change-Id: Id22ec322a89126e319c9a5f5a5bae575eac206f3
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6180002
2025-02-18 12:46:55 +00:00
AlexeyBarabash a0e1f1ef17 [cr134] [Android] ClearBrowsingDataFragmentAdvanced was removed
Chromium now doesn't contain `Basic`/`Advanced`.

Class ClearBrowsingDataFragment now represents what used to be ClearBrowsingDataFragmentAdvanced.

Related Chromium change:
https://source.chromium.org/chromium/chromium/src/+/a49153686134a72ff189024392df6aad09e71fb0

	[Quick Delete] Clean up kQuickDeleteAndroidFollowup flag

	Clean up Quick Delete phase 2 feature checks now that the experiment is
	fully launched. This includes removing the obsolete tabbed layout and
	basic tab from CBD on Android.

	OBSOLETE_HISTOGRAM[History.ClearBrowsingData.UserDeletedFromTab]=No longer logged

	Bug: 40255099
	Change-Id: I340afa9692f17ad3b472f501522a9e6ff8fb061c
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6162502
2025-02-18 12:46:55 +00:00
Claudio DeSouza 76349866d0 [cr134] HistogramBase::Sample now Sample32
The naming now better reflects the size of the sample.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/4a39d12c4eec40ffa9a531598ea645edc1d25650

commit 4a39d12c4eec40ffa9a531598ea645edc1d25650
Author: Ramon Cano Aparicio <rcanoaparicio@google.com>
Date:   Mon Jan 20 05:00:17 2025 -0800

    Remove HistogramBase::Sample type.

    Rename HistogramBase::Sample to Sample32.
    Add size to type name so the size is known without needing to lookup
    the typedef.

    Bug: 40899968
2025-02-18 12:46:55 +00:00
AlexeyBarabash 3e69b6bdfb [cr134] [Android] Changes at ui::ViewAndroid class
Methods GetSizeDIPs()/GetSizeDevicePx() instead of GetSize()

	Related Chromium change
	https://source.chromium.org/chromium/chromium/src/+/4f2bc05e8d30de72c30d6dd34e55b50b4464661b

	Reland "Avoid pixel rounding errors by using device pixels directly"

	This reverts commit 2754d87ac5c787d866b53ef438aadd6ea5ef5619.

	Reason for revert: fixed TabsTest#testNewTabSetsContentViewSize, AndroidScrollIntegrationTest#testPageDown

	Diff from original land to fix tests:
	https://chromium-review.googlesource.com/c/chromium/src/+/6169396/4..5

	Original change's description:
	> Revert "Avoid pixel rounding errors by using device pixels directly"
	>
	> This reverts commit a4951af7d99bc472b9577f85cc2002b9e213f4af.
	>
	> Reason for revert: Potential culprit for failures on Android. See b/389752076.
	>
	> Original change's description:
	> > Avoid pixel rounding errors by using device pixels directly
	> >
	> > Previously we were (on Android) dividing device pixels by devicePixelRatio and rounding off to integers to get a size in DIPs, then when sending the size to Blink, it was multiplied again by devicePixelRatio and rounded to integers again. This can lead to rounding errors, which are avoided by not dividing in the first place.
	> >
	> > This fixes an issue on Android, because ViewAndroid receives its
	> > sizing in device pixels. On other platforms the sizing is received in
	> > DIPs; to the extent this bug is on those platforms other OS APIs reporting device pixels could be integrated in the future.
	> >
	> > The PR includes one more test, but there are many tests that exercise
	> > the various parts of code changed in this CL already (discovered because earlier patchsets failed them before the code was fixed).
	> >
	> > Bug: 40234130
	> >
	> > Change-Id: Ie5bc209b5c4e2c88bf024c32022a562eeaf05cf0
	> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6142555
	> > Reviewed-by: Tom Sepez <tsepez@chromium.org>
	> > Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
	> > Reviewed-by: Nico Weber <thakis@chromium.org>
	> > Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
	> > Reviewed-by: Bo Liu <boliu@chromium.org>
	> > Cr-Commit-Position: refs/heads/main@{#1405652}
	>
	> Bug: 40234130
	> Change-Id: I29227280eb3e99e4cfbcfbb7364f90bcd74978f7
	> No-Presubmit: true
	> No-Tree-Checks: true
	> No-Try: true
	> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6173616
	> Reviewed-by: Yue Zhang <yuezhanggg@chromium.org>
	> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
	> Owners-Override: Yue Zhang <yuezhanggg@chromium.org>
	> Commit-Queue: Yue Zhang <yuezhanggg@chromium.org>
	> Cr-Commit-Position: refs/heads/main@{#1405760}

	Bug: 40234130, 389752076
	Change-Id: Ibaa09fb6ba469c9c22ae26819d2ed59c224a8f9c
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6169396
2025-02-18 12:46:55 +00:00
AlexeyBarabash 96f17c01ec [cr134] [Android] Return type of PermissionDialogDelegate::Create changed
from void to std::unique_ptr<PermissionDialogDelegate>

Related Chromium change
https://source.chromium.org/chromium/chromium/src/+/eea12451eed010fb897e3171b9c4cb7979c082ff

	Reland "[PEPC]Add new JNI call to update screen variant"

	This is a reland of commit aeb64aa747c14aa5bb461e0bc0f5c4a83764b9f7

	We took out the assertion from the original change because the
	PermissionDialogDelegate Java class won't be null right after the
	tab's gone. It needs to wait for a signal from C++. Removing the check
	might even help us close the dialog in some corner cases.

	Original change's description:
	> [PEPC]Add new JNI call to update screen variant
	>
	> The CL moves the owner of native permission dialog delegate to C++
	> native side instead of Java. This way, we can decide to destroy modal
	> dialog or update screen variant from C++ after accepting a prompt.
	>
	> Also, this CL is introducing the first shape of the API to update custom
	> view based on the current screen variant.
	>
	> Bug: 388407662
	> Change-Id: I62239454c625c34259f6a495a6a53136ff1f26f1
	> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6167529
	> Commit-Queue: Thomas Nguyen <tungnh@chromium.org>
	> Reviewed-by: Andy Paicu <andypaicu@chromium.org>
	> Cr-Commit-Position: refs/heads/main@{#1406569}

	Bug: 388407662
	Change-Id: I82717d973ae65ef7cc6f0a197210929bc2bd11e8
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6178268
	Reviewed-by: Andy Paicu <andypaicu@chromium.org>
2025-02-18 12:46:55 +00:00
AlexeyBarabash 7a69c47fad [cr134] [Android] PermissionPromptAndroid::GetIconId() is now virtual
Related Chromium change
https://source.chromium.org/chromium/chromium/src/+/396cf60d3f8d404de2dcff1c2aa0a66c63ff12ad

	[PEPC] pass button text and title from native to Java

	This CL adds plumbing work to find the correct title text, button
	texts and other extra information sending to Java to create the
	prompt UI.

	Bug: 389591952
	Change-Id: I7c2a86654f49531d3d2fec5ae4e50152ff3d51bd
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6172270
2025-02-18 12:46:55 +00:00
AlexeyBarabash 9c27c37a3e [cr134] [Android] New edgeToEdgeSupplier arg at HubManagerImpl.ctor
Related Chromium change
https://source.chromium.org/chromium/chromium/src/+/b94afd120f06257c66e57700f6d13f217ad3dd60

	Wire edgeToEdgeSupplier back to the hub

	Abandoned the old CL (https://chromium-review.googlesource.com/c/chromium/src/+/6145790) and uploaded this new one.

	Wired edgeToEdgeSupplier back to the hub so that we could add bottom padding to the snackbar in the tab switcher.

	Notice that now the floating snackbar doesn’t go below the bottom inset in the tab switcher:
	https://screenshot.googleplex.com/89ZTYsRPqUYZR6a

	Bug: 385402263
	Change-Id: Ic5545614a6c4e20cec5c37858c3e23e3694c0420
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6174294
2025-02-18 12:46:55 +00:00
Claudio DeSouza 0e7743e1b3 [cr134] kDIPS renamed to kBtm
This is a simple renaming of the constant.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/07610a642bf1546525f671bf56d4aa9def38858c

commit 07610a642bf1546525f671bf56d4aa9def38858c
Author: Ryan Tarpine <rtarpine@chromium.org>
Date:   Thu Jan 16 10:09:29 2025 -0800

    Reland "[DIPS] Rename DIPS prefix to Btm."

    This reverts commit f8849ddbca72aa0b830b17fb5af3f7b3ac0f3385.

    Reason for revert: Fixed bad merge with crrev.com/c/6174062

    Original change's description:
    > Revert "[DIPS] Rename DIPS prefix to Btm."
    >
    > This reverts commit 4d4b33ce5cf2e18c6f2b2a120b2a8064db75c351.
    >
    > Reason for revert: Tree closure for compile failure
    >
    > Original change's description:
    > > [DIPS] Rename DIPS prefix to Btm.
    > >
    > > This makes it match the external name (Bounce Tracking Mitigations) and
    > > comply with the C++ style guide, which says "prefer to capitalize
    > > abbreviations as single words".
    > >
    > > A followup CL will rename filename prefixes from dips_ to btm_ (and the
    > > directories from dips/ to btm/).
    > >
    > > Bug: 388538934
    > > Change-Id: I43d3f1c24632919ac8985aea5b7f2d945d2a9628
    > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6172859
    > > Owners-Override: Avi Drissman <avi@chromium.org>
    > > Commit-Queue: Ryan Tarpine <rtarpine@chromium.org>
    > > Reviewed-by: Avi Drissman <avi@chromium.org>
    > > Cr-Commit-Position: refs/heads/main@{#1406975}
    >
    > Bug: 388538934
    > Change-Id: Ic86e19c9c3a23d7dcb014bab5bc6bc13419a0ae0
    > No-Presubmit: true
    > No-Tree-Checks: true
    > No-Try: true
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6173773
    > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
    > Auto-Submit: Joey Arhar <jarhar@chromium.org>
    > Owners-Override: Joey Arhar <jarhar@google.com>
    > Commit-Queue: Joey Arhar <jarhar@chromium.org>
    > Cr-Commit-Position: refs/heads/main@{#1406979}

    Bug: 388538934
2025-02-18 12:46:55 +00:00
Claudio DeSouza c7b6696c69 [cr134] prepopulated_engines gn target now under 3p
Chromium change:
https://chromium.googlesource.com/chromium/src/+/b8a327a1aa0227cf96dbbe0ad55f1c2773b23c23

commit b8a327a1aa0227cf96dbbe0ad55f1c2773b23c23
Author: Tomasz Wiszkowski <ender@google.com>
Date:   Thu Jan 16 13:33:18 2025 -0800

    Move prepopulated engines schema near the definitions (cleanup)

    Bug: b:382104753
2025-02-18 12:46:55 +00:00
Claudio DeSouza 24a0069abd [cr134] prepopulated_engines.json under 3p path
This file is now moving under:
  //third_party/search_engines_data/resources/definitions/

As a result the patching for the list of search engines has to be
updated to be applied on the third party path.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/a3afc766c5b7c12798a67ccf2deca1a99a79bcb1

commit a3afc766c5b7c12798a67ccf2deca1a99a79bcb1
Author: Tomasz Wiszkowski <ender@google.com>
Date:   Thu Jan 16 13:28:16 2025 -0800

    Build SE definitions off of scrubbed source of truth.

    This change ensures Search Engine definitions are built from data
    file scrubbed from the internal source of truth, ensuring unattended
    propagation of changes.

    ** There's no functional changes in this CL **

    The CL merely uses a new, target location of the
    prepopulated_engines.json file to generate derived C++ files, and
    updates all included headers (and DEPS files) accordingly.

    Bug: b:382104753
2025-02-18 12:46:54 +00:00
AlexeyBarabash 12bcebfa91 [cr134] [Android] Removed TabModelSelectorObserver.onTabModelSelected
Related Chromium change
https://source.chromium.org/chromium/chromium/src/+/d223f2e8f4900df442947eb2303b356468625d6f

	[Tab Model] Remove onTabModelSelected

	Replace onTabModelSelected with observing getCurrentTabModelSupplier.

	A previous CL removed most usages, but a few were leftover. This CL
	completes the migration.

	This change in observation style is beneficial as it avoids adding
	TabModelSelectorObservers that get notified of various spammy onChange
	updates and subsequently no-op all observer events except for tab model
	selected which is the only action most observers cared about in the
	first place.

	Change-Id: I9a657404c65b8e6b182924656e264945b7ddb35e
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6165827
2025-02-18 12:46:54 +00:00
AlexeyBarabash 7125b6f95a [cr134] [Android] changes at PermissionPromptAndroid class
- ShouldUseRequestingOriginFavicon is now virtual
- introduced protected delegate() method

Related Chromium change
https://source.chromium.org/chromium/chromium/src/+/b03957663284904033846c9dc667fac4e052d0bc

	[PEPC] Add  embedded prompt class for Android

	As outlined in go/pepc-on-clank-dd, this CL introduces a new PEPC
	prompt class extending from the PermissionPromptAndroid base.

	Change-Id: I32e7a2a85e5febf3df34080b17a72054abc3a86b
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6162756
2025-02-18 12:46:54 +00:00
AlexeyBarabash 885a9530d9 [cr134] [Android] Some args changed from Supplier to ObservableSupplier:
- bottomControlsOffsetSupplier arg at ToolbarSwipeLayout.ctor
- bottomToolbarControlsOffsetSupplier arg at TopToolbarCoordinator.initializeWithNative

Related Chromium change
https://source.chromium.org/chromium/chromium/src/+/3c074e90a12a90c9c0d128773300b209b7b29d6f

	[Anchor] Make bottom controls offset for overlay observable

	This allows us to drive immediate changes to the position of the overlay
	instead of passively adjusting when a new frame is composed. This is
	necessary to be able to set up animations to start the overlay in the
	correct location.

	Bug: 369134461
	Change-Id: I897a2ad7943e56660255a1fd2a5b485b70d64466
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6107628
2025-02-18 12:46:54 +00:00
Claudio DeSouza 16cf200035 [cr134] kSigninOnDesktopLearnMoreURL impl
Chromium change:
https://chromium.googlesource.com/chromium/src/+/9c7ccb3ff3af0a85d29c32475921aa129962d6cf

commit 9c7ccb3ff3af0a85d29c32475921aa129962d6cf
Author: Ryan Sultanem <rsult@google.com>
Date:   Wed Jan 15 12:46:54 2025 -0800

    [ProfilePicker][Glic] Implement the Learn More button

    The Learn More text is currently part of a bigger string. Therefore the
    click even is added dynamically when the page is loaded by connecting
    the part of the text through the class tag to override the click event.

    On that event, the handler is notified to load the last used profile,
    open or use a browser with it and load the "Sign in to Chrome" page from
    the Help Center.

    The page cannot be loaded directly, since the Picker uses the System
    Profile which cannot be used to open a Browser.

    The picker is not expected to be closed after this action.

    Bug: b:385726690
2025-02-18 12:46:54 +00:00
Claudio DeSouza 187ca50694 [cr134] BookmarkBarView::bookmark_service_ moved
This member has been changed into `BookmarkMergedSurfaceService`, and
now the bookmark model is retrieved from it.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/333703279b44da5c6f246f2a3057960fb0ed04b1

commit 333703279b44da5c6f246f2a3057960fb0ed04b1
Author: Monica Basta <msalama@chromium.org>
Date:   Wed Jan 15 01:35:03 2025 -0800

    [B4B] Migrate BookmarkBarView to a merged surface

    This CL replaces the use of `BookmarkModel` in `BookmarkBarView` with
    `BookmarkMergedSurfaceService`. This completes the migration work for
    the `BookmarkBarView`.

    Tasks left to do:
    - Adapt the observer once the new `BookmarkMergedSurfaceService`
      observer is introduced.
    - Add tests for the behavior when account nodes exist. This will be
      added once full support for account nodes is added to
      `BookmarkMergedSurface` (almost done).

    Bug: 369304373
2025-02-18 12:46:54 +00:00
Claudio DeSouza 2d456babf9 [cr134] ChooseNameForNewProfile simplified with no args
The logic around the argument this function used to take has been
removed.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/d287e1a9315f05d1a4fbef950f1c0607b9aa5f8e

commit d287e1a9315f05d1a4fbef950f1c0607b9aa5f8e
Author: David Roger <droger@chromium.org>
Date:   Wed Jan 15 04:37:15 2025 -0800

    [Uno-D] Simplify ChooseNameForNewProfile()

    Remove the logic based on the avatar index.

    Bug: 388031813
2025-02-18 12:46:54 +00:00
Claudio DeSouza 6e91978f4c [cr134] SearchEngineChoiceService requires regional capabilities
A `RegionalCapabilitiesService` instance is now required to instantiate
`SearchEngineChoiceService`.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/01008cac8b5afc198e85a60761fbe766aac4f645

commit 01008cac8b5afc198e85a60761fbe766aac4f645
Author: Nicolas Dossou-Gbete <dgn@chromium.org>
Date:   Wed Jan 15 05:19:52 2025 -0800

    rcaps: Make RegionalCapabilitiesService a Profile-Keyed Service

    Moves it from being created as an internal dependency of
    SearchEngineChoiceService to being a full PKS.

    Bug: 388792357
2025-02-18 12:46:54 +00:00
Claudio DeSouza 223b98eaa9 [cr134][blink] isPointInPath/isPointInStroke patching moved
This function has been moved into a base IDL file, and the patches are
for them are being addjusted accoridingly.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/5f753b51a296d3e55dff42557e1e4aeb34387a2e

commit 5f753b51a296d3e55dff42557e1e4aeb34387a2e
Author: Yi Xu <yiyix@chromium.org>
Date:   Tue Jan 14 21:32:11 2025 -0800

    Factor out the common functions in Canvas2D and paint canvas

    Both paint canvas and HTML/Offscreen 2D canvas share the same Canvas
    rendering context 2D API. This CL refactors out the common functions and
    puts them in a new CanvasRecordingContext2D IDL mixin, which all three
    2D context interfaces implement.

    Bug: 380095402
2025-02-18 12:46:54 +00:00
Emerick Rogul 544c636ae5 Filter upstream tests as needed 2025-02-18 12:46:54 +00:00
Emerick Rogul b86262fe3b Update build patch to handle renamed variable (exec_script_whitelist -> exec_script_allowlist)
Updated our variable name to match the new nomenclature as well.

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/7c6c78ad4e0ed6a0e1204264b02db8f85d34994e

commit 7c6c78ad4e0ed6a0e1204264b02db8f85d34994e
Author: Dirk Pranke <dpranke@google.com>
Date:   Tue Jan 14 16:19:05 2025 -0800

    Use `exec_script_allowlist` in the GN dotfile (//.gn).

    GN now supports `exec_script_allowlist` as an alternative/synonym
    for `exec_script_whitelist`, so we should move to it to be more
    inclusive and accurate.

    Bug: 389986807
2025-02-18 12:46:54 +00:00
Emerick Rogul b2c3fe9cfc Remove obsolete prefs::kPrivacySandboxApisEnabledV2 preference
Support for this preference was removed upstream a year ago, but the preference
itself was retained. It has now been removed, so we need to delete our
references to it.

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/b89929785bd064a4a041705e8aa998d34797f310

commit b89929785bd064a4a041705e8aa998d34797f310
Author: Daniel Rubery <drubery@chromium.org>
Date:   Fri Jan 10 11:34:00 2025 -0800

    Remove one year expired prefs

    It's January 2025, so prefs deprecated in January 2024 can be removed
    from browser_prefs.cc.

    Change-Id: I76fbb6a8b7e5ca1040d880628ba6a01ac51a801b
2025-02-18 12:46:54 +00:00
Emerick Rogul bf46f9e506 Reanchor override now that GetMatchWithUrl has moved to a different class
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/5d75c527e312d3c18915498cce640b876a4ec9aa

commit 5d75c527e312d3c18915498cce640b876a4ec9aa
Author: Nihar Majmudar <niharm@google.com>
Date:   Thu Jan 2 07:27:32 2025 -0800

    [searchbox] Move generic methods up to SearchboxHandler.

    No-op change. Right now a lot of generic searchbox methods (methods that
    all searchboxes need) are implemented in RealboxHandler. We want to move
    these up to the base SearchboxHandler class so other handlers can
    implement handler specific methods.

    Follow ups plan to move lens specific code out of the RealboxHandler.

    Change-Id: Ic021780c717ce2109b1a65492f7f314295ea24e3
    Bug: 386819657
2025-02-18 12:46:53 +00:00
Claudio DeSouza 111f98048e [cr134] Fix -Wshadow failures in v8 shadow files
This warning has been enabled for v8, and this has run into build
failures in brave in certain places.

Chromium change:
https://chromium.googlesource.com/v8/v8/+/d8634af5939710d21fd8e64b053af697dc0751bd

commit d8634af5939710d21fd8e64b053af697dc0751bd
Author: Darius Mercadier <dmercadier@chromium.org>
Date:   Tue Jan 14 08:34:18 2025 +0100

    Re-enable Clang -Wshadow warning

    Change-Id: Ieca876e2384519ca4333857337835c9802a10f61
2025-02-18 12:46:53 +00:00
Claudio DeSouza 104b8657a1 [cr134] RemoteSuggestionsService ctor added args
This class now requires a `SearchAggregatorSuggestionsService`, however
the use in brave can default to a `nullptr`.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/81cd2f8a5022b1040e106c5064f703202356af53

commit 81cd2f8a5022b1040e106c5064f703202356af53
Author: Ananya <ananyaseelam@google.com>
Date:   Mon Jan 13 10:46:30 2025 -0800

    [search aggregator] Connect SearchAggregator to RemoteSuggestionsService

    This CL adds SearchAggregatorSuggestionsService to the input parameters
    of the RemoteSuggestionsService constructor. This CL also adds the
    CreateSearchAggregatorSuggestionsRequest method which will later
    be used in the EnterpriseSearchAggregatorProvider.

    Note: The naming of SearchAggregatorSuggestionsService will
    change to EnterpriseSearchAggregatorSuggestionsService in a
    follow up CL. This is why the factory is named
    enterprise_search_aggregator_suggestions_service_factory.

    Bug: 388320853
2025-02-18 12:46:53 +00:00
AlexeyBarabash 2c0b5169bc [cr134] [Android] Adopt Java class GaiaId to improve type safety
Related Chromium change
https://source.chromium.org/chromium/chromium/src/+/3fded879fa9da3882befb43faecc1fb3859065af

	Adopt Java class GaiaId to improve type safety

	Introduced recently in Java in https://crrev.com/c/6110420, the
	class is now adopted throughout the codebase to replace String
	objects when it comes to gaia IDs.

	Bug: 380416867
	Change-Id: I1ea990a1442c87f2fd2df4693c2ddb22d5ada873
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6110764
2025-02-18 12:46:53 +00:00
AlexeyBarabash 3c295aa6cd [cr134] [Android] DataSharingTabManager arg at ShareDelegateImpl.ctor
Related Chromium change
https://source.chromium.org/chromium/chromium/src/+/4e5c55b15ee78687e23badd0eed3f699349b2f15

	Add share action to system share sheet

	Adds an extra option that creates a tab group and shares the group.

	Low-Coverage-Reason: TRIVIAL_CHANGE does a list of checks
	Bug: 386833405
	Change-Id: I659add9ceeeb8c799160eb6fe12cc84289b581f4
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6155198
2025-02-18 12:46:53 +00:00
Claudio DeSouza 77e834fd12 [cr134] AddComponentResourceEntries taking a span
This function used to have an extra argument for size.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/4fc0bb99288183c7ab331d20fe5e4473f3c3e70c

commit 4fc0bb99288183c7ab331d20fe5e4473f3c3e70c
Author: David Bertoni <dbertoni@chromium.org>
Date:   Fri Jan 10 13:53:58 2025 -0800

    [Extensions] Do some more unsafe buffer use cleanup. (3)

    Bug: 351564777
2025-02-18 12:46:53 +00:00