[cr146][Android] Convert ObservableSupplierImpl usages in omnibox

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/9dc3f0d9c6752101cdbec7685dc8df9231333a73

	Android: Convert ObservableSupplierImpl usages in omnibox

	Bug: 467389696
	Change-Id: Ie664088a70e547ab0d19e518019911ee35c9c7cf
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7511143
This commit is contained in:
AlexeyBarabash
2026-02-26 13:47:48 +00:00
committed by Claudio DeSouza
parent e4dc94ff32
commit 0712d65e25
8 changed files with 24 additions and 20 deletions
@@ -8,7 +8,7 @@ package org.chromium.chrome.browser.compositor.layouts;
import android.content.Context;
import android.view.ViewGroup;
import org.chromium.base.supplier.MonotonicObservableSupplier;
import org.chromium.base.supplier.NonNullObservableSupplier;
import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider;
import org.chromium.chrome.browser.layouts.LayoutManager;
import org.chromium.chrome.browser.theme.TopUiThemeColorProvider;
@@ -29,7 +29,7 @@ public class BraveToolbarSwipeLayout extends ToolbarSwipeLayout {
BrowserControlsStateProvider browserControlsStateProvider,
LayoutManager layoutManager,
TopUiThemeColorProvider topUiColorProvider,
MonotonicObservableSupplier<Integer> bottomControlsOffsetSupplier,
NonNullObservableSupplier<Integer> bottomControlsOffsetSupplier,
ViewGroup contentContainer) {
super(
context,
@@ -16,7 +16,7 @@ import androidx.appcompat.app.AppCompatActivity;
import org.chromium.base.supplier.MonotonicObservableSupplier;
import org.chromium.base.supplier.OneshotSupplier;
import org.chromium.base.supplier.SettableMonotonicObservableSupplier;
import org.chromium.base.supplier.SettableNonNullObservableSupplier;
import org.chromium.build.annotations.NullMarked;
import org.chromium.build.annotations.Nullable;
import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider;
@@ -79,7 +79,7 @@ public class BraveLocationBarMediator extends LocationBarMediator {
MonotonicObservableSupplier<TabModelSelector> tabModelSelectorSupplier,
@Nullable BrowserControlsStateProvider browserControlsStateProvider,
Supplier<@Nullable ModalDialogManager> modalDialogManagerSupplier,
SettableMonotonicObservableSupplier<@AutocompleteRequestType Integer>
SettableNonNullObservableSupplier<@AutocompleteRequestType Integer>
autocompleteRequestTypeSupplier,
@Nullable PageZoomIndicatorCoordinator pageZoomIndicatorCoordinator,
FuseboxCoordinator fuseboxCoordinator,
@@ -15,6 +15,7 @@ import androidx.appcompat.app.AppCompatActivity;
import org.chromium.base.Callback;
import org.chromium.base.supplier.MonotonicObservableSupplier;
import org.chromium.base.supplier.NonNullObservableSupplier;
import org.chromium.base.supplier.OneshotSupplier;
import org.chromium.base.supplier.OneshotSupplierImpl;
import org.chromium.base.supplier.SettableMonotonicObservableSupplier;
@@ -123,7 +124,7 @@ public class BraveTabbedRootUiCoordinator extends TabbedRootUiCoordinator {
@Nullable Bundle savedInstanceState,
@Nullable PersistableBundle persistentState,
@Nullable MultiInstanceManager multiInstanceManager,
@NonNull MonotonicObservableSupplier<Integer> overviewColorSupplier,
@NonNull NonNullObservableSupplier<Integer> overviewColorSupplier,
@NonNull
MonotonicObservableSupplier<ManualFillingComponent>
manualFillingComponentSupplier,
@@ -452,7 +452,7 @@ public class BraveToolbarManager extends ToolbarManager
@Nullable OnClickListener bookmarkClickHandler,
@Nullable OnClickListener customTabsBackClickHandler,
@Nullable NonNullObservableSupplier<Integer> archivedTabCountSupplier,
MonotonicObservableSupplier<TabModelDotInfo> tabModelNotificationDotSupplier,
NonNullObservableSupplier<TabModelDotInfo> tabModelNotificationDotSupplier,
@Nullable UndoBarThrottle undoBarThrottle) {
super.initializeWithNative(
@@ -14,6 +14,7 @@ import androidx.annotation.Nullable;
import org.chromium.base.Callback;
import org.chromium.base.supplier.MonotonicObservableSupplier;
import org.chromium.base.supplier.NonNullObservableSupplier;
import org.chromium.base.supplier.NullableObservableSupplier;
import org.chromium.base.supplier.ObservableSupplierImpl;
import org.chromium.base.supplier.OneshotSupplier;
@@ -77,7 +78,7 @@ public class BraveBottomControlsCoordinator extends BottomControlsCoordinator {
ScrollingBottomViewResourceFrameLayout root,
OneshotSupplier<BottomControlsContentDelegate> contentDelegateSupplier,
TabObscuringHandler tabObscuringHandler,
MonotonicObservableSupplier<Boolean> overlayPanelVisibilitySupplier,
NonNullObservableSupplier<Boolean> overlayPanelVisibilitySupplier,
NullableObservableSupplier<@BrowserControlsState Integer> constraintsSupplier,
Supplier<Boolean> readAloudRestoringSupplier) {
super(
@@ -13,6 +13,7 @@ import androidx.annotation.ColorInt;
import org.chromium.base.BraveReflectionUtil;
import org.chromium.base.supplier.MonotonicObservableSupplier;
import org.chromium.base.supplier.NonNullObservableSupplier;
import org.chromium.base.supplier.NullableObservableSupplier;
import org.chromium.base.supplier.OneshotSupplier;
import org.chromium.build.annotations.Nullable;
@@ -73,13 +74,13 @@ public class BraveTopToolbarCoordinator extends TopToolbarCoordinator {
MonotonicObservableSupplier<AppMenuButtonHelper> appMenuButtonHelperSupplier,
@Nullable ToggleTabStackButtonCoordinator tabSwitcherButtonCoordinator,
MonotonicObservableSupplier<Integer> tabCountSupplier,
MonotonicObservableSupplier<Boolean> homepageEnabledSupplier,
MonotonicObservableSupplier<Boolean> homepageNonNtpSupplier,
NonNullObservableSupplier<Boolean> homepageEnabledSupplier,
NonNullObservableSupplier<Boolean> homepageNonNtpSupplier,
Supplier<ResourceManager> resourceManagerSupplier,
HistoryDelegate historyDelegate,
boolean initializeWithIncognitoColors,
NullableObservableSupplier<@BrowserControlsState Integer> constraintsSupplier,
MonotonicObservableSupplier<Boolean> compositorInMotionSupplier,
NonNullObservableSupplier<Boolean> compositorInMotionSupplier,
BrowserStateBrowserControlsVisibilityDelegate
browserStateBrowserControlsVisibilityDelegate,
FullscreenManager fullscreenManager,
@@ -90,7 +91,7 @@ public class BraveTopToolbarCoordinator extends TopToolbarCoordinator {
@Nullable OnLongClickListener onLongClickListener,
ToolbarProgressBar progressBar,
NullableObservableSupplier<Tab> tabSupplier,
MonotonicObservableSupplier<Boolean> toolbarNavControlsEnabledSupplier,
NonNullObservableSupplier<Boolean> toolbarNavControlsEnabledSupplier,
@Nullable BackButtonCoordinator backButtonCoordinator,
@Nullable ForwardButtonCoordinator forwardButtonCoordinator,
@Nullable HomeButtonDisplay homeButtonDisplay,