From 3ffa1c0a435cd49f0537bdbeb0f4649ee7cdc0b3 Mon Sep 17 00:00:00 2001 From: Lorenzo Pichilli Date: Sat, 26 Oct 2019 22:11:23 +0200 Subject: [PATCH] Updated onLoadResource event, Updated WebResourceResponse class, Deleted WebResourceRequest class, added useOnDownloadStart option, created webview options classes, added initial content blocking support --- .idea/workspace.xml | 489 +++++++++--------- CHANGELOG.md | 10 +- .../ContentBlocker/ContentBlocker.java | 171 ++++++ .../ContentBlocker/ContentBlockerAction.java | 22 + .../ContentBlockerActionType.java | 29 ++ .../ContentBlocker/ContentBlockerTrigger.java | 27 + .../ContentBlockerTriggerResourceType.java | 34 ++ .../InAppWebView/InAppWebView.java | 58 ++- .../InAppWebView/InAppWebViewClient.java | 127 +---- .../InAppWebView/InAppWebViewOptions.java | 3 + .../JavaScriptBridgeInterface.java | 40 ++ .../android/app/src/main/AndroidManifest.xml | 1 + example/assets/index.html | 2 +- example/lib/inline_example.screen.dart | 43 +- example/lib/test.dart | 4 +- example/lib/webview_example.screen.dart | 2 +- ios/Classes/InAppWebView.swift | 84 ++- ios/Classes/InAppWebViewOptions.swift | 2 + lib/flutter_inappbrowser.dart | 3 +- lib/src/content_blocker.dart | 77 +++ lib/src/in_app_browser.dart | 5 +- lib/src/in_app_webview.dart | 44 +- lib/src/types.dart | 64 ++- lib/src/web_history.dart | 30 -- lib/src/webview_options.dart | 232 +++++++++ 25 files changed, 1076 insertions(+), 527 deletions(-) create mode 100644 android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/ContentBlocker/ContentBlocker.java create mode 100644 android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/ContentBlocker/ContentBlockerAction.java create mode 100644 android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/ContentBlocker/ContentBlockerActionType.java create mode 100644 android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/ContentBlocker/ContentBlockerTrigger.java create mode 100644 android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/ContentBlocker/ContentBlockerTriggerResourceType.java create mode 100644 lib/src/content_blocker.dart delete mode 100644 lib/src/web_history.dart create mode 100644 lib/src/webview_options.dart diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 8a3b8482..f2e059fd 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -15,43 +15,31 @@ - - - - - - - - - + + + + + + + - - - - - - - - - - - + - - - - + + + + @@ -74,48 +62,44 @@ - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - + + @@ -123,11 +107,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + @@ -147,11 +161,6 @@ - cordova - onDownloadStart - platfor - DATAAAAAA - defaultTargetPlatform test WebResourceResponse onCUstom @@ -177,6 +186,11 @@ _throwIsNotOpened _hand _ChannelManager + onDo + options + initialData + assert + Level activity.getPreferences(0) @@ -196,8 +210,6 @@ @@ -262,6 +276,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -