mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-20 01:29:20 +03:00
monkey: Support reporting page info state
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
parent
715586bb65
commit
5063fc838e
@ -404,6 +404,48 @@ gui_window_console_log(struct gui_window *g,
|
||||
(int)msglen, msg);
|
||||
}
|
||||
|
||||
static void
|
||||
gui_window_report_page_info(struct gui_window *g)
|
||||
{
|
||||
const char *state = "***WAH***";
|
||||
|
||||
switch (browser_window_get_page_info_state(g->bw)) {
|
||||
case PAGE_STATE_UNKNOWN:
|
||||
state = "UNKNOWN";
|
||||
break;
|
||||
|
||||
case PAGE_STATE_INTERNAL:
|
||||
state = "INTERNAL";
|
||||
break;
|
||||
|
||||
case PAGE_STATE_LOCAL:
|
||||
state = "LOCAL";
|
||||
break;
|
||||
|
||||
case PAGE_STATE_INSECURE:
|
||||
state = "INSECURE";
|
||||
break;
|
||||
|
||||
case PAGE_STATE_SECURE_OVERRIDE:
|
||||
state = "SECURE_OVERRIDE";
|
||||
break;
|
||||
|
||||
case PAGE_STATE_SECURE_ISSUES:
|
||||
state = "SECURE_ISSUES";
|
||||
break;
|
||||
|
||||
case PAGE_STATE_SECURE:
|
||||
state = "SECURE";
|
||||
break;
|
||||
|
||||
default:
|
||||
assert(0 && "Monkey needs some lovin' here");
|
||||
break;
|
||||
}
|
||||
moutf(MOUT_WINDOW, "PAGE_STATUS WIN %u STATUS %s",
|
||||
g->win_num, state);
|
||||
}
|
||||
|
||||
/**** Handlers ****/
|
||||
|
||||
static void
|
||||
@ -718,6 +760,10 @@ gui_window_event(struct gui_window *gw, enum gui_window_event event)
|
||||
gui_window_stop_throbber(gw);
|
||||
break;
|
||||
|
||||
case GW_EVENT_PAGE_INFO_CHANGE:
|
||||
gui_window_report_page_info(gw);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user