Changeset 41428 in webkit


Ignore:
Timestamp:
Mar 4, 2009 12:57:38 PM (15 years ago)
Author:
xan@webkit.org
Message:

2009-03-02 Xan Lopez <xan@gnome.org>

Reviewed by Mark Rowe.

https://bugs.webkit.org/show_bug.cgi?id=24287
[GTK] Move auth dialog feature to WebKit/

Add WebKitSoupAuthDialog files to build.

  • GNUmakefile.am:

WebCore:

2009-03-02 Xan Lopez <xan@gnome.org>

Reviewed by Mark Rowe.

https://bugs.webkit.org/show_bug.cgi?id=24287
[GTK] Move auth dialog feature to WebKit/

Remove WebKitSoupAuthDialog files from build and stop using it.

  • GNUmakefile.am:
  • platform/network/soup/ResourceHandleSoup.cpp: (WebCore::ensureSessionIsInitialized):
  • platform/network/soup/webkit-soup-auth-dialog.c: Removed.
  • platform/network/soup/webkit-soup-auth-dialog.h: Removed.

WebKit/gtk:

2009-03-02 Xan Lopez <xan@gnome.org>

Reviewed by Mark Rowe.

https://bugs.webkit.org/show_bug.cgi?id=24287
[GTK] Move auth dialog feature to WebKit/

Add WebKitSoupAuthDialog and add it to the session in webkit_init.

  • webkit/webkitprivate.cpp: (currentToplevelCallback): (webkit_init):
  • webkit/webkitsoupauthdialog.c: Added. (webkit_soup_auth_dialog_class_init): (webkit_soup_auth_dialog_init): (webkit_soup_auth_dialog_session_feature_init): (free_authData): (set_password_callback): (response_callback): (table_add_entry): (show_auth_dialog): (find_password_callback): (session_authenticate): (attach):
  • webkit/webkitsoupauthdialog.h: Added.
