Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
1bffe06
Adds support for handling geolocation permissions.
yk3372 Mar 16, 2023
463da59
Merge branch 'flutter:main' into main
yk3372 Mar 16, 2023
233543d
remove unused result
yk3372 Mar 16, 2023
1dc6317
format code
yk3372 Mar 16, 2023
429e892
fix code format
yk3372 Mar 16, 2023
7acd43a
format java
yk3372 Mar 16, 2023
e80002a
format java
yk3372 Mar 16, 2023
9d8768f
Merge branch 'main' into main
yk3372 Mar 16, 2023
0825a8c
Merge branch 'main' into main
yk3372 Mar 22, 2023
020fecc
update version
yk3372 Mar 22, 2023
5e620d7
Merge branch 'main' into main
yk3372 Mar 23, 2023
516088d
Merge branch 'main' into main
yk3372 Mar 23, 2023
4a9a56b
Merge branch 'main' into main
yk3372 Mar 24, 2023
8916c72
Merge branch 'main' into main
yk3372 Mar 26, 2023
f72f9e7
Merge branch 'main' into main
yk3372 Mar 27, 2023
aca8e48
Merge branch 'main' into main
yk3372 Mar 28, 2023
a3c9bee
update change
yk3372 Apr 5, 2023
5438f05
update code
yk3372 Apr 5, 2023
8a62deb
add geolocationpermissionscallback
bparrishMines Apr 5, 2023
c718a21
formatting and hidepromt method
bparrishMines Apr 5, 2023
f064a91
Merge branch 'main' of github.com:flutter/packages into yk3372/main
bparrishMines Apr 5, 2023
3a74864
Merge branch 'main' into main
yk3372 Apr 6, 2023
806f956
Merge branch 'main' into main
yk3372 Apr 7, 2023
9341e3b
Merge branch 'main' into main
yk3372 Apr 7, 2023
bd5697b
add onGeolocationPermissionsHidePrompt callback
yk3372 Apr 7, 2023
1e57170
remove unused code
yk3372 Apr 7, 2023
9dc021c
format code
yk3372 Apr 7, 2023
44df75a
update code
yk3372 Apr 7, 2023
034a12d
format code
yk3372 Apr 7, 2023
8738853
format code
yk3372 Apr 7, 2023
2d58832
更改为callback方式
yk3372 Apr 7, 2023
6d9d1b3
format code
yk3372 Apr 7, 2023
4b0b08b
reformat
yk3372 Apr 7, 2023
666e962
reformat
yk3372 Apr 7, 2023
0634657
reformat
yk3372 Apr 7, 2023
b7e13a8
Merge branch 'main' into main
yk3372 Apr 7, 2023
1b4f289
format code
yk3372 Apr 7, 2023
45fde40
format code
yk3372 Apr 7, 2023
5ec1a29
Merge branch 'main' into main
yk3372 Apr 9, 2023
f6d7187
Merge branch 'main' into main
yk3372 Apr 10, 2023
1dd01c3
Merge branch 'main' into main
yk3372 Apr 11, 2023
b26d529
update doc
yk3372 Apr 11, 2023
4b8e0cf
setup geocallback api
yk3372 Apr 11, 2023
aac5278
format code
yk3372 Apr 11, 2023
397de9e
Merge branch 'main' into main
yk3372 Apr 11, 2023
9252092
Merge branch 'main' into main
yk3372 Apr 12, 2023
d811766
Merge branch 'main' into main
yk3372 Apr 13, 2023
d520901
update android version
yk3372 Apr 13, 2023
b9ed0b2
Merge branch 'main' into main
yk3372 Apr 14, 2023
e5ec59d
Merge branch 'main' into main
yk3372 Apr 17, 2023
f4ea10c
Merge branch 'main' into main
yk3372 Apr 18, 2023
fe19a96
Merge branch 'main' of github.com:flutter/packages into yk3372/main
bparrishMines Apr 20, 2023
a8115cc
handle lint warnings
bparrishMines Apr 20, 2023
4b767e3
fix test methods
bparrishMines Apr 20, 2023
08c1bb6
Merge branch 'main' into main
yk3372 Apr 21, 2023
167ee0f
Update packages/webview_flutter/webview_flutter_android/lib/src/andro…
yk3372 Apr 21, 2023
31c8c9e
modify code
yk3372 Apr 21, 2023
20b554c
format code
yk3372 Apr 21, 2023
29fd81d
Merge branch 'test'
yk3372 Apr 22, 2023
8870c5b
format code
yk3372 Apr 22, 2023
347a594
format code
yk3372 Apr 22, 2023
873efad
format code
yk3372 Apr 22, 2023
4851765
Merge branch 'main' into main
yk3372 Apr 23, 2023
7384705
Merge branch 'main' into main
yk3372 Apr 25, 2023
101fd96
Update packages/webview_flutter/webview_flutter_android/CHANGELOG.md
yk3372 Apr 28, 2023
85d8878
Update packages/webview_flutter/webview_flutter_android/CHANGELOG.md
yk3372 Apr 28, 2023
b43a269
Update packages/webview_flutter/webview_flutter_android/lib/src/andro…
yk3372 Apr 28, 2023
15764b6
Update packages/webview_flutter/webview_flutter_android/lib/src/andro…
yk3372 Apr 28, 2023
e04a91d
Merge branch 'main' into main
yk3372 Apr 28, 2023
d92ff2e
Merge branch 'main' into main
yk3372 May 4, 2023
121bf28
Update pubspec.yaml
yk3372 May 4, 2023
8c2a992
Merge branch 'main' into main
yk3372 May 4, 2023
fed594e
Merge branch 'main' into main
yk3372 May 8, 2023
9bcbe6f
Merge branch 'main' into main
yk3372 May 10, 2023
3486b6e
modify use way
yk3372 May 11, 2023
2c2f053
format
yk3372 May 11, 2023
83111ef
update
yk3372 May 12, 2023
91a3fc8
Merge branch 'main' into main
yk3372 May 12, 2023
da19b06
update code
yk3372 May 13, 2023
be240f6
update
yk3372 May 13, 2023
d9ca433
Merge branch 'main' into main
yk3372 May 14, 2023
6a10a58
Merge branch 'main' into main
yk3372 May 16, 2023
6347d82
Merge branch 'main' into main
yk3372 May 16, 2023
346605d
Merge branch 'main' into main
yk3372 May 17, 2023
3ceb4ca
Merge branch 'main' into main
yk3372 May 17, 2023
e8e0358
Merge branch 'main' into main
yk3372 May 18, 2023
12c3d5f
Merge branch 'main' into main
yk3372 May 20, 2023
e6f01be
Merge branch 'main' into main
yk3372 May 23, 2023
3a8a936
Merge branch 'main' into main
yk3372 May 24, 2023
de5b648
Merge branch 'main' into main
yk3372 May 24, 2023
7a833b9
add typedefs
yk3372 May 25, 2023
bfbd9d8
format code
yk3372 May 25, 2023
36456a2
format
yk3372 May 25, 2023
f852702
Merge branch 'main' into main
yk3372 Jun 1, 2023
d6ab611
Merge branch 'main' into main
yk3372 Jun 3, 2023
a611cd7
update test
yk3372 Jun 3, 2023
ea4ad01
fix test
yk3372 Jun 3, 2023
0a8dff3
Merge branch 'main' into main
yk3372 Jun 5, 2023
3ef9bc4
Merge branch 'main' into main
yk3372 Jun 6, 2023
59ce9b6
Merge branch 'main' of github.com:flutter/packages into yk3372/main
bparrishMines Jun 6, 2023
a71119e
Merge branch 'main' into main
yk3372 Jun 7, 2023
6087916
Merge branch 'main' of github.com:yk3372/packages into yk3372/main
bparrishMines Jun 7, 2023
9072bf0
add java test for onGeolocationPermissionsShowPrompt
bparrishMines Jun 7, 2023
f137811
Merge branch 'main' of github.com:flutter/packages into yk3372/main
bparrishMines Jun 7, 2023
05e544f
add nonnull
yk3372 Jun 9, 2023
5717eaa
Merge branch 'main' into main
yk3372 Jun 9, 2023
ea5b08c
Merge branch 'main' into main
yk3372 Jun 12, 2023
2069f1e
Merge branch 'main' into main
yk3372 Jun 13, 2023
f9a5b01
Merge branch 'main' into main
yk3372 Jun 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
format code
Signed-off-by: yk3372 <[email protected]>
  • Loading branch information
yk3372 committed Apr 7, 2023
commit 034a12da264fff474990b39a0aeffd074c1fd2b6
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,10 @@ class AndroidWebViewProxy {
Future<List<String>> Function(
android_webview.WebView webView,
android_webview.FileChooserParams params,
)?
onShowFileChooser,
)? onShowFileChooser,
Future<android_webview.GeoPermissionsHandleResultProxy> Function(
String origin,
)?
onGeolocationPermissionsShowPrompt,
)? onGeolocationPermissionsShowPrompt,
void Function(android_webview.WebChromeClient instance)?
onGeolocationPermissionsHidePrompt}) createAndroidWebChromeClient;

Expand All @@ -51,21 +49,18 @@ class AndroidWebViewProxy {
android_webview.WebView webView,
android_webview.WebResourceRequest request,
android_webview.WebResourceError error,
)?
onReceivedRequestError,
)? onReceivedRequestError,
@Deprecated('Only called on Android version < 23.')
void Function(
android_webview.WebView webView,
int errorCode,
String description,
String failingUrl,
)?
onReceivedError,
)? onReceivedError,
void Function(
android_webview.WebView webView,
android_webview.WebResourceRequest request,
)?
requestLoading,
)? requestLoading,
void Function(android_webview.WebView webView, String url)? urlLoading,
}) createAndroidWebViewClient;

