
It is strange shouldUsePhotoPicker() checks whether this is a image capture, but doesn't do the same for video capture. This causes an issue that when selectFile() is called, it will skip all the permission checks and go directly to call launchSelectedFileIntent(). And launchSelectFileIntent() only invokes camera Intent if Chrome has camera permission. This CL will disable photopicker if the file selection is video capture. So we will always go through permission check before calling launchSelectFileIntent(). Bug: 374606647 Change-Id: I39d382d611a256bd22fdbcb34548ff338702617e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5963378 Reviewed-by: Ted Choc <tedchoc@chromium.org> Commit-Queue: Min Qin <qinmin@chromium.org> Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/main@{#1374657}
This directory contains UI frameworks used to build various user interface features. This directory is not intended to contain UI features (such as a keyboard).