package androidx.webkit.internal; import androidx.annotation.NonNull; import androidx.webkit.WebMessageCompat; import androidx.webkit.WebMessagePortCompat; import androidx.webkit.WebViewFeature; import java.lang.reflect.InvocationHandler; import org.chromium.support_lib_boundary.WebMessageBoundaryInterface; import org.chromium.support_lib_boundary.WebMessageCallbackBoundaryInterface; import org.chromium.support_lib_boundary.util.BoundaryInterfaceReflectionUtil; /* loaded from: classes.dex */ public class WebMessageCallbackAdapter implements WebMessageCallbackBoundaryInterface { private final WebMessagePortCompat.WebMessageCallbackCompat mImpl; @Override // org.chromium.support_lib_boundary.FeatureFlagHolderBoundaryInterface @NonNull public String[] getSupportedFeatures() { return new String[]{WebViewFeature.WEB_MESSAGE_CALLBACK_ON_MESSAGE}; } public WebMessageCallbackAdapter(@NonNull WebMessagePortCompat.WebMessageCallbackCompat webMessageCallbackCompat) { this.mImpl = webMessageCallbackCompat; } @Override // org.chromium.support_lib_boundary.WebMessageCallbackBoundaryInterface public void onMessage(@NonNull InvocationHandler invocationHandler, @NonNull InvocationHandler invocationHandler2) { WebMessageCompat webMessageCompatFromBoundaryInterface = WebMessageAdapter.webMessageCompatFromBoundaryInterface((WebMessageBoundaryInterface) BoundaryInterfaceReflectionUtil.castToSuppLibClass(WebMessageBoundaryInterface.class, invocationHandler2)); if (webMessageCompatFromBoundaryInterface != null) { this.mImpl.onMessage(new WebMessagePortImpl(invocationHandler), webMessageCompatFromBoundaryInterface); } } }