Expand All @@ -87,8 +82,7 @@ class AndroidWebViewProxy {
String contentDisposition,
String mimetype,
int contentLength,
)
onDownloadStart,
) onDownloadStart,
}) createDownloadListener;

/// Enables debugging of web contents (HTML / CSS / JavaScript) loaded into any WebViews of this application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class AndroidWebViewControllerCreationParams
/// Creates a new [AndroidWebViewControllerCreationParams] instance.
AndroidWebViewControllerCreationParams({
@visibleForTesting this.androidWebViewProxy = const AndroidWebViewProxy(),
@visibleForTesting android_webview.WebStorage? androidWebStorage,
@visibleForTesting
android_webview.WebStorage? androidWebStorage,
}) : androidWebStorage =
androidWebStorage ?? android_webview.WebStorage.instance,
super();
Expand Down Expand Up @@ -576,7 +577,8 @@ class AndroidWebViewWidgetCreationParams
super.layoutDirection,
super.gestureRecognizers,
this.displayWithHybridComposition = false,
@visibleForTesting InstanceManager? instanceManager,
@visibleForTesting
InstanceManager? instanceManager,
@visibleForTesting
this.platformViewsServiceProxy = const PlatformViewsServiceProxy(),
}) : instanceManager =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ class WebViewAndroidWidget extends StatefulWidget {
required this.callbacksHandler,
required this.javascriptChannelRegistry,
required this.onBuildWidget,
@visibleForTesting this.webViewProxy = const WebViewProxy(),
@visibleForTesting
this.webViewProxy = const WebViewProxy(),
@visibleForTesting
this.flutterAssetManager = const android_webview.FlutterAssetManager(),
@visibleForTesting this.webStorage,
@visibleForTesting
this.webStorage,
});

