Skip to content

[webview_flutter_android] Add additional WebSettings methods #8270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

westracer
Copy link
Contributor

@westracer westracer commented Dec 11, 2024

Exposes native WebSettings such as setAllowContentAccess and setGeolocationEnabled in order to give developers more options to configure the native webview and restrict these features that are enabled by default.

Fixes 160070

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

… setAllowContentAccess, setGeolocationEnabled, setCacheMode
Copy link

google-cla bot commented Dec 11, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@camsim99 camsim99 requested a review from a team December 17, 2024 18:51
Copy link
Contributor

@bparrishMines bparrishMines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I stated in flutter/flutter#160070, I think this PR should remove support for setCacheMode in favor of a platform interface method. The implementation of the other methods look fine to me.

@westracer
Copy link
Contributor Author

@bparrishMines I've removed the setCacheMode method and I'm going to create another issue/PR for a platform interface cache behaviour method

Copy link
Contributor

@bparrishMines bparrishMines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bparrishMines bparrishMines added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 8, 2025
Copy link
Contributor

auto-submit bot commented Jan 8, 2025

auto label is removed for flutter/packages/8270, due to This PR has not met approval requirements for merging. The PR author is not a member of flutter-hackers and needs 1 more review(s) in order to merge this PR.

  • Merge guidelines: A PR needs at least one approved review if the author is already part of flutter-hackers or two member reviews if the author is not a flutter-hacker before re-applying the autosubmit label. Reviewers: If you left a comment approving, please use the "approve" review action instead.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jan 8, 2025
@bparrishMines
Copy link
Contributor

@stuartmorgan or @flutter/android-reviewers For secondary review.

@westracer Updates to the iOS implementation is still waiting on #8311 to land, so I would hold off on the iOS side of setCacheMode until it has.

Co-authored-by: Maurice Parrish <[email protected]>
Copy link
Contributor

@camsim99 camsim99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

@stuartmorgan-g stuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 13, 2025
@auto-submit auto-submit bot merged commit 1182ca9 into flutter:main Jan 13, 2025
77 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 14, 2025
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Jan 14, 2025
flutter/packages@3c3bc68...d1fd623

2025-01-13 [email protected] [camera] Add API support query for
image streaming (flutter/packages#8250)
2025-01-13 [email protected] [webview_flutter_android] Add additional
WebSettings methods (flutter/packages#8270)
2025-01-13 [email protected] Roll Flutter from
864d4f5 to 72db8f6 (11 revisions) (flutter/packages#8421)
2025-01-13 [email protected]
[video_player_avfoundation, camera_avfoundation] never overwrite but
only upgrade audio session category (flutter/packages#7143)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
maheshj01 pushed a commit to maheshj01/flutter that referenced this pull request Jan 15, 2025
…r#161597)

flutter/packages@3c3bc68...d1fd623

2025-01-13 [email protected] [camera] Add API support query for
image streaming (flutter/packages#8250)
2025-01-13 [email protected] [webview_flutter_android] Add additional
WebSettings methods (flutter/packages#8270)
2025-01-13 [email protected] Roll Flutter from
864d4f5 to 72db8f6 (11 revisions) (flutter/packages#8421)
2025-01-13 [email protected]
[video_player_avfoundation, camera_avfoundation] never overwrite but
only upgrade audio session category (flutter/packages#7143)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@nasirky nasirky deleted the webview_android_websettings_methods branch March 6, 2025 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App p: webview_flutter platform-android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[webview_flutter_android] Expose WebSettings methods setAllowContentAccess, setGeolocationEnabled
4 participants