From 6b846c363ddd694bf32ac7e18f0316f4f2663e1b Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 22 Oct 2014 20:39:43 +0100 Subject: Add trivial maps facilitator at about:maps This is a simple HTML front end for the Google Static Maps API, since we don't yet have enough JS support for the full Google Maps. See: https://developers.google.com/maps/documentation/staticmaps/ --- content/fetchers/about.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'content/fetchers/about.c') diff --git a/content/fetchers/about.c b/content/fetchers/about.c index 18528cda7..eeea3d992 100644 --- a/content/fetchers/about.c +++ b/content/fetchers/about.c @@ -572,6 +572,21 @@ static bool fetch_about_welcome_handler(struct fetch_about_context *ctx) return true; } +static bool fetch_about_maps_handler(struct fetch_about_context *ctx) +{ + fetch_msg msg; + + /* content is going to return redirect */ + fetch_set_http_code(ctx->fetchh, 302); + + msg.type = FETCH_REDIRECT; + msg.data.redirect = "resource:maps.html"; + + fetch_about_send_callback(&msg, ctx); + + return true; +} + /* Forward declaration because this handler requires the handler table. */ static bool fetch_about_about_handler(struct fetch_about_context *ctx); @@ -593,6 +608,8 @@ struct about_handlers about_handler_list[] = { fetch_about_licence_handler, true }, { "welcome", SLEN("welcome"), NULL, fetch_about_welcome_handler, false }, + { "maps", SLEN("maps"), NULL, + fetch_about_maps_handler, false }, { "config", SLEN("config"), NULL, fetch_about_config_handler, false }, { "Choices", SLEN("Choices"), NULL, -- cgit v1.2.3