Package com.cefrium
Class CefModalDialogPresenter
java.lang.Object
org.chromium.ui.modaldialog.ModalDialogManager.Presenter
com.cefrium.CefModalDialogPresenter
public class CefModalDialogPresenter
extends org.chromium.ui.modaldialog.ModalDialogManager.Presenter
A
ModalDialogManager.Presenter that renders Chromium dialog models with a plain Android
AlertDialog.
Chrome's AppModalPresenter inflates a Chromium dialog layout
(ButtonCompat + ThemeOverlay.BrowserUI.ModalDialog styles + ColorStateLists) whose resource graph
does not resolve cleanly inside an embedding AAR (the same coupling that broke the contacts
picker). This draws the dialog with the platform AlertDialog instead - same approach as Cefrium's
device chooser and contact picker. It is enough for the dialogs an embedding hits today, the most
important being the File System Access "let this site view files in this folder?" permission
prompt (a tab-modal dialog). Without any presenter the native
ModalDialogWrapper::ShowTabModal CHECK(dialog_manager) crashes the process.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddDialogView(org.chromium.ui.modelutil.PropertyModel model, org.chromium.base.Callback<androidx.activity.ComponentDialog> onDialogCreatedCallback, org.chromium.base.Callback<android.view.View> onDialogShownCallback) protected voidremoveDialogView(org.chromium.ui.modelutil.PropertyModel model) Methods inherited from class org.chromium.ui.modaldialog.ModalDialogManager.Presenter
dismissCurrentDialog, getDialogModel, setEdgeToEdgeStateSupplier, setInsetObserver
-
Constructor Details
-
CefModalDialogPresenter
public CefModalDialogPresenter(android.content.Context context)
-
-
Method Details
-
addDialogView
protected void addDialogView(org.chromium.ui.modelutil.PropertyModel model, org.chromium.base.Callback<androidx.activity.ComponentDialog> onDialogCreatedCallback, org.chromium.base.Callback<android.view.View> onDialogShownCallback) - Specified by:
addDialogViewin classorg.chromium.ui.modaldialog.ModalDialogManager.Presenter
-
removeDialogView
protected void removeDialogView(org.chromium.ui.modelutil.PropertyModel model) - Specified by:
removeDialogViewin classorg.chromium.ui.modaldialog.ModalDialogManager.Presenter
-