Skip to content

[webview_flutter_android] Add additional WebSettings methods - #8270

Merged
auto-submit[bot] merged 7 commits into
flutter:mainfrom
QuickBirdEng:webview_android_websettings_methods
Jan 13, 2025
Merged

[webview_flutter_android] Add additional WebSettings methods#8270
auto-submit[bot] merged 7 commits into
flutter:mainfrom
QuickBirdEng:webview_android_websettings_methods

Conversation

@westracer

@westracerwestracer commented Dec 11, 2024

Copy link
Copy Markdown
Contributor

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.

Fixes160070

Pre-launch Checklist

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

… setAllowContentAccess, setGeolocationEnabled, setCacheMode
@google-cla

Copy link
Copy Markdown

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 teamDecember 17, 2024 18:51

@bparrishMinesbparrishMines left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

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

@bparrishMinesbparrishMines left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@bparrishMinesbparrishMines added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 8, 2025
@auto-submit

Copy link
Copy Markdown
Contributor

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-submitauto-submitBot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jan 8, 2025
@bparrishMines

Copy link
Copy Markdown
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.

Comment threadpackages/webview_flutter/webview_flutter_android/CHANGELOG.md Outdated
Co-authored-by: Maurice Parrish <10687576+bparrishMines@users.noreply.github.com>

@camsim99camsim99 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM :)

@stuartmorgan-gstuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 13, 2025
@auto-submit
auto-submitBot merged commit 1182ca9 into flutter:mainJan 13, 2025
github-merge-queueBot pushed a commit to flutter/flutter that referenced this pull request Jan 14, 2025
flutter/packages@3c3bc68...d1fd623
2025-01-13 olli.helenius@codemate.com [camera] Add API support query for
image streaming (flutter/packages#8250)
2025-01-13 westracer1@gmail.com [webview_flutter_android] Add additional
WebSettings methods (flutter/packages#8270)
2025-01-13 engine-flutter-autoroll@skia.org Roll Flutter from
864d4f5 to 72db8f6 (11 revisions) (flutter/packages#8421)
2025-01-13 30872003+misos1@users.noreply.github.com
[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 flutter-ecosystem@google.com 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
flutter/packages@3c3bc68...d1fd623
2025-01-13 olli.helenius@codemate.com [camera] Add API support query for
image streaming (flutter/packages#8250)
2025-01-13 westracer1@gmail.com [webview_flutter_android] Add additional
WebSettings methods (flutter/packages#8270)
2025-01-13 engine-flutter-autoroll@skia.org Roll Flutter from
864d4f5 to 72db8f6 (11 revisions) (flutter/packages#8421)
2025-01-13 30872003+misos1@users.noreply.github.com
[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 flutter-ecosystem@google.com 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
androidseb pushed a commit to androidseb/packages that referenced this pull request Jun 8, 2025
…#8270)
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](flutter/flutter#160070)
FMorschel pushed a commit to FMorschel/packages that referenced this pull request Jun 9, 2025
…#8270)
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](flutter/flutter#160070)
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
…#8270)
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](flutter/flutter#160070)
bisor0627 pushed a commit to bisor0627/packages that referenced this pull request Jun 19, 2026
…#8270)
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](flutter/flutter#160070)
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmitMerge PR when tree becomes green via auto submit Appp: webview_flutterplatform-android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[webview_flutter_android] Expose WebSettings methods setAllowContentAccess, setGeolocationEnabled

4 participants

@westracer@bparrishMines@camsim99@stuartmorgan-g