summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/Authentication
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2013-09-13 12:51:20 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-19 20:50:05 +0200
commitd441d6f39bb846989d95bcf5caf387b42414718d (patch)
treee367e64a75991c554930278175d403c072de6bb8 /Source/WebKit2/UIProcess/Authentication
parent0060b2994c07842f4c59de64b5e3e430525c4b90 (diff)
downloadqtwebkit-d441d6f39bb846989d95bcf5caf387b42414718d.tar.gz
Import Qt5x2 branch of QtWebkit for Qt 5.2
Importing a new snapshot of webkit. Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source/WebKit2/UIProcess/Authentication')
-rw-r--r--Source/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.cpp16
-rw-r--r--Source/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.h20
-rw-r--r--Source/WebKit2/UIProcess/Authentication/AuthenticationDecisionListener.h6
-rw-r--r--Source/WebKit2/UIProcess/Authentication/WebCredential.cpp4
-rw-r--r--Source/WebKit2/UIProcess/Authentication/WebCredential.h6
-rw-r--r--Source/WebKit2/UIProcess/Authentication/WebProtectionSpace.h6
6 files changed, 23 insertions, 35 deletions
diff --git a/Source/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.cpp b/Source/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.cpp
index 7f4e958ed..9f64885ae 100644
--- a/Source/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.cpp
+++ b/Source/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.cpp
@@ -28,19 +28,19 @@
#include "AuthenticationDecisionListener.h"
#include "AuthenticationManagerMessages.h"
+#include "ChildProcessProxy.h"
#include "WebCertificateInfo.h"
#include "WebCoreArgumentCoders.h"
#include "WebCredential.h"
-#include "WebPageProxy.h"
#include "WebProcessProxy.h"
#include "WebProtectionSpace.h"
namespace WebKit {
-AuthenticationChallengeProxy::AuthenticationChallengeProxy(const WebCore::AuthenticationChallenge& authenticationChallenge, uint64_t challengeID, WebProcessProxy* process)
+AuthenticationChallengeProxy::AuthenticationChallengeProxy(const WebCore::AuthenticationChallenge& authenticationChallenge, uint64_t challengeID, CoreIPC::Connection* connection)
: m_coreAuthenticationChallenge(authenticationChallenge)
, m_challengeID(challengeID)
- , m_process(process)
+ , m_connection(connection)
{
ASSERT(m_challengeID);
m_listener = AuthenticationDecisionListener::create(this);
@@ -49,9 +49,9 @@ AuthenticationChallengeProxy::AuthenticationChallengeProxy(const WebCore::Authen
AuthenticationChallengeProxy::~AuthenticationChallengeProxy()
{
// If an outstanding AuthenticationChallengeProxy is being destroyed even though it hasn't been responded to yet,
- // we cancel it here so the WebProcess isn't waiting for an answer forever.
+ // we cancel it here so the process isn't waiting for an answer forever.
if (m_challengeID)
- m_process->send(Messages::AuthenticationManager::CancelChallenge(m_challengeID), 0);
+ m_connection->send(Messages::AuthenticationManager::CancelChallenge(m_challengeID), 0);
if (m_listener)
m_listener->detachChallenge();
@@ -63,11 +63,11 @@ void AuthenticationChallengeProxy::useCredential(WebCredential* credential)
return;
if (!credential)
- m_process->send(Messages::AuthenticationManager::ContinueWithoutCredentialForChallenge(m_challengeID), 0);
+ m_connection->send(Messages::AuthenticationManager::ContinueWithoutCredentialForChallenge(m_challengeID), 0);
else {
WebCertificateInfo* certificateInfo = credential->certificateInfo();
PlatformCertificateInfo platformInfo = certificateInfo ? certificateInfo->platformCertificateInfo() : PlatformCertificateInfo();
- m_process->send(Messages::AuthenticationManager::UseCredentialForChallenge(m_challengeID, credential->core(), platformInfo), 0);
+ m_connection->send(Messages::AuthenticationManager::UseCredentialForChallenge(m_challengeID, credential->core(), platformInfo), 0);
}
m_challengeID = 0;
@@ -78,7 +78,7 @@ void AuthenticationChallengeProxy::cancel()
if (!m_challengeID)
return;
- m_process->send(Messages::AuthenticationManager::CancelChallenge(m_challengeID), 0);
+ m_connection->send(Messages::AuthenticationManager::CancelChallenge(m_challengeID), 0);
m_challengeID = 0;
}
diff --git a/Source/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.h b/Source/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.h
index 51379eefb..ce3d6d6e5 100644
--- a/Source/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.h
+++ b/Source/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.h
@@ -31,25 +31,21 @@
#include <wtf/PassRefPtr.h>
namespace CoreIPC {
- class ArgumentDecoder;
- class Connection;
- class MessageID;
+class Connection;
}
namespace WebKit {
class AuthenticationDecisionListener;
+class ChildProcessProxy;
class WebCredential;
-class WebProcessProxy;
class WebProtectionSpace;
-class AuthenticationChallengeProxy : public APIObject {
+class AuthenticationChallengeProxy : public TypedAPIObject<APIObject::TypeAuthenticationChallenge> {
public:
- static const Type APIType = TypeAuthenticationChallenge;
-
- static PassRefPtr<AuthenticationChallengeProxy> create(const WebCore::AuthenticationChallenge& authenticationChallenge, uint64_t challengeID, WebProcessProxy* process)
+ static PassRefPtr<AuthenticationChallengeProxy> create(const WebCore::AuthenticationChallenge& authenticationChallenge, uint64_t challengeID, CoreIPC::Connection* connection)
{
- return adoptRef(new AuthenticationChallengeProxy(authenticationChallenge, challengeID, process));
+ return adoptRef(new AuthenticationChallengeProxy(authenticationChallenge, challengeID, connection));
}
~AuthenticationChallengeProxy();
@@ -64,13 +60,11 @@ public:
const WebCore::AuthenticationChallenge& core() { return m_coreAuthenticationChallenge; }
private:
- AuthenticationChallengeProxy(const WebCore::AuthenticationChallenge&, uint64_t challengeID, WebProcessProxy*);
+ AuthenticationChallengeProxy(const WebCore::AuthenticationChallenge&, uint64_t challengeID, CoreIPC::Connection*);
- virtual Type type() const { return APIType; }
-
WebCore::AuthenticationChallenge m_coreAuthenticationChallenge;
uint64_t m_challengeID;
- RefPtr<WebProcessProxy> m_process;
+ RefPtr<CoreIPC::Connection> m_connection;
RefPtr<AuthenticationDecisionListener> m_listener;
mutable RefPtr<WebCredential> m_webCredential;
mutable RefPtr<WebProtectionSpace> m_webProtectionSpace;
diff --git a/Source/WebKit2/UIProcess/Authentication/AuthenticationDecisionListener.h b/Source/WebKit2/UIProcess/Authentication/AuthenticationDecisionListener.h
index b2f92f4b0..940a65021 100644
--- a/Source/WebKit2/UIProcess/Authentication/AuthenticationDecisionListener.h
+++ b/Source/WebKit2/UIProcess/Authentication/AuthenticationDecisionListener.h
@@ -35,10 +35,8 @@ namespace WebKit {
class AuthenticationChallengeProxy;
class WebCredential;
-class AuthenticationDecisionListener : public APIObject {
+class AuthenticationDecisionListener : public TypedAPIObject<APIObject::TypeAuthenticationDecisionListener> {
public:
- static const Type APIType = TypeAuthenticationDecisionListener;
-
static PassRefPtr<AuthenticationDecisionListener> create(AuthenticationChallengeProxy* authenticationChallenge)
{
return adoptRef(new AuthenticationDecisionListener(authenticationChallenge));
@@ -52,8 +50,6 @@ public:
private:
explicit AuthenticationDecisionListener(AuthenticationChallengeProxy*);
- virtual Type type() const { return APIType; }
-
AuthenticationChallengeProxy* m_challengeProxy;
};
diff --git a/Source/WebKit2/UIProcess/Authentication/WebCredential.cpp b/Source/WebKit2/UIProcess/Authentication/WebCredential.cpp
index 6d70c5fbc..a69d509c7 100644
--- a/Source/WebKit2/UIProcess/Authentication/WebCredential.cpp
+++ b/Source/WebKit2/UIProcess/Authentication/WebCredential.cpp
@@ -40,6 +40,10 @@ WebCredential::WebCredential(WebCertificateInfo* certificateInfo)
{
}
+WebCredential::~WebCredential()
+{
+}
+
WebCertificateInfo* WebCredential::certificateInfo()
{
return m_certificateInfo.get();
diff --git a/Source/WebKit2/UIProcess/Authentication/WebCredential.h b/Source/WebKit2/UIProcess/Authentication/WebCredential.h
index 9f42d02e4..a957e7827 100644
--- a/Source/WebKit2/UIProcess/Authentication/WebCredential.h
+++ b/Source/WebKit2/UIProcess/Authentication/WebCredential.h
@@ -37,9 +37,9 @@ namespace WebKit {
class WebCertificateInfo;
-class WebCredential : public APIObject {
+class WebCredential : public TypedAPIObject<APIObject::TypeCredential> {
public:
- static const Type APIType = TypeCredential;
+ ~WebCredential();
static PassRefPtr<WebCredential> create(const WebCore::Credential& credential)
{
@@ -66,8 +66,6 @@ private:
explicit WebCredential(const WebCore::Credential&);
explicit WebCredential(WebCertificateInfo*);
- virtual Type type() const { return APIType; }
-
WebCore::Credential m_coreCredential;
RefPtr<WebCertificateInfo> m_certificateInfo;
};
diff --git a/Source/WebKit2/UIProcess/Authentication/WebProtectionSpace.h b/Source/WebKit2/UIProcess/Authentication/WebProtectionSpace.h
index 7c3882aad..4d4905fe9 100644
--- a/Source/WebKit2/UIProcess/Authentication/WebProtectionSpace.h
+++ b/Source/WebKit2/UIProcess/Authentication/WebProtectionSpace.h
@@ -32,10 +32,8 @@
namespace WebKit {
-class WebProtectionSpace : public APIObject {
+class WebProtectionSpace : public TypedAPIObject<APIObject::TypeProtectionSpace> {
public:
- static const Type APIType = TypeProtectionSpace;
-
static PassRefPtr<WebProtectionSpace> create(const WebCore::ProtectionSpace& protectionSpace)
{
return adoptRef(new WebProtectionSpace(protectionSpace));
@@ -53,8 +51,6 @@ public:
private:
explicit WebProtectionSpace(const WebCore::ProtectionSpace&);
- virtual Type type() const { return APIType; }
-
WebCore::ProtectionSpace m_coreProtectionSpace;
};