chore: bump chromium to 93.0.4530.0 (master) (#29256)

* chore: bump chromium in DEPS to 92.0.4512.6

* 2887336: [CaptureHandle][#2] Propagate CaptureHandleConfig in browser process

2887336

* refactor: base::Optional -> absl::optional

* chore: fixup patch indices

* chore: bump chromium in DEPS to 92.0.4514.0

* 2899417: Make build work when enable_pdf is set to false.

2899417

* 2904731: use BrowserContext instead of Profile in PreconnectManager

2904731

* 2295749: fix: check IsSecureEventInputEnabled in constructor before setting SetPasswordInputEnabled to true

2295749

* 2893803: Add a GetWebView to RenderFrame.

2893803

* 2892345: Implement WebContents::ForEachRenderFrameHost

2892345

* chore: fixup patch indices

* 2892048: Real instance methods for BrowserContext: remaining 5 methods.

2892048

* 2902821: [mojo] Don't require full header includes for referenced interfaces

2902821

* 2496500: Remove last deprecated extension Event ctor.

2496500

* chore: fixup malformed pepper support patch

* chore: bump chromium in DEPS to 92.0.4515.0

* 2908461: Add CreateEmptyPrintPagesParamsPtr() inside print_view_manager_base.cc.

2908461

* 2880838: viz: add optional HDRMetadata to TransferableResource

2880838

* chore: fixup patch indices

* chore: bump chromium in DEPS to 92.0.4515.5

* chore: update patches

* chore: bump chromium in DEPS to 92.0.4515.7

* chore: bump chromium in DEPS to 92.0.4515.9

* chore: bump chromium in DEPS to 93.0.4522.0

* chore: bump chromium in DEPS to 93.0.4523.0

* chore: bump chromium in DEPS to 93.0.4524.0

* chore: update patches

* chore: enable_pak_file_integrity_checks was reverted

* chore: update patches

* refactor: base/optional was replaced with absl::optional

Refs: 2910202

* refactor: replace all usages of base::nullopt with absl::nullopt

Refs: 2910202

* chore: add missing base::Contains include

Refs: 2910202

* refactor: replace all usages of base::make_optional with
absl::make_optional

Refs: 2910202

* refactor: replace WorldScriptContext() with GetScriptContextFromWorldId

Refs: 2893213

* chore: clean up left over opening namespace

Refs: 95bfe6d08f

* chore: add missing base::Contains include

Refs: 2910202

* refactor: replace GetCurrentDisplayIterator with the hard checker
GetCurrentDisplay

This code looks suspicious but if the iterator was invalid before it
will also be invalid now.

Refs: 2893191

* refactor: headers are now passed directly in extensions client

Refs: 2918906

* refactor: base::DictionaryValue::empty() has been removed

Refs: 2912424

* chore: add missing includes for network URLLoaderFactory

Refs: unknown, probably a side effect of header changes

* refactor: make convenience wrapper around AppendArg

There is no converter FromV8 for base::StringPiece (apparently its not
possible).  So we now take in an std::string and use the construct for
StringPiece to do implicit conversion.

Refs: 2905544

* chore: add patch

* chore: bump chromium in DEPS to 93.0.4525.0

* chore: update patches

* refactor: CanResize has been de-virtualized

Refs: 2485774

* chore: update resource integrity patch

* chore: add character encoding idl patch

* chore: bump chromium in DEPS to 93.0.4526.0

* chore: update patches

* chore: bump chromium in DEPS to 93.0.4527.0

* chore: bump chromium in DEPS to 93.0.4528.0

* chore: update patches

* chore: update idl encoding patch

* chore: bump chromium in DEPS to 93.0.4529.0

* chore: update patches

* chore: bump chromium in DEPS to 93.0.4530.0

* chore: update patches

* fix: only SetCanResize after the widget has been initialized

* chore: add patch for vr on windows gn gen

* spec: fix focus related tests on linux due to delay in focus swap

* chore: remove new usages of base::Optional from main

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <sattard@slack-corp.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
This commit is contained in:
electron-roller[bot] 2021-06-03 01:05:04 -07:00 committed by GitHub
parent 8d0ed05c99
commit 8532e1239e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
165 changed files with 720 additions and 1048 deletions

View file

@ -181,12 +181,12 @@ void Clipboard::WriteBookmark(const std::u16string& title,
gfx::Image Clipboard::ReadImage(gin_helper::Arguments* args) {
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
base::Optional<gfx::Image> image;
absl::optional<gfx::Image> image;
clipboard->ReadImage(
GetClipboardBuffer(args),
/* data_dst = */ nullptr,
base::BindOnce(
[](base::Optional<gfx::Image>* image, const SkBitmap& result) {
[](absl::optional<gfx::Image>* image, const SkBitmap& result) {
image->emplace(gfx::Image::CreateFrom1xBitmap(result));
},
&image));

View file

@ -6,6 +6,7 @@
#include "base/files/file_path.h"
#include "base/strings/string_util.h"
#include "services/network/public/cpp/network_switches.h"
#include "shell/common/gin_converters/base_converter.h"
#include "shell/common/gin_converters/file_path_converter.h"
#include "shell/common/gin_helper/dictionary.h"
#include "shell/common/node_includes.h"
@ -41,18 +42,21 @@ void AppendSwitch(const std::string& switch_string,
command_line->AppendSwitch(switch_string);
}
void AppendArg(const std::string& arg) {
auto* command_line = base::CommandLine::ForCurrentProcess();
command_line->AppendArg(arg);
}
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
auto* command_line = base::CommandLine::ForCurrentProcess();
gin_helper::Dictionary dict(context->GetIsolate(), exports);
dict.SetMethod("hasSwitch", &HasSwitch);
dict.SetMethod("getSwitchValue", &GetSwitchValue);
dict.SetMethod("appendSwitch", &AppendSwitch);
dict.SetMethod("appendArgument",
base::BindRepeating(&base::CommandLine::AppendArg,
base::Unretained(command_line)));
dict.SetMethod("appendArgument", &AppendArg);
}
} // namespace

View file

@ -305,7 +305,7 @@ bool NativeImage::IsEmpty() {
return image_.IsEmpty();
}
gfx::Size NativeImage::GetSize(const base::Optional<float> scale_factor) {
gfx::Size NativeImage::GetSize(const absl::optional<float> scale_factor) {
float sf = scale_factor.value_or(1.0f);
gfx::ImageSkiaRep image_rep = image_.AsImageSkia().GetRepresentation(sf);
@ -321,7 +321,7 @@ std::vector<float> NativeImage::GetScaleFactors() {
return scale_factors;
}
float NativeImage::GetAspectRatio(const base::Optional<float> scale_factor) {
float NativeImage::GetAspectRatio(const absl::optional<float> scale_factor) {
float sf = scale_factor.value_or(1.0f);
gfx::Size size = GetSize(sf);
if (size.IsEmpty())

View file

@ -114,8 +114,8 @@ class NativeImage : public gin::Wrappable<NativeImage> {
gin::Handle<NativeImage> Crop(v8::Isolate* isolate, const gfx::Rect& rect);
std::string ToDataURL(gin::Arguments* args);
bool IsEmpty();
gfx::Size GetSize(const base::Optional<float> scale_factor);
float GetAspectRatio(const base::Optional<float> scale_factor);
gfx::Size GetSize(const absl::optional<float> scale_factor);
float GetAspectRatio(const absl::optional<float> scale_factor);
void AddRepresentation(const gin_helper::Dictionary& options);
void AdjustAmountOfExternalAllocatedMemory(bool add);

View file

@ -186,7 +186,7 @@ bool Archive::Init() {
return false;
}
base::Optional<base::Value> value = base::JSONReader::Read(header);
absl::optional<base::Value> value = base::JSONReader::Read(header);
if (!value || !value->is_dict()) {
LOG(ERROR) << "Failed to parse header";
return false;

View file

@ -186,7 +186,7 @@ bool Converter<blink::WebKeyboardEvent>::FromV8(v8::Isolate* isolate,
if (!dict.Get("keyCode", &str))
return false;
base::Optional<char16_t> shifted_char;
absl::optional<char16_t> shifted_char;
ui::KeyboardCode keyCode = electron::KeyboardCodeFromStr(str, &shifted_char);
out->windows_key_code = keyCode;
if (shifted_char)

View file

@ -8,10 +8,10 @@
#include <type_traits>
#include <utility>
#include "base/optional.h"
#include "gin/dictionary.h"
#include "shell/common/gin_converters/std_converter.h"
#include "shell/common/gin_helper/function_template.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
namespace gin_helper {
@ -61,9 +61,9 @@ class Dictionary : public gin::Dictionary {
return !result.IsNothing() && result.FromJust();
}
// Like normal Get but put result in an base::Optional.
// Like normal Get but put result in an absl::optional.
template <typename T>
bool GetOptional(base::StringPiece key, base::Optional<T>* out) const {
bool GetOptional(base::StringPiece key, absl::optional<T>* out) const {
T ret;
if (Get(key, &ret)) {
out->emplace(std::move(ret));

View file

@ -9,12 +9,12 @@
#include "base/bind.h"
#include "base/callback.h"
#include "base/optional.h"
#include "gin/arguments.h"
#include "shell/common/gin_helper/arguments.h"
#include "shell/common/gin_helper/destroyable.h"
#include "shell/common/gin_helper/error_thrower.h"
#include "shell/common/gin_helper/microtasks_scope.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
// This file is forked from gin/function_template.h with 2 differences:
// 1. Support for additional types of arguments.
@ -95,13 +95,13 @@ bool GetNextArgument(gin::Arguments* args,
}
}
// Support base::Optional as output, which would be empty and do not throw error
// Support absl::optional as output, which would be empty and do not throw error
// when conversion to T fails.
template <typename T>
bool GetNextArgument(gin::Arguments* args,
int create_flags,
bool is_first,
base::Optional<T>* result) {
absl::optional<T>* result) {
T converted;
// Use gin::Arguments::GetNext which always advances |next| counter.
if (args->GetNext(&converted))

View file

@ -16,12 +16,12 @@
// in the gin_helper namespace.
namespace gin {
// Support base::Optional as an argument.
// Support absl::optional as an argument.
template <typename T>
bool GetNextArgument(Arguments* args,
const InvokerOptions& invoker_options,
bool is_first,
base::Optional<T>* result) {
absl::optional<T>* result) {
T converted;
// Use gin::Arguments::GetNext which always advances |next| counter.
if (args->GetNext(&converted))

View file

@ -17,7 +17,7 @@ namespace {
// Return key code represented by |str|.
ui::KeyboardCode KeyboardCodeFromKeyIdentifier(
const std::string& s,
base::Optional<char16_t>* shifted_char) {
absl::optional<char16_t>* shifted_char) {
std::string str = base::ToLowerASCII(s);
if (str == "ctrl" || str == "control") {
return ui::VKEY_CONTROL;
@ -321,7 +321,7 @@ ui::KeyboardCode KeyboardCodeFromCharCode(char16_t c, bool* shifted) {
}
ui::KeyboardCode KeyboardCodeFromStr(const std::string& str,
base::Optional<char16_t>* shifted_char) {
absl::optional<char16_t>* shifted_char) {
if (str.size() == 1) {
bool shifted = false;
auto ret = KeyboardCodeFromCharCode(str[0], &shifted);

View file

@ -7,7 +7,7 @@
#include <string>
#include "base/optional.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "ui/events/keycodes/keyboard_codes.h"
namespace electron {
@ -20,7 +20,7 @@ ui::KeyboardCode KeyboardCodeFromCharCode(char16_t c, bool* shifted);
// for example + and /, set it in |shifted_char|.
// pressed.
ui::KeyboardCode KeyboardCodeFromStr(const std::string& str,
base::Optional<char16_t>* shifted_char);
absl::optional<char16_t>* shifted_char);
} // namespace electron