chore: bump chromium to 108.0.5329.0 (main) (#35628)
Co-authored-by: Samuel Attard <sattard@salesforce.com> Co-authored-by: VerteDinde <vertedinde@electronjs.org> Co-authored-by: Keeley Hammond <khammond@slack-corp.com> Co-authored-by: Jeremy Rose <jeremya@chromium.org>
This commit is contained in:
parent
94955a7999
commit
16f459228b
178 changed files with 1000 additions and 936 deletions
|
@ -33,7 +33,7 @@ namespace extensions {
|
|||
|
||||
namespace {
|
||||
|
||||
void AddStringsForPdf(base::DictionaryValue* dict) {
|
||||
void AddStringsForPdf(base::Value::Dict* dict) {
|
||||
#if BUILDFLAG(ENABLE_PDF)
|
||||
static constexpr webui::LocalizedString kPdfResources[] = {
|
||||
{"passwordDialogTitle", IDS_PDF_PASSWORD_DIALOG_TITLE},
|
||||
|
@ -55,16 +55,16 @@ void AddStringsForPdf(base::DictionaryValue* dict) {
|
|||
{"tooltipZoomOut", IDS_PDF_TOOLTIP_ZOOM_OUT},
|
||||
};
|
||||
for (const auto& resource : kPdfResources)
|
||||
dict->SetString(resource.name, l10n_util::GetStringUTF16(resource.id));
|
||||
dict->Set(resource.name, l10n_util::GetStringUTF16(resource.id));
|
||||
|
||||
dict->SetString("presetZoomFactors", zoom::GetPresetZoomFactorsAsJSON());
|
||||
dict->Set("presetZoomFactors", zoom::GetPresetZoomFactorsAsJSON());
|
||||
#endif // BUILDFLAG(ENABLE_PDF)
|
||||
}
|
||||
|
||||
void AddAdditionalDataForPdf(base::DictionaryValue* dict) {
|
||||
void AddAdditionalDataForPdf(base::Value::Dict* dict) {
|
||||
#if BUILDFLAG(ENABLE_PDF)
|
||||
dict->SetKey("pdfAnnotationsEnabled", base::Value(false));
|
||||
dict->SetKey("printingEnabled", base::Value(true));
|
||||
dict->Set("pdfAnnotationsEnabled", base::Value(false));
|
||||
dict->Set("printingEnabled", base::Value(true));
|
||||
#endif // BUILDFLAG(ENABLE_PDF)
|
||||
}
|
||||
|
||||
|
@ -81,14 +81,14 @@ ResourcesPrivateGetStringsFunction::~ResourcesPrivateGetStringsFunction() =
|
|||
ExtensionFunction::ResponseAction ResourcesPrivateGetStringsFunction::Run() {
|
||||
std::unique_ptr<get_strings::Params> params(
|
||||
get_strings::Params::Create(args()));
|
||||
auto dict = std::make_unique<base::DictionaryValue>();
|
||||
base::Value::Dict dict;
|
||||
|
||||
api::resources_private::Component component = params->component;
|
||||
|
||||
switch (component) {
|
||||
case api::resources_private::COMPONENT_PDF:
|
||||
AddStringsForPdf(dict.get());
|
||||
AddAdditionalDataForPdf(dict.get());
|
||||
AddStringsForPdf(&dict);
|
||||
AddAdditionalDataForPdf(&dict);
|
||||
break;
|
||||
case api::resources_private::COMPONENT_IDENTITY:
|
||||
NOTREACHED();
|
||||
|
@ -99,10 +99,9 @@ ExtensionFunction::ResponseAction ResourcesPrivateGetStringsFunction::Run() {
|
|||
}
|
||||
|
||||
const std::string& app_locale = g_browser_process->GetApplicationLocale();
|
||||
webui::SetLoadTimeDataDefaults(app_locale, dict.get());
|
||||
webui::SetLoadTimeDataDefaults(app_locale, &dict);
|
||||
|
||||
return RespondNow(
|
||||
OneArgument(base::Value::FromUniquePtrValue(std::move(dict))));
|
||||
return RespondNow(WithArguments(std::move(dict)));
|
||||
}
|
||||
|
||||
} // namespace extensions
|
||||
|
|
|
@ -188,8 +188,7 @@ ExtensionFunction::ResponseAction TabsReloadFunction::Run() {
|
|||
EXTENSION_FUNCTION_VALIDATE(params.get());
|
||||
|
||||
bool bypass_cache = false;
|
||||
if (params->reload_properties.get() &&
|
||||
params->reload_properties->bypass_cache) {
|
||||
if (params->reload_properties && params->reload_properties->bypass_cache) {
|
||||
bypass_cache = *params->reload_properties->bypass_cache;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,13 +33,13 @@ ElectronComponentExtensionResourceManager::
|
|||
AddComponentResourceEntries(kPdfResources, kPdfResourcesSize);
|
||||
|
||||
// Register strings for the PDF viewer, so that $i18n{} replacements work.
|
||||
base::Value pdf_strings(base::Value::Type::DICTIONARY);
|
||||
base::Value::Dict pdf_strings;
|
||||
pdf_extension_util::AddStrings(
|
||||
pdf_extension_util::PdfViewerContext::kPdfViewer, &pdf_strings);
|
||||
pdf_extension_util::AddAdditionalData(true, &pdf_strings);
|
||||
|
||||
ui::TemplateReplacements pdf_viewer_replacements;
|
||||
ui::TemplateReplacementsFromDictionaryValue(pdf_strings.GetDict(),
|
||||
ui::TemplateReplacementsFromDictionaryValue(pdf_strings,
|
||||
&pdf_viewer_replacements);
|
||||
extension_template_replacements_[extension_misc::kPdfExtensionId] =
|
||||
std::move(pdf_viewer_replacements);
|
||||
|
|
|
@ -120,6 +120,29 @@ BrowserContext* ElectronExtensionsBrowserClient::GetOriginalContext(
|
|||
}
|
||||
}
|
||||
|
||||
content::BrowserContext*
|
||||
ElectronExtensionsBrowserClient::GetRedirectedContextInIncognito(
|
||||
content::BrowserContext* context,
|
||||
bool force_guest_profile,
|
||||
bool force_system_profile) {
|
||||
return GetOriginalContext(context);
|
||||
}
|
||||
|
||||
content::BrowserContext*
|
||||
ElectronExtensionsBrowserClient::GetContextForRegularAndIncognito(
|
||||
content::BrowserContext* context,
|
||||
bool force_guest_profile,
|
||||
bool force_system_profile) {
|
||||
return context;
|
||||
}
|
||||
|
||||
content::BrowserContext* ElectronExtensionsBrowserClient::GetRegularProfile(
|
||||
content::BrowserContext* context,
|
||||
bool force_guest_profile,
|
||||
bool force_system_profile) {
|
||||
return context->IsOffTheRecord() ? nullptr : context;
|
||||
}
|
||||
|
||||
bool ElectronExtensionsBrowserClient::IsGuestSession(
|
||||
BrowserContext* context) const {
|
||||
return false;
|
||||
|
|
|
@ -56,6 +56,18 @@ class ElectronExtensionsBrowserClient
|
|||
content::BrowserContext* context) override;
|
||||
content::BrowserContext* GetOriginalContext(
|
||||
content::BrowserContext* context) override;
|
||||
content::BrowserContext* GetRedirectedContextInIncognito(
|
||||
content::BrowserContext* context,
|
||||
bool force_guest_profile,
|
||||
bool force_system_profile) override;
|
||||
content::BrowserContext* GetContextForRegularAndIncognito(
|
||||
content::BrowserContext* context,
|
||||
bool force_guest_profile,
|
||||
bool force_system_profile) override;
|
||||
content::BrowserContext* GetRegularProfile(
|
||||
content::BrowserContext* context,
|
||||
bool force_guest_profile,
|
||||
bool force_system_profile) override;
|
||||
bool IsGuestSession(content::BrowserContext* context) const override;
|
||||
bool IsExtensionIncognitoEnabled(
|
||||
const std::string& extension_id,
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include "base/callback.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/values.h"
|
||||
#include "build/build_config.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "content/public/browser/browser_context.h"
|
||||
|
@ -50,7 +51,7 @@ absl::optional<base::Value::Dict> ElectronMessagingDelegate::MaybeGetTabInfo(
|
|||
tab.url = api_contents->GetURL().spec();
|
||||
tab.title = base::UTF16ToUTF8(api_contents->GetTitle());
|
||||
tab.audible = api_contents->IsCurrentlyAudible();
|
||||
return std::move(tab.ToValue()->GetDict());
|
||||
return tab.ToValue();
|
||||
}
|
||||
}
|
||||
return absl::nullopt;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue