[gnome-online-accounts/wip/rishi/pocket-firefox: 8/8] oauth2: Add vfunc



commit 21335235d076f6c2350bc6b6d0c10e3be74b9473
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Jul 21 18:43:16 2016 +0200

    oauth2: Add vfunc

 src/goabackend/goaoauth2provider-priv.h     |    1 +
 src/goabackend/goaoauth2provider-web-view.h |    1 +
 src/goabackend/goaoauth2provider.c          |    5 ++++-
 3 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/goabackend/goaoauth2provider-priv.h b/src/goabackend/goaoauth2provider-priv.h
index 7fb5855..3f11076 100644
--- a/src/goabackend/goaoauth2provider-priv.h
+++ b/src/goabackend/goaoauth2provider-priv.h
@@ -105,6 +105,7 @@ struct _GoaOAuth2ProviderClass
   gboolean     (*is_password_node)             (GoaOAuth2Provider            *provider,
                                                 WebKitDOMHTMLInputElement    *element);
   gboolean     (*decide_navigation_policy)     (GoaOAuth2Provider              *provider,
+                                                WebKitWebView                  *web_view,
                                                 WebKitNavigationPolicyDecision *decision);
   gboolean     (*process_redirect_url)         (GoaOAuth2Provider            *provider,
                                                 const gchar                  *redirect_url,
diff --git a/src/goabackend/goaoauth2provider-web-view.h b/src/goabackend/goaoauth2provider-web-view.h
index f94eae4..d85c873 100644
--- a/src/goabackend/goaoauth2provider-web-view.h
+++ b/src/goabackend/goaoauth2provider-web-view.h
@@ -29,6 +29,7 @@
 G_BEGIN_DECLS
 
 gboolean     goa_oauth2_provider_decide_navigation_policy     (GoaOAuth2Provider              *provider,
+                                                               WebKitWebView                  *web_view,
                                                                WebKitNavigationPolicyDecision *decision);
 
 G_END_DECLS
diff --git a/src/goabackend/goaoauth2provider.c b/src/goabackend/goaoauth2provider.c
index e19e8e1..7e625b0 100644
--- a/src/goabackend/goaoauth2provider.c
+++ b/src/goabackend/goaoauth2provider.c
@@ -290,6 +290,7 @@ goa_oauth2_provider_build_authorization_uri (GoaOAuth2Provider  *provider,
 
 static gboolean
 goa_oauth2_provider_decide_navigation_policy_default (GoaOAuth2Provider               *provider,
+                                                      WebKitWebView                   *web_view,
                                                       WebKitNavigationPolicyDecision  *decision)
 {
   return FALSE;
@@ -314,12 +315,14 @@ goa_oauth2_provider_decide_navigation_policy_default (GoaOAuth2Provider
  */
 gboolean
 goa_oauth2_provider_decide_navigation_policy (GoaOAuth2Provider               *provider,
+                                              WebKitWebView                   *web_view,
                                               WebKitNavigationPolicyDecision  *decision)
 {
   g_return_val_if_fail (GOA_IS_OAUTH2_PROVIDER (provider), FALSE);
+  g_return_val_if_fail (WEBKIT_IS_WEB_VIEW (web_view), FALSE);
   g_return_val_if_fail (WEBKIT_IS_NAVIGATION_POLICY_DECISION (decision), FALSE);
 
-  return GOA_OAUTH2_PROVIDER_GET_CLASS (provider)->decide_navigation_policy (provider, decision);
+  return GOA_OAUTH2_PROVIDER_GET_CLASS (provider)->decide_navigation_policy (provider, web_view, decision);
 }
 
 /* ---------------------------------------------------------------------------------------------------- */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]