feat: add support for WebUSB (#36289)

* feat: add support for WebUSB

* fixup for gn check

* fixup gn check on Windows

* Apply review feedback

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* chore: address review feedback

* chore: removed unneeded code

* Migrate non-default ScopedObservation<> instantiations to ScopedObservationTraits<> in chrome/browser/

4016595

Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
John Kleinschmidt 2022-11-22 16:50:32 -05:00 committed by GitHub
parent 2751c2b07f
commit 629c54ba36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 1772 additions and 23 deletions

View file

@ -17,6 +17,10 @@
#include "net/base/features.h"
#include "services/network/public/cpp/features.h"
#if BUILDFLAG(IS_MAC)
#include "device/base/features.h" // nogncheck
#endif
namespace electron {
void InitializeFeatureList() {
@ -32,6 +36,11 @@ void InitializeFeatureList() {
disable_features +=
std::string(",") + features::kSpareRendererForSitePerProcess.name;
#if BUILDFLAG(IS_MAC)
// Needed for WebUSB implementation
enable_features += std::string(",") + device::kNewUsbBackend.name;
#endif
#if !BUILDFLAG(ENABLE_PICTURE_IN_PICTURE)
disable_features += std::string(",") + media::kPictureInPicture.name;
#endif