Location:
trunk
Files:
8 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r41401 r41428  
     12009-03-02  Xan Lopez  <xan@gnome.org>
     2
     3        Reviewed by Mark Rowe.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=24287
     6        [GTK] Move auth dialog feature to WebKit/
     7
     8        Add WebKitSoupAuthDialog files to build.
     9
     10        * GNUmakefile.am:
     11
    1122009-03-03  Gustavo Noronha Silva  <gns@gnome.org>
    213
  • trunk/GNUmakefile.am

    r41401 r41428  
    182182        $(COVERAGE_CFLAGS) \
    183183        $(HILDON_CFLAGS) \
    184         $(GEOCLUE_CFLAGS) \
    185         $(GNOMEKEYRING_CFLAGS)
     184        $(GEOCLUE_CFLAGS)
    186185
    187186libWebCore_la_CPPFLAGS = \
     
    212211        $(PNG_LIBS) \
    213212        $(GEOCLUE_LIBS) \
    214         $(GNOMEKEYRING_LIBS) \
    215213        -lpthread
    216214
     
    238236
    239237libwebkit_1_0_la_CFLAGS = \
    240         $(libWebCore_la_CFLAGS)
     238        $(libWebCore_la_CFLAGS) \
     239        $(GNOMEKEYRING_CFLAGS)
    241240
    242241libwebkit_1_0_la_CPPFLAGS = \
     
    251250
    252251libwebkit_1_0_la_LIBADD = \
    253         libWebCore.la
     252        libWebCore.la \
     253        $(GNOMEKEYRING_LIBS)
    254254
    255255#
     
    307307        WebKit/gtk/webkit/webkitdownload.h \
    308308        WebKit/gtk/webkit/webkitnetworkrequest.h \
     309        WebKit/gtk/webkit/webkitsoupauthdialog.h \
    309310        WebKit/gtk/webkit/webkitversion.h \
    310311        WebKit/gtk/webkit/webkitwebbackforwardlist.h \
     
    342343        WebKit/gtk/webkit/webkitprivate.cpp \
    343344        WebKit/gtk/webkit/webkitprivate.h \
     345        WebKit/gtk/webkit/webkitsoupauthdialog.c \
    344346        WebKit/gtk/webkit/webkitversion.cpp \
    345347        WebKit/gtk/webkit/webkitwebbackforwardlist.cpp \
  • trunk/WebCore/ChangeLog

    r41427 r41428  
     12009-03-02  Xan Lopez  <xan@gnome.org>
     2
     3        Reviewed by Mark Rowe.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=24287
     6        [GTK] Move auth dialog feature to WebKit/
     7
     8        Remove WebKitSoupAuthDialog files from build and stop using it.
     9
     10        * GNUmakefile.am:
     11        * platform/network/soup/ResourceHandleSoup.cpp:
     12        (WebCore::ensureSessionIsInitialized):
     13        * platform/network/soup/webkit-soup-auth-dialog.c: Removed.
     14        * platform/network/soup/webkit-soup-auth-dialog.h: Removed.
     15
    1162009-03-04  Simon Fraser  <simon.fraser@apple.com>
    217
  • trunk/WebCore/GNUmakefile.am

    r41357 r41428  
    18181818        WebCore/platform/network/soup/ResourceHandleSoup.cpp \
    18191819        WebCore/platform/network/soup/ResourceRequest.h \
    1820         WebCore/platform/network/soup/ResourceResponse.h \
    1821         WebCore/platform/network/soup/webkit-soup-auth-dialog.c \
    1822         WebCore/platform/network/soup/webkit-soup-auth-dialog.h
     1820        WebCore/platform/network/soup/ResourceResponse.h
    18231821
    18241822if USE_GNOMEKEYRING
  • trunk/WebCore/platform/network/soup/ResourceHandleSoup.cpp

    r41401 r41428  
    4242#include "ResourceResponse.h"
    4343#include "TextEncoding.h"
    44 #include "webkit-soup-auth-dialog.h"
    4544
    4645#include <errno.h>
     
    374373}
    375374
    376 static GtkWidget* currentToplevelCallback(WebKitSoupAuthDialog* feature, SoupMessage* message, gpointer userData)
    377 {
    378     gpointer messageData = g_object_get_data(G_OBJECT(message), "resourceHandle");
    379     if (!messageData)
    380         return NULL;
    381 
    382     ResourceHandle* handle = static_cast<ResourceHandle*>(messageData);
    383     if (!handle)
    384         return NULL;
    385 
    386     ResourceHandleInternal* d = handle->getInternal();
    387     if (!d)
    388         return NULL;
    389 
    390     Frame* frame = d->m_frame;
    391     if (!frame)
    392         return NULL;
    393 
    394     GtkWidget* toplevel =  gtk_widget_get_toplevel(GTK_WIDGET(frame->page()->chrome()->platformWindow()));
    395     if (GTK_WIDGET_TOPLEVEL(toplevel))
    396         return toplevel;
    397     else
    398         return NULL;
    399 }
    400 
    401375static void ensureSessionIsInitialized(SoupSession* session)
    402376{
     
    409383    else
    410384        setDefaultCookieJar(jar);
    411 
    412     SoupSessionFeature* authDialog = static_cast<SoupSessionFeature*>(g_object_new(WEBKIT_TYPE_SOUP_AUTH_DIALOG, NULL));
    413     g_signal_connect(authDialog, "current-toplevel", G_CALLBACK(currentToplevelCallback), NULL);
    414     soup_session_add_feature(session, authDialog);
    415     g_object_unref(authDialog);
    416385
    417386    const char* webkit_debug = g_getenv("WEBKIT_DEBUG");
  • trunk/WebKit/gtk/ChangeLog

    r41401 r41428  
     12009-03-02  Xan Lopez  <xan@gnome.org>
     2
     3        Reviewed by Mark Rowe.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=24287
     6        [GTK] Move auth dialog feature to WebKit/
     7
     8        Add WebKitSoupAuthDialog and add it to the session in webkit_init.
     9
     10        * webkit/webkitprivate.cpp:
     11        (currentToplevelCallback):
     12        (webkit_init):
     13        * webkit/webkitsoupauthdialog.c: Added.
     14        (webkit_soup_auth_dialog_class_init):
     15        (webkit_soup_auth_dialog_init):
     16        (webkit_soup_auth_dialog_session_feature_init):
     17        (free_authData):
     18        (set_password_callback):
     19        (response_callback):
     20        (table_add_entry):
     21        (show_auth_dialog):
     22        (find_password_callback):
     23        (session_authenticate):
     24        (attach):
     25        * webkit/webkitsoupauthdialog.h: Added.
     26
    1272009-03-03  Gustavo Noronha Silva  <gns@gnome.org>
    228
  • trunk/WebKit/gtk/webkit/webkit.h

    r41401 r41428  
    2626#include <webkit/webkitdownload.h>
    2727#include <webkit/webkitnetworkrequest.h>
     28#include <webkit/webkitsoupauthdialog.h>
    2829#include <webkit/webkitwebframe.h>
    2930#include <webkit/webkitwebsettings.h>
  • trunk/WebKit/gtk/webkit/webkitprivate.cpp

    r39575 r41428  
    2121#include "config.h"
    2222
     23#include "webkitsoupauthdialog.h"
    2324#include "webkitprivate.h"
    2425#include "ChromeClientGtk.h"
     26#include "Frame.h"
    2527#include "FrameLoader.h"
    2628#include "FrameLoaderClientGtk.h"
     
    3133#include "Pasteboard.h"
    3234#include "PasteboardHelperGtk.h"
     35#include "ResourceHandle.h"
     36#include "ResourceHandleClient.h"
     37#include "ResourceHandleInternal.h"
    3338#include <runtime/InitializeThreading.h>
    3439
     
    97102} /** end namespace WebKit */
    98103
     104static GtkWidget* currentToplevelCallback(WebKitSoupAuthDialog* feature, SoupMessage* message, gpointer userData)
     105{
     106    gpointer messageData = g_object_get_data(G_OBJECT(message), "resourceHandle");
     107    if (!messageData)
     108        return NULL;
     109
     110    ResourceHandle* handle = static_cast<ResourceHandle*>(messageData);
     111    if (!handle)
     112        return NULL;
     113
     114    ResourceHandleInternal* d = handle->getInternal();
     115    if (!d)
     116        return NULL;
     117
     118    WebCore::Frame* frame = d->m_frame;
     119    if (!frame)
     120        return NULL;
     121
     122    GtkWidget* toplevel =  gtk_widget_get_toplevel(GTK_WIDGET(frame->page()->chrome()->platformWindow()));
     123    if (GTK_WIDGET_TOPLEVEL(toplevel))
     124        return toplevel;
     125    else
     126        return NULL;
     127}
     128
    99129void webkit_init()
    100130{
     
    122152
    123153    Pasteboard::generalPasteboard()->setHelper(new WebKit::PasteboardHelperGtk());
     154
     155    SoupSession* session = webkit_get_default_session();
     156    SoupSessionFeature* authDialog = static_cast<SoupSessionFeature*>(g_object_new(WEBKIT_TYPE_SOUP_AUTH_DIALOG, NULL));
     157    g_signal_connect(authDialog, "current-toplevel", G_CALLBACK(currentToplevelCallback), NULL);
     158    soup_session_add_feature(session, authDialog);
     159    g_object_unref(authDialog);
    124160}
  • trunk/WebKit/gtk/webkit/webkitsoupauthdialog.c

    r41427 r41428  
    11/*
    2  * Copyright (C) 2009 Igalia S.L., Author: Xan Lopez <xlopez@igalia.com>
     2 * Copyright (C) 2009 Igalia S.L.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2727
    2828#include "webkitmarshal.h"
    29 #include "webkit-soup-auth-dialog.h"
     29#include "webkitsoupauthdialog.h"
    3030
    3131static void webkit_soup_auth_dialog_session_feature_init(SoupSessionFeatureInterface* feature_interface, gpointer interface_data);
     
    213213
    214214    if (toplevel)
    215         gtk_window_set_transient_for(window, toplevel);
     215        gtk_window_set_transient_for(window, GTK_WINDOW(toplevel));
    216216
    217217    /* Build contents */
  • trunk/WebKit/gtk/webkit/webkitsoupauthdialog.h

    r41427 r41428  
    11/*
    2  * Copyright (C) 2009 Igalia S.L., Author: Xan Lopez <xlopez@igalia.com>
     2 * Copyright (C) 2009 Igalia S.L.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    1919
    2020#include <gtk/gtk.h>
     21#include <libsoup/soup.h>
    2122
    2223#ifndef WEBKIT_SOUP_AUTH_DIALOG_H
Note: See TracChangeset for help on using the changeset viewer.