summaryrefslogtreecommitdiffstats
path: root/src/core/resource_dispatcher_host_delegate_qt.h
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2015-08-26 10:43:05 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-09-06 19:26:52 +0000
commit691d4a008d90b7d69a7b4b05404475dae204848f (patch)
tree0a2144ae62ffaee5dc1788a5d6c1b9ce9ac52d12 /src/core/resource_dispatcher_host_delegate_qt.h
parent6ef0a365124d435314113837dc77fa07b02ff86b (diff)
Add AuthenticationDialogController
The new controller makes possible to handle authentication requests asynchronously. This is essential for the authentication support in the QtQuick API. Change-Id: Ib60b58448a60e817e64477529ec4bfd1535b3d19 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src/core/resource_dispatcher_host_delegate_qt.h')
-rw-r--r--src/core/resource_dispatcher_host_delegate_qt.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/core/resource_dispatcher_host_delegate_qt.h b/src/core/resource_dispatcher_host_delegate_qt.h
index 2cba210d3..d62292995 100644
--- a/src/core/resource_dispatcher_host_delegate_qt.h
+++ b/src/core/resource_dispatcher_host_delegate_qt.h
@@ -44,6 +44,8 @@
namespace QtWebEngineCore {
+class AuthenticationDialogController;
+
class ResourceDispatcherHostLoginDelegateQt : public content::ResourceDispatcherHostLoginDelegate {
public:
ResourceDispatcherHostLoginDelegateQt(net::AuthChallengeInfo *authInfo, net::URLRequest *request);
@@ -52,9 +54,16 @@ public:
// ResourceDispatcherHostLoginDelegate implementation
virtual void OnRequestCancelled();
+ QUrl url() const;
+ QString realm() const;
+ QString host() const;
+ bool isProxy() const;
+
+ void sendAuthToRequester(bool success, const QString &user, const QString &password);
+
private:
void triggerDialog();
- void sendAuthToRequester(bool success, const QString &user, const QString &password);
+ void destroy();
QUrl m_url;
QString m_realm;
@@ -64,9 +73,15 @@ private:
int m_renderProcessId;
int m_renderFrameId;
+ net::AuthChallengeInfo *m_authInfo;
+
// The request that wants login data.
// Must only be accessed on the IO thread.
net::URLRequest *m_request;
+
+ // This member is used to keep authentication dialog controller alive until
+ // authorization is sent or cancelled.
+ QSharedPointer<AuthenticationDialogController> m_dialogController;
};
class ResourceDispatcherHostDelegateQt : public content::ResourceDispatcherHostDelegate {