diff options
Diffstat (limited to 'src/core/autofill_client_qt.cpp')
-rw-r--r-- | src/core/autofill_client_qt.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/core/autofill_client_qt.cpp b/src/core/autofill_client_qt.cpp index c7becd605..1b51d5fbf 100644 --- a/src/core/autofill_client_qt.cpp +++ b/src/core/autofill_client_qt.cpp @@ -17,8 +17,16 @@ namespace QtWebEngineCore { +void AutofillClientQt::CreateForWebContents(content::WebContents *contents) +{ + DCHECK(contents); + if (!FromWebContents(contents)) + contents->SetUserData(UserDataKey(), base::WrapUnique(new AutofillClientQt(contents))); +} + AutofillClientQt::AutofillClientQt(content::WebContents *webContents) - : content::WebContentsUserData<AutofillClientQt>(*webContents) + : autofill::ContentAutofillClient( + webContents, base::BindRepeating(&autofill::BrowserDriverInitHook, this, "")) , content::WebContentsObserver(webContents) , m_popupController(new AutofillPopupController(new AutofillPopupControllerPrivate)) { @@ -133,6 +141,4 @@ WebContentsAdapterClient *AutofillClientQt::adapterClient() ->client(); } -WEB_CONTENTS_USER_DATA_KEY_IMPL(AutofillClientQt); - } // namespace QtWebEngineCore |