diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2013-09-13 12:51:20 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-19 20:50:05 +0200 |
commit | d441d6f39bb846989d95bcf5caf387b42414718d (patch) | |
tree | e367e64a75991c554930278175d403c072de6bb8 /Source/WebKit2/UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.cpp | |
parent | 0060b2994c07842f4c59de64b5e3e430525c4b90 (diff) | |
download | qtwebkit-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/API/gtk/WebKit2GtkAuthenticationDialog.cpp')
-rw-r--r-- | Source/WebKit2/UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.cpp | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.cpp deleted file mode 100644 index 13efe8c68..000000000 --- a/Source/WebKit2/UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2012 Igalia S.L. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "config.h" -#include "WebKit2GtkAuthenticationDialog.h" - -#include "AuthenticationChallengeProxy.h" -#include "AuthenticationDecisionListener.h" -#include "WebCredential.h" -#include "WebKitWebViewBasePrivate.h" -#include "WebKitWebViewPrivate.h" -#include <gtk/gtk.h> - -namespace WebKit { - -// This is necessary because GtkEventBox does not draw a background by default, -// but we want it to have a normal GtkWindow background. -static gboolean drawSignal(GtkWidget* widget, cairo_t* cr, GtkStyleContext* styleContext) -{ - gtk_render_background(styleContext, cr, 0, 0, - gtk_widget_get_allocated_width(widget), gtk_widget_get_allocated_height(widget)); - return FALSE; -} - -WebKit2GtkAuthenticationDialog::WebKit2GtkAuthenticationDialog(AuthenticationChallengeProxy* authenticationChallenge) - : GtkAuthenticationDialog(authenticationChallenge->core()) - , m_authenticationChallenge(authenticationChallenge) - , m_styleContext(adoptGRef(gtk_style_context_new())) -{ - m_dialog = gtk_event_box_new(); - - GtkWidget* frame = gtk_frame_new(0); - gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); - gtk_container_add(GTK_CONTAINER(m_dialog), frame); - createContentsInContainer(frame); - - gtk_style_context_add_class(m_styleContext.get(), GTK_STYLE_CLASS_BACKGROUND); - GtkWidgetPath* path = gtk_widget_path_new(); - gtk_widget_path_append_type(path, GTK_TYPE_WINDOW); - gtk_style_context_set_path(m_styleContext.get(), path); - gtk_widget_path_free(path); - - g_signal_connect(m_dialog, "draw", G_CALLBACK(drawSignal), m_styleContext.get()); -} - -void WebKit2GtkAuthenticationDialog::authenticate(const WebCore::Credential& credential) -{ - RefPtr<WebCredential> webCredential = WebCredential::create(credential); - m_authenticationChallenge->listener()->useCredential(webCredential.get()); -} - -} // namespace WebKit |