[gnome-online-accounts: 4/7] oauth2: Call goa_oauth2_provider_decide_navigation_policy
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts: 4/7] oauth2: Call goa_oauth2_provider_decide_navigation_policy
- Date: Thu, 21 Jul 2016 18:19:15 +0000 (UTC)
commit a229e7d4f0a811d8af1c74ad9e23366f6f664027
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Jul 19 18:37:09 2016 +0200
oauth2: Call goa_oauth2_provider_decide_navigation_policy
https://bugzilla.gnome.org/show_bug.cgi?id=755386
src/goabackend/goaoauth2provider.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/goabackend/goaoauth2provider.c b/src/goabackend/goaoauth2provider.c
index e0ac022..7e625b0 100644
--- a/src/goabackend/goaoauth2provider.c
+++ b/src/goabackend/goaoauth2provider.c
@@ -855,6 +855,14 @@ on_web_view_decide_policy (WebKitWebView *web_view,
if (decision_type != WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION)
goto default_behaviour;
+ if (goa_oauth2_provider_decide_navigation_policy (provider,
+ web_view,
+ WEBKIT_NAVIGATION_POLICY_DECISION (decision)))
+ {
+ response_id = 0;
+ goto ignore_request;
+ }
+
/* TODO: use oauth2_proxy_extract_access_token() */
action = webkit_navigation_policy_decision_get_navigation_action (WEBKIT_NAVIGATION_POLICY_DECISION
(decision));
@@ -961,7 +969,8 @@ on_web_view_decide_policy (WebKitWebView *web_view,
ignore_request:
g_assert (response_id != GTK_RESPONSE_NONE);
- gtk_dialog_response (priv->dialog, response_id);
+ if (response_id < 0)
+ gtk_dialog_response (priv->dialog, response_id);
webkit_policy_decision_ignore (decision);
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]