Changeset 41270 in webkit
- Timestamp:
- Feb 26, 2009 2:45:13 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r41251 r41270 1 2009-02-26 Xan Lopez <xan@gnome.org> 2 3 Reviewed by Holger Freyther. 4 5 https://bugs.webkit.org/show_bug.cgi?id=16947 6 [GTK] Missing HTTP Auth challenge 7 8 Add HTTP authentication dialog with optional GNOME Keyring 9 storage. 10 11 * GNUmakefile.am: 12 * configure.ac: 13 1 14 2009-02-26 Xan Lopez <xan@gnome.org> 2 15 -
trunk/GNUmakefile.am
r41251 r41270 182 182 $(COVERAGE_CFLAGS) \ 183 183 $(HILDON_CFLAGS) \ 184 $(GEOCLUE_CFLAGS) 184 $(GEOCLUE_CFLAGS) \ 185 $(GNOMEKEYRING_CFLAGS) 185 186 186 187 libWebCore_la_CPPFLAGS = \ … … 211 212 $(PNG_LIBS) \ 212 213 $(GEOCLUE_LIBS) \ 214 $(GNOMEKEYRING_LIBS) \ 213 215 -lpthread 214 216 -
trunk/WebCore/ChangeLog
r41269 r41270 1 2009-02-26 Xan Lopez <xan@gnome.org> 2 3 Reviewed by Holger Freyther. 4 5 https://bugs.webkit.org/show_bug.cgi?id=16947 6 [GTK] Missing HTTP Auth challenge 7 8 Add HTTP authentication dialog with optional GNOME Keyring 9 storage. 10 11 * GNUmakefile.am: 12 * platform/network/ResourceHandleInternal.h: 13 (WebCore::ResourceHandleInternal::ResourceHandleInternal): 14 * platform/network/soup/ResourceHandleSoup.cpp: 15 (WebCore::currentToplevelCallback): 16 (WebCore::ResourceHandle::startHttp): 17 (WebCore::ResourceHandle::start): 18 * platform/network/soup/webkit-soup-auth-dialog.c: Added. 19 (webkit_soup_auth_dialog_class_init): 20 (webkit_soup_auth_dialog_init): 21 (webkit_soup_auth_dialog_session_feature_init): 22 (free_authData): 23 (set_password_callback): 24 (response_callback): 25 (show_auth_dialog): 26 (find_password_callback): 27 (session_authenticate): 28 (attach): 29 * platform/network/soup/webkit-soup-auth-dialog.h: Added. 30 1 31 2009-02-25 Ojan Vafai <ojan@chromium.org> and Eric Seidel <eric@webkit.org> 2 32 -
trunk/WebCore/GNUmakefile.am
r41266 r41270 1818 1818 WebCore/platform/network/soup/ResourceHandleSoup.cpp \ 1819 1819 WebCore/platform/network/soup/ResourceRequest.h \ 1820 WebCore/platform/network/soup/ResourceResponse.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 1823 1824 if USE_GNOMEKEYRING 1825 webcore_cppflags += \ 1826 -DWTF_USE_GNOMEKEYRING=1 1827 endif 1821 1828 1822 1829 # --- -
trunk/WebCore/platform/network/ResourceHandleInternal.h
r39690 r41270 48 48 #if USE(SOUP) 49 49 #include <libsoup/soup.h> 50 class Frame; 50 51 #endif 51 52 … … 118 119 , m_total(0) 119 120 , m_idleHandler(0) 121 , m_frame(0) 120 122 #endif 121 123 #if PLATFORM(QT) … … 188 190 gsize m_bufsize, m_total; 189 191 guint m_idleHandler; 192 Frame* m_frame; 190 193 #endif 191 194 #if PLATFORM(QT) -
trunk/WebCore/platform/network/soup/ResourceHandleSoup.cpp
r41226 r41270 29 29 #include "Base64.h" 30 30 #include "CookieJarSoup.h" 31 #include "ChromeClient.h" 31 32 #include "CString.h" 32 33 #include "DocLoader.h" … … 35 36 #include "MIMETypeRegistry.h" 36 37 #include "NotImplemented.h" 38 #include "Page.h" 37 39 #include "ResourceError.h" 38 40 #include "ResourceHandleClient.h" … … 40 42 #include "ResourceResponse.h" 41 43 #include "TextEncoding.h" 44 #include "webkit-soup-auth-dialog.h" 42 45 43 46 #include <errno.h> 44 47 #include <fcntl.h> 45 48 #include <gio/gio.h> 49 #include <gtk/gtk.h> 46 50 #include <libsoup/soup.h> 47 51 #include <libsoup/soup-message.h> … … 371 375 } 372 376 377 static GtkWidget* currentToplevelCallback(WebKitSoupAuthDialog* feature, SoupMessage* message, gpointer userData) 378 { 379 gpointer messageData = g_object_get_data(G_OBJECT(message), "resourceHandle"); 380 if (!messageData) 381 return NULL; 382 383 ResourceHandle* handle = static_cast<ResourceHandle*>(messageData); 384 if (!handle) 385 return NULL; 386 387 ResourceHandleInternal* d = handle->getInternal(); 388 if (!d) 389 return NULL; 390 391 Frame* frame = d->m_frame; 392 if (!frame) 393 return NULL; 394 395 GtkWidget* toplevel = gtk_widget_get_toplevel(GTK_WIDGET(frame->page()->chrome()->platformWindow())); 396 if (GTK_WIDGET_TOPLEVEL(toplevel)) 397 return toplevel; 398 else 399 return NULL; 400 } 401 373 402 static void ensureSessionIsInitialized(SoupSession* session) 374 403 { … … 382 411 setDefaultCookieJar(jar); 383 412 413 SoupSessionFeature* authDialog = static_cast<SoupSessionFeature*>(g_object_new(WEBKIT_TYPE_SOUP_AUTH_DIALOG, NULL)); 414 g_signal_connect(authDialog, "current-toplevel", G_CALLBACK(currentToplevelCallback), NULL); 415 soup_session_add_feature(session, authDialog); 416 g_object_unref(authDialog); 417 384 418 const char* webkit_debug = g_getenv("WEBKIT_DEBUG"); 385 419 if (!soup_session_get_feature(session, SOUP_TYPE_LOGGER) … … 401 435 msg = soup_message_new(request().httpMethod().utf8().data(), urlString.utf8().data()); 402 436 g_signal_connect(msg, "restarted", G_CALLBACK(restartedCallback), this); 403 404 437 g_signal_connect(msg, "got-headers", G_CALLBACK(gotHeadersCallback), this); 405 438 g_signal_connect(msg, "got-chunk", G_CALLBACK(gotChunkCallback), this); 439 440 g_object_set_data(G_OBJECT(msg), "resourceHandle", reinterpret_cast<void*>(this)); 406 441 407 442 HTTPHeaderMap customHeaders = d->m_request.httpHeaderFields(); … … 519 554 String protocol = url.protocol(); 520 555 556 // Used to set the authentication dialog toplevel; may be NULL 557 d->m_frame = frame; 558 521 559 if (equalIgnoringCase(protocol, "data")) 522 560 return startData(urlString); -
trunk/configure.ac
r41172 r41270 349 349 AC_MSG_RESULT([$enable_geolocation]) 350 350 351 # check whether to enable gnomekeyring support 352 AC_MSG_CHECKING([whether to enable gnomekeyring support]) 353 AC_ARG_ENABLE(gnomekeyring, 354 AC_HELP_STRING([--enable-gnomekeyring], 355 [enable support for gnomekeyring [default=no]]), 356 [],[enable_gnomekeyring="no"]) 357 AC_MSG_RESULT([$enable_gnomekeyring]) 358 351 359 # check whether to enable SVG support 352 360 AC_MSG_CHECKING([whether to enable SVG support]) … … 518 526 AC_SUBST([LIBSOUP_LIBS]) 519 527 528 if test "$enable_gnomekeyring" = "yes"; then 529 PKG_CHECK_MODULES([GNOMEKEYRING], 530 [gnome-keyring-1]) 531 AC_SUBST([GNOMEKEYRING_CFLAGS]) 532 AC_SUBST([GNOMEKEYRING_LIBS]) 533 fi 534 520 535 # check if FreeType/FontConfig are available 521 536 if test "$with_font_backend" = "freetype"; then … … 594 609 AM_CONDITIONAL([TARGET_QUARTZ], [test "$with_target" = "quartz"]) 595 610 AM_CONDITIONAL([TARGET_DIRECTFB], [test "$with_target" = "directfb"]) 611 612 # Auth backend conditionals 613 AM_CONDITIONAL([USE_GNOMEKEYRING], [test "$enable_gnomekeyring" = "yes"]) 596 614 597 615 # Font backend conditionals … … 650 668 Dashboard support : $enable_dashboard_support 651 669 Geolocation support : $enable_geolocation 670 GNOME Keyring support : $enable_gnomekeyring 652 671 HTML5 offline web applications support : $enable_offline_web_applications 653 672 HTML5 channel messaging support : $enable_channel_messaging
Note: See TracChangeset
for help on using the changeset viewer.