summaryrefslogtreecommitdiffstats
path: root/src/core/login_delegate_qt.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-05-09 17:04:10 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-07-10 10:26:29 +0200
commit0a01998411de6a46af8d0b0ae13b8f401cd14a4b (patch)
tree7c27c908723628b70b21bfb52428c72acf050a71 /src/core/login_delegate_qt.h
parent3c34f95ad4a96737f66ab4933edb9e00abecdc24 (diff)
Adaptations for Chromium 74
Change-Id: Icdefa05eec39c632328dfc40862e5b734170bf3f Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'src/core/login_delegate_qt.h')
-rw-r--r--src/core/login_delegate_qt.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/core/login_delegate_qt.h b/src/core/login_delegate_qt.h
index 3a9c073cd..61f1745aa 100644
--- a/src/core/login_delegate_qt.h
+++ b/src/core/login_delegate_qt.h
@@ -43,6 +43,7 @@
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/login_delegate.h"
#include "content/public/browser/resource_request_info.h"
+#include "content/public/browser/web_contents_observer.h"
#include "url/gurl.h"
#include "web_contents_adapter_client.h"
@@ -56,20 +57,17 @@ namespace QtWebEngineCore {
class AuthenticationDialogController;
-class LoginDelegateQt : public content::LoginDelegate {
+class LoginDelegateQt : public content::LoginDelegate,
+ public content::WebContentsObserver
+{
public:
LoginDelegateQt(net::AuthChallengeInfo *authInfo,
- content::ResourceRequestInfo::WebContentsGetter web_contents_getter,
+ content::WebContents *web_contents,
GURL url,
bool first_auth_attempt,
LoginAuthRequiredCallback auth_required_callback);
- ~LoginDelegateQt();
-
- void triggerDialog();
-
- // LoginDelegate implementation
- void OnRequestCancelled() override;
+ ~LoginDelegateQt() override;
QUrl url() const;
QString realm() const;
@@ -80,14 +78,14 @@ public:
void sendAuthToRequester(bool success, const QString &user, const QString &password);
private:
- void triggerDialogOnUI();
+ void triggerDialog();
void destroy();
scoped_refptr<net::AuthChallengeInfo> m_authInfo;
GURL m_url;
LoginAuthRequiredCallback m_auth_required_callback;
- content::ResourceRequestInfo::WebContentsGetter m_webContentsGetter;
+ base::WeakPtrFactory<LoginDelegateQt> m_weakFactory;
// This member is used to keep authentication dialog controller alive until
// authorization is sent or cancelled.