]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/views/NestedScrollWebView.java
Make first-party cookies tab aware.
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / views / NestedScrollWebView.java
index 6cedf5c2b41967d2cb8b9c74e7b261f9c72ea22d..7ef26d6ed6d4981e0363f994624b80469d49766c 100644 (file)
@@ -59,6 +59,9 @@ public class NestedScrollWebView extends WebView implements NestedScrollingChild
     // Keep track of when the domain name changes so that domain settings can be reapplied.  This should never be null.
     private String currentDomainName = "";
 
+    // Track the status of first-party cookies.
+    private boolean acceptFirstPartyCookies;
+
     // Track the resource requests.
     private ArrayList<String[]> resourceRequests = new ArrayList<>();
     private boolean easyListEnabled;
@@ -193,6 +196,18 @@ public class NestedScrollWebView extends WebView implements NestedScrollingChild
     }
 
 
+    // First-party cookies.
+    public void setAcceptFirstPartyCookies(boolean status) {
+        // Store the accept first-party cookies status.
+        acceptFirstPartyCookies = status;
+    }
+
+    public boolean getAcceptFirstPartyCookies() {
+        // Return the accept first-party cookies status.
+        return acceptFirstPartyCookies;
+    }
+
+
     // Resource requests.
     public void addResourceRequest(String[] resourceRequest) {
         // Add the resource request to the list.