diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/application.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/application.c b/src/application.c index 4d4c815..dbd148c 100644 --- a/src/application.c +++ b/src/application.c @@ -33,6 +33,7 @@ #include "about.h" #include "config.h" #include "download.h" +#include "view-source.h" #include "web-settings.h" #include "window.h" @@ -57,6 +58,7 @@ set_webkit_settings(MqApplication *application) webkit_web_context_set_favicon_database_directory(web_context, NULL); webkit_web_context_set_process_model(web_context, WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES); + webkit_web_context_register_uri_scheme(web_context, "mq-about", (WebKitURISchemeRequestCallback) mq_about_request, application, NULL); @@ -64,6 +66,13 @@ set_webkit_settings(MqApplication *application) webkit_web_context_get_security_manager(web_context), "mq-about"); + webkit_web_context_register_uri_scheme(web_context, "view-source", + (WebKitURISchemeRequestCallback) mq_view_source_request, + application, NULL); + webkit_security_manager_register_uri_scheme_as_local( + webkit_web_context_get_security_manager(web_context), + "view-source"); + mq_web_settings_connect(application->config, application->settings, web_context); } |