Преглед изворни кода

[Test] - add mOriginWhitelist variable

Visakeswaran пре 5 година
родитељ
комит
d6ee35fb76

+ 4
- 0
android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java Прегледај датотеку

@@ -147,6 +147,7 @@ public class RNCWebViewManager extends SimpleViewManager<WebView> {
147 147
   protected boolean mAllowsFullscreenVideo = false;
148 148
   protected @Nullable String mUserAgent = null;
149 149
   protected @Nullable String mUserAgentWithApplicationName = null;
150
+  protected @Nullable List<Pattern> mOriginWhitelist;
150 151
 
151 152
   public RNCWebViewManager() {
152 153
     mWebViewConfig = new WebViewConfig() {
@@ -904,6 +905,9 @@ public class RNCWebViewManager extends SimpleViewManager<WebView> {
904 905
     public void setUrlPrefixesForDefaultIntent(ReadableArray specialUrls) {
905 906
       mUrlPrefixesForDefaultIntent = specialUrls;
906 907
     }
908
+    public void setOriginWhitelist(List<Pattern> originWhitelist) {
909
+      mOriginWhitelist = originWhitelist;
910
+    }
907 911
   }
908 912
 
909 913
   protected static class RNCWebChromeClient extends WebChromeClient implements LifecycleEventListener {