summaryrefslogtreecommitdiffstats
path: root/src/webenginequick/ui_delegates_manager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/webenginequick/ui_delegates_manager.h')
-rw-r--r--src/webenginequick/ui_delegates_manager.h53
1 files changed, 39 insertions, 14 deletions
diff --git a/src/webenginequick/ui_delegates_manager.h b/src/webenginequick/ui_delegates_manager.h
index 0f515d4be..218d403d4 100644
--- a/src/webenginequick/ui_delegates_manager.h
+++ b/src/webenginequick/ui_delegates_manager.h
@@ -47,19 +47,20 @@
#include <QtCore/qstring.h>
#include <QtCore/qstringlist.h>
-#define FOR_EACH_COMPONENT_TYPE(F, SEPARATOR) \
- F(Menu, menu) SEPARATOR \
- F(MenuItem, menuItem) SEPARATOR \
- F(MenuSeparator, menuSeparator) SEPARATOR \
- F(AlertDialog, alertDialog) SEPARATOR \
- F(ColorDialog, colorDialog) SEPARATOR \
- F(ConfirmDialog, confirmDialog) SEPARATOR \
- F(PromptDialog, promptDialog) SEPARATOR \
- F(FilePicker, filePicker) SEPARATOR \
- F(AuthenticationDialog, authenticationDialog) SEPARATOR \
- F(ToolTip, toolTip) SEPARATOR \
- F(TouchHandle, touchHandle) SEPARATOR \
- F(TouchSelectionMenu, touchSelectionMenu) SEPARATOR \
+#define FOR_EACH_COMPONENT_TYPE(F, SEPARATOR) \
+ F(Menu, menu) SEPARATOR F(MenuItem, menuItem) \
+ SEPARATOR \
+ F(MenuSeparator, menuSeparator) SEPARATOR F(AlertDialog, alertDialog) \
+ SEPARATOR \
+ F(ColorDialog, colorDialog) SEPARATOR F(ConfirmDialog, confirmDialog) \
+ SEPARATOR \
+ F(PromptDialog, promptDialog) SEPARATOR F(FilePicker, filePicker) \
+ SEPARATOR \
+ F(AuthenticationDialog, authenticationDialog) SEPARATOR F(ToolTip, toolTip) \
+ SEPARATOR \
+ F(TouchHandle, touchHandle) SEPARATOR F(TouchSelectionMenu, touchSelectionMenu) \
+ SEPARATOR \
+ F(AutofillPopup, autofillPopup) SEPARATOR
#define COMMA_SEPARATOR ,
#define SEMICOLON_SEPARATOR ;
@@ -79,6 +80,7 @@ QT_END_NAMESPACE
namespace QtWebEngineCore {
class AuthenticationDialogController;
+class AutofillPopupController;
class ColorChooserController;
class FilePickerController;
class JavaScriptDialogController;
@@ -115,14 +117,18 @@ public:
QQuickItem *createTouchHandle();
void showTouchSelectionMenu(TouchSelectionMenuController *, const QRect &, const int spacing);
void hideTouchSelectionMenu();
+ void showAutofillPopup(QtWebEngineCore::AutofillPopupController *controller, QPointF pos,
+ int width, bool autoselectFirstSuggestion);
+ void hideAutofillPopup();
private:
bool ensureComponentLoaded(ComponentType);
QQuickWebEngineView *m_view;
- QScopedPointer<QObject> m_toolTip;
QStringList m_importDirs;
+ QScopedPointer<QObject> m_toolTip;
QScopedPointer<QObject> m_touchSelectionMenu;
+ QScopedPointer<QObject> m_autofillPopup;
FOR_EACH_COMPONENT_TYPE(MEMBER_DECLARATION, SEMICOLON_SEPARATOR)
@@ -130,6 +136,25 @@ private:
};
+class AutofillPopupEventFilter : public QObject
+{
+ Q_OBJECT
+
+public:
+ AutofillPopupEventFilter(QtWebEngineCore::AutofillPopupController *controller,
+ UIDelegatesManager *manager, QObject *parent)
+ : QObject(parent), m_controller(controller), m_manager(manager)
+ {
+ }
+
+protected:
+ bool eventFilter(QObject *object, QEvent *event) override;
+
+private:
+ QtWebEngineCore::AutofillPopupController *m_controller;
+ UIDelegatesManager *m_manager;
+};
+
} // namespace QtWebEngineCore
#endif // UI_DELEGATES_MANAGER_H