/// Initial parameters used to setup the WebView.
Expand Down Expand Up @@ -87,10 +89,12 @@ class WebViewAndroidPlatformController extends WebViewPlatformController {
required CreationParams creationParams,
required this.callbacksHandler,
required this.javascriptChannelRegistry,
@visibleForTesting this.webViewProxy = const WebViewProxy(),
@visibleForTesting
this.webViewProxy = const WebViewProxy(),
@visibleForTesting
this.flutterAssetManager = const android_webview.FlutterAssetManager(),
@visibleForTesting android_webview.WebStorage? webStorage,
@visibleForTesting
android_webview.WebStorage? webStorage,
}) : webStorage = webStorage ?? android_webview.WebStorage.instance,
assert(creationParams.webSettings?.hasNavigationDelegate != null),
super(callbacksHandler) {
Expand Down Expand Up @@ -624,15 +628,13 @@ class WebViewProxy {
android_webview.WebView webView,
android_webview.WebResourceRequest request,
android_webview.WebResourceError error,
)?
onReceivedRequestError,
)? onReceivedRequestError,
void Function(
android_webview.WebView webView,
int errorCode,
String description,
String failingUrl,
)?
onReceivedError,
)? onReceivedError,
void Function(android_webview.WebView webView,
android_webview.WebResourceRequest request)?
requestLoading,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,13 @@ void main() {
Future<List<String>> Function(
android_webview.WebView webView,
android_webview.FileChooserParams params,
)?
onShowFileChooser,
)? onShowFileChooser,
Future<android_webview.GeoPermissionsHandleResultProxy> Function(
String origin,
)?
onGeolocationPermissionsShowPrompt,
)? onGeolocationPermissionsShowPrompt,
void Function(android_webview.WebChromeClient instance)?
onGeolocationPermissionsHidePrompt,
})?
createWebChromeClient,
})? createWebChromeClient,
android_webview.WebView? mockWebView,
android_webview.WebViewClient? mockWebViewClient,
android_webview.WebStorage? mockWebStorage,
Expand All @@ -86,8 +83,7 @@ void main() {
Future<List<String>> Function(
android_webview.WebView webView,
android_webview.FileChooserParams params,
)?
onShowFileChooser,
)? onShowFileChooser,
Future<
android_webview
.GeoPermissionsHandleResultProxy>
Expand All @@ -109,19 +105,16 @@ void main() {
int errorCode,
String description,
String failingUrl,
)?
onReceivedError,
)? onReceivedError,
void Function(
android_webview.WebView webView,
android_webview.WebResourceRequest request,
android_webview.WebResourceError error,
)?
onReceivedRequestError,
)? onReceivedRequestError,
void Function(
android_webview.WebView webView,
android_webview.WebResourceRequest request,
)?
requestLoading,
)? requestLoading,
void Function(android_webview.WebView webView, String url)?
urlLoading,
}) =>
Expand Down Expand Up @@ -582,11 +575,9 @@ void main() {
Future<List<String>> Function(
android_webview.WebView webView,
android_webview.FileChooserParams params,
)?
onShowFileChooser,
)? onShowFileChooser,
Future<android_webview.GeoPermissionsHandleResultProxy> Function(
String origin)?
onGeolocationPermissionsShowPrompt,
String origin)? onGeolocationPermissionsShowPrompt,
void Function(android_webview.WebChromeClient instance)?
onGeolocationPermissionsHidePrompt,
}) {
Expand Down Expand Up @@ -633,12 +624,10 @@ void main() {
Future<List<String>> Function(
android_webview.WebView webView,
android_webview.FileChooserParams params,
)?
onShowFileChooser,
)? onShowFileChooser,
Future<android_webview.GeoPermissionsHandleResultProxy> Function(
String origin,
)?
onGeolocationPermissionsShowPrompt,
)? onGeolocationPermissionsShowPrompt,
void Function(android_webview.WebChromeClient instance)?
onGeolocationPermissionsHidePrompt,
}) {
Expand Down Expand Up @@ -673,12 +662,10 @@ void main() {
Future<List<String>> Function(
android_webview.WebView webView,
android_webview.FileChooserParams params,
)?
onShowFileChooser,
)? onShowFileChooser,
Future<android_webview.GeoPermissionsHandleResultProxy> Function(
String origin,
)?
onGeolocationPermissionsShowPrompt,
)? onGeolocationPermissionsShowPrompt,
void Function(android_webview.WebChromeClient instance)?
onGeolocationPermissionsHidePrompt,
}) {
Expand Down