CredentialTransformData.h [plain text]
#ifndef CredentialTransformData_h
#define CredentialTransformData_h
#include "Credential.h"
#include "HTMLFormElement.h"
#include "HTMLInputElement.h"
#include "KURL.h"
#include "ProtectionSpace.h"
#include <wtf/RefPtr.h>
namespace WebCore {
struct CredentialTransformData {
CredentialTransformData();
CredentialTransformData(HTMLFormElement*, bool isForSaving = false);
CredentialTransformData(const ProtectionSpace&, const Credential&);
bool isValid() const { return m_isValid; }
ProtectionSpace protectionSpace() const { return m_protectionSpace; }
Credential credential() const;
void setCredential(const Credential&);
private:
bool findPasswordFormFields(const HTMLFormElement*);
bool locateSpecificPasswords(const Vector<HTMLInputElement*>& passwords);
KURL m_action;
ProtectionSpace m_protectionSpace;
mutable Credential m_credential;
RefPtr<HTMLInputElement> m_userNameElement;
RefPtr<HTMLInputElement> m_passwordElement;
RefPtr<HTMLInputElement> m_oldPasswordElement;
bool m_isValid;
};
}
#endif