![electron-roller[bot]](/assets/img/avatar_default.png)
* chore: bump chromium in DEPS to 133.0.6902.0 * chore: bump chromium in DEPS to 133.0.6903.0 * chore: update patches * Update PdfViewer Save File Picker to use showSaveFilePicker. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6074308 * Code Health: Clean up stale MacWebContentsOcclusion Refs https://chromium-review.googlesource.com/c/chromium/src/+/6078344 * Change RenderProcessHost::GetID to RenderProcessHost::GetDeprecatedID Refs https://chromium-review.googlesource.com/c/chromium/src/+/6065543 * [WebRTC] Make WebRTC IP Handling policy a mojo enum Refs https://chromium-review.googlesource.com/c/chromium/src/+/6063620 * chore: gen filenames.libcxx.gni * Remove allow_unsafe_buffers pragma in //printing Refs https://chromium-review.googlesource.com/c/chromium/src/+/6092280 * refactor: to use ChildProcessId where possible Refs https://issues.chromium.org/issues/379869738 * [Win] Update TabletMode detection code Refs https://chromium-review.googlesource.com/c/chromium/src/+/6003486 * chore: bump chromium in DEPS to 133.0.6905.0 * chore: update patches * Reland "Move global shortcut listener to //ui/base" Refs https://chromium-review.googlesource.com/c/chromium/src/+/6099035 * [shared storage] Implement the batch `with_lock` option for response header Refs https://chromium-review.googlesource.com/c/chromium/src/+/6072742 * chore: bump chromium in DEPS to 133.0.6907.0 * chore: bump chromium in DEPS to 133.0.6909.0 * chore: bump chromium in DEPS to 133.0.6911.0 * chore: bump chromium in DEPS to 133.0.6912.0 * chore: update patches * WebUI: Reveal hidden deps to ui/webui/resources. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6096291 * chore: bump chromium in DEPS to 133.0.6913.0 * chore: bump chromium in DEPS to 133.0.6915.0 * Code Health: Clean up stale base::Feature "AccessibilityTreeForViews" Refs https://chromium-review.googlesource.com/c/chromium/src/+/6104174 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * fix: remove fastapitypedarray usage * chore: update patches * chore: script/gen-libc++-filenames.js * Code Health: Clean up stale base::Feature "WinRetrieveSuggestionsOnlyOnDemand" Refs https://chromium-review.googlesource.com/c/chromium/src/+/6109477 * fix: empty suggestions with windows platform checker Amends the fix from https://github.com/electron/electron/pull/29690 since the feature flag is no longer available. We follow the same pattern as //chrome/browser/renderer_context_menu/spelling_menu_observer.cc to generate the suggestion list on demand when context menu action is invoked. Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * fixup! fix: empty suggestions with windows platform checker * fixup! fix: empty suggestions with windows platform checker * revert: 6078344: Code Health: Clean up stale MacWebContentsOcclusion | https://chromium-review.googlesource.com/c/chromium/src/+/6078344 * Revert "revert: 6078344: Code Health: Clean up stale MacWebContentsOcclusion | https://chromium-review.googlesource.com/c/chromium/src/+/6078344" This reverts commit 9cacda452ed5a072351e8f5a35b009d91843a08c. * chore: bump to 133.0.6920.0, update patches * Revert "6078344: Code Health: Clean up stale MacWebContentsOcclusion" Refs: https://chromium-review.googlesource.com/c/chromium/src/+/6078344 * fixup! Update PdfViewer Save File Picker to use showSaveFilePicker. --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
88 lines
2.9 KiB
C++
88 lines
2.9 KiB
C++
// Copyright (c) 2019 GitHub, Inc.
|
|
// Use of this source code is governed by the MIT license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#include "electron/shell/browser/feature_list.h"
|
|
|
|
#include <string>
|
|
|
|
#include "base/base_switches.h"
|
|
#include "base/command_line.h"
|
|
#include "base/feature_list.h"
|
|
#include "base/metrics/field_trial.h"
|
|
#include "components/spellcheck/common/spellcheck_features.h"
|
|
#include "content/public/common/content_features.h"
|
|
#include "electron/buildflags/buildflags.h"
|
|
#include "media/base/media_switches.h"
|
|
#include "net/base/features.h"
|
|
#include "services/network/public/cpp/features.h"
|
|
#include "third_party/blink/public/common/features.h"
|
|
|
|
#if BUILDFLAG(IS_MAC)
|
|
#include "device/base/features.h" // nogncheck
|
|
#endif
|
|
|
|
#if BUILDFLAG(ENABLE_PDF_VIEWER)
|
|
#include "pdf/pdf_features.h"
|
|
#endif
|
|
|
|
namespace electron {
|
|
|
|
void InitializeFeatureList() {
|
|
auto* cmd_line = base::CommandLine::ForCurrentProcess();
|
|
auto enable_features =
|
|
cmd_line->GetSwitchValueASCII(::switches::kEnableFeatures);
|
|
auto disable_features =
|
|
cmd_line->GetSwitchValueASCII(::switches::kDisableFeatures);
|
|
// Disable creation of spare renderer process with site-per-process mode,
|
|
// it interferes with our process preference tracking for non sandboxed mode.
|
|
// Can be reenabled when our site instance policy is aligned with chromium
|
|
// when node integration is enabled.
|
|
disable_features +=
|
|
std::string(",") + features::kSpareRendererForSitePerProcess.name;
|
|
|
|
#if BUILDFLAG(IS_WIN)
|
|
disable_features +=
|
|
// Delayed spellcheck initialization is causing the
|
|
// 'custom dictionary word list API' spec to crash.
|
|
std::string(",") + spellcheck::kWinDelaySpellcheckServiceInit.name;
|
|
#endif
|
|
|
|
#if BUILDFLAG(ENABLE_PDF_VIEWER)
|
|
// Enable window.showSaveFilePicker api for saving pdf files.
|
|
// Refs https://issues.chromium.org/issues/373852607
|
|
enable_features +=
|
|
std::string(",") + chrome_pdf::features::kPdfUseShowSaveFilePicker.name;
|
|
#endif
|
|
|
|
std::string platform_specific_enable_features =
|
|
EnablePlatformSpecificFeatures();
|
|
if (platform_specific_enable_features.size() > 0) {
|
|
enable_features += std::string(",") + platform_specific_enable_features;
|
|
}
|
|
std::string platform_specific_disable_features =
|
|
DisablePlatformSpecificFeatures();
|
|
if (platform_specific_disable_features.size() > 0) {
|
|
disable_features += std::string(",") + platform_specific_disable_features;
|
|
}
|
|
base::FeatureList::InitInstance(enable_features, disable_features);
|
|
}
|
|
|
|
void InitializeFieldTrials() {
|
|
auto* cmd_line = base::CommandLine::ForCurrentProcess();
|
|
auto force_fieldtrials =
|
|
cmd_line->GetSwitchValueASCII(::switches::kForceFieldTrials);
|
|
|
|
base::FieldTrialList::CreateTrialsFromString(force_fieldtrials);
|
|
}
|
|
|
|
#if !BUILDFLAG(IS_MAC)
|
|
std::string EnablePlatformSpecificFeatures() {
|
|
return "";
|
|
}
|
|
std::string DisablePlatformSpecificFeatures() {
|
|
return "";
|
|
}
|
|
#endif
|
|
|
|
} // namespace electron
|