Commit c18f0a44 authored by Bo Liu's avatar Bo Liu Committed by Commit Bot

weblayer: Remove a few inline classes

This reduces binary size.

Change-Id: I99d5567246baa03865bd822b9b7f6dced1fdecf7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2446020Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#813356}
parent 636ef218
......@@ -24,6 +24,7 @@ import android.widget.FrameLayout;
import android.widget.RelativeLayout;
import androidx.annotation.IntDef;
import androidx.annotation.Nullable;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
......@@ -677,7 +678,7 @@ public class ContentViewRenderView
ContentViewRenderViewJni.get().init(ContentViewRenderView.this, rootWindow);
assert mNativeContentViewRenderView != 0;
mWindowAndroid = rootWindow;
requestMode(mode, (Boolean result) -> {});
requestMode(mode, null);
mDisplayAndroidObserver = new DisplayAndroid.DisplayAndroidObserver() {
@Override
public void onRotationChanged(int rotation) {
......@@ -689,10 +690,9 @@ public class ContentViewRenderView
updateBackgroundColor();
}
public void requestMode(@Mode int mode, ValueCallback<Boolean> callback) {
public void requestMode(@Mode int mode, @Nullable ValueCallback<Boolean> callback) {
boolean allowSurfaceControl = !mSelectionHandlesActive;
assert mode == MODE_SURFACE_VIEW || mode == MODE_TEXTURE_VIEW;
assert callback != null;
if (mRequested != null
&& (mRequested.getMode() != mode
|| mRequested.getAllowSurfaceControl() != allowSurfaceControl)) {
......@@ -710,7 +710,7 @@ public class ContentViewRenderView
listener.setRequestData(mRequested);
}
assert mRequested.getMode() == mode;
mRequested.addCallback(callback);
if (callback != null) mRequested.addCallback(callback);
}
/**
......@@ -805,7 +805,7 @@ public class ContentViewRenderView
// requestMode will take into account the updated |mSelectionHandlesActive|
// and respond appropriately, even if mode is the same.
requestMode(mCurrent.getMode(), (Boolean result) -> {});
requestMode(mCurrent.getMode(), null);
}
public InsetObserverView getInsetObserverView() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment