GtkAuthenticationDialog.h [plain text]
#ifndef GtkAuthenticationDialog_h
#define GtkAuthenticationDialog_h
#define LIBSOUP_I_HAVE_READ_BUG_594377_AND_KNOW_SOUP_PASSWORD_MANAGER_MIGHT_GO_AWAY
#include <wtf/gobject/GOwnPtr.h>
#include "GRefPtrGtk.h"
#include <libsoup/soup.h>
#include <wtf/FastAllocBase.h>
#include <wtf/Noncopyable.h>
#include <wtf/text/CString.h>
namespace WebCore {
class GtkAuthenticationDialog {
WTF_MAKE_NONCOPYABLE(GtkAuthenticationDialog);
WTF_MAKE_FAST_ALLOCATED;
public:
GtkAuthenticationDialog(GtkWindow*, SoupSession*, SoupMessage*, SoupAuth*);
~GtkAuthenticationDialog();
void show();
private:
void destroy();
void authenticate();
#ifdef SOUP_TYPE_PASSWORD_MANAGER
void savePassword();
static void savePasswordCallback(SoupMessage*, GtkAuthenticationDialog*);
#endif
static void authenticationDialogResponseCallback(GtkWidget*, gint responseID, GtkAuthenticationDialog*);
GtkWidget* m_dialog;
SoupSession* m_session;
GRefPtr<SoupMessage> m_message;
SoupAuth* m_auth;
GtkWidget* m_loginEntry;
GtkWidget* m_passwordEntry;
GtkWidget* m_rememberCheckButton;
#ifdef SOUP_TYPE_PASSWORD_MANAGER
bool m_isSavingPassword;
unsigned long m_savePasswordHandler;
CString m_username;
CString m_password;
#endif
};
}
#endif // GtkAuthenticationDialog_h