From 49983cfdaf0530236bcfc8b5150618610484488a Mon Sep 17 00:00:00 2001 From: Lorenzo Pichilli Date: Sat, 26 Oct 2019 04:42:50 +0200 Subject: [PATCH] added onDownloadStart event, onLoadResourceCustomScheme event and resourceCustomSchemes option, onTargetBlank event and useOnTargetBlank option, code refactoring --- .idea/workspace.xml | 555 +++--- CHANGELOG.md | 18 +- .../ChromeCustomTabsActivity.java | 8 +- .../flutter_inappbrowser/FlutterWebView.java | 1 + .../InAppBrowserActivity.java | 9 +- .../InAppBrowserFlutterPlugin.java | 13 +- .../InAppWebView/InAppWebChromeClient.java | 16 +- .../InAppWebView/InAppWebView.java | 101 +- .../InAppWebView/InAppWebViewClient.java | 117 +- .../InAppWebView/InAppWebViewOptions.java | 5 + .../JavaScriptBridgeInterface.java | 10 +- .../flutter_inappbrowser/Util.java | 56 + .../android/app/src/main/AndroidManifest.xml | 15 +- .../flutterwebviewexample/MyApplication.java | 12 + example/assets/index.html | 6 +- example/ios/Runner.xcodeproj/project.pbxproj | 15 + example/ios/Runner/AppDelegate.swift | 5 + example/ios/Runner/Info.plist | 19 +- example/ios/Runner/Runner-Bridging-Header.h | 2 +- example/lib/inline_example.screen.dart | 59 +- example/lib/main.dart | 2 + example/lib/webview_example.screen.dart | 13 +- example/pubspec.yaml | 2 + flutter_inappbrowser.iml | 1 - ios/Classes/CustomeSchemeHandler.swift | 40 + ios/Classes/FlutterWebViewFactory.swift | 7 +- ios/Classes/InAppWebView.swift | 166 +- ios/Classes/InAppWebViewOptions.swift | 2 + ios/Classes/SwiftFlutterPlugin.swift | 30 +- lib/flutter_inappbrowser.dart | 1556 +---------------- lib/src/channel_manager.dart | 27 + lib/src/chrome_safari_browser.dart | 118 ++ lib/src/cookie_manager.dart | 153 ++ lib/src/in_app_browser.dart | 342 ++++ lib/src/in_app_localhost_server.dart | 88 + lib/src/in_app_webview.dart | 819 +++++++++ lib/src/types.dart | 98 ++ lib/src/web_history.dart | 30 + 38 files changed, 2494 insertions(+), 2042 deletions(-) create mode 100644 example/android/app/src/main/java/com/pichillilorenzo/flutterwebviewexample/MyApplication.java create mode 100644 ios/Classes/CustomeSchemeHandler.swift create mode 100644 lib/src/channel_manager.dart create mode 100644 lib/src/chrome_safari_browser.dart create mode 100644 lib/src/cookie_manager.dart create mode 100644 lib/src/in_app_browser.dart create mode 100644 lib/src/in_app_localhost_server.dart create mode 100644 lib/src/in_app_webview.dart create mode 100644 lib/src/types.dart create mode 100644 lib/src/web_history.dart diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 07de65f8..8a3b8482 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -15,17 +15,43 @@ + + + + + + + + + - - + + + + + + - + + + + + + + + + + + + + - + + @@ -48,42 +74,63 @@ - - - - - - - - - - - - - - - + + - + - - + + + + + + + + + + + + + + + + + + + + - + + - + - - + + + + + + + + + + + + + + + + + @@ -94,47 +141,50 @@ - File - onExit - _handleMethod - javaScriptHandlersMap - onConsoleM - return this - return await - onCallJsHandler - ListenerCallback - jsonDecode - CallBac - dart - ``` - JavaScriptHandlerCallback - addJavaScriptHandler - indexTest - removeJavaScriptHandler - __safeBrowsingEnabled__ - __safe - __textZoom - hidden - builtInZoomControls - __builtInZoomControls__ - android.support.v4 - __transparentBackground__ - dispose - _dispose - UIImagePNGRepresentation - png cordova + onDownloadStart + platfor + DATAAAAAA + defaultTargetPlatform + test + WebResourceResponse + onCUstom + CustomSchemeResponse + initialUrl + InAppBrowser + onCustomScheme + print + onTargetBlank + customSchemes + customSchemes__ + toJson + onCustom + schemes + schemes_ + onDownload + resourceCustomSchemes + onLoadResourceCustomScheme + and return a [Cu + encoded in `base64` + _ + _throwIsNotOpened( + _throwIsNotOpened + _hand + _ChannelManager activity.getPreferences(0) Log. com.pichillilorenzo.flutter_inappbrowser flutter_inappbrowser + throwIsNotOpened + ChannelManager $PROJECT_DIR$/example/android @@ -173,25 +223,34 @@ - +