From c18e6aaed8caa69eba141b4a4894d12df37dda40 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Mon, 30 Oct 2017 22:56:52 -0400 Subject: mq_web_view_scheme_set_methods(): Call new scheme's initialize() method --- diff --git a/src/web-view-schemes/methods.c b/src/web-view-schemes/methods.c index 9fb6896..0a682a3 100644 --- a/src/web-view-schemes/methods.c +++ b/src/web-view-schemes/methods.c @@ -22,14 +22,15 @@ #include "schemes.h" static gboolean -check_and_set_methods(MqWebViewSchemeMethods **methods, - MqWebViewScheme *scheme, const gchar *uri, +check_and_set_methods(MqWebView *web_view, MqWebViewScheme *scheme, + MqWebViewSchemeMethods **methods, const gchar *uri, MqWebViewSchemeMethods *scheme_methods) { if (scheme_methods->match_uri(uri)) { if (*methods) { (*methods)->finalize(scheme); } + scheme_methods->initialize(web_view, scheme, uri); *methods = scheme_methods; return TRUE; } else { @@ -44,9 +45,9 @@ mq_web_view_scheme_set_methods(MqWebView *web_view, MqWebViewScheme *scheme, #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-value" - check_and_set_methods(methods, scheme, uri, + check_and_set_methods(web_view, scheme, methods, uri, &mq_web_view_normal_scheme_methods) || - check_and_set_methods(methods, scheme, uri, + check_and_set_methods(web_view, scheme, methods, uri, &mq_web_view_view_source_scheme_methods); #pragma GCC diagnostic pop -- cgit v0.9.1