chore: bump chromium to 62327c655093c821aa0fcfc6db53f5fd943e08c7 (master) (#19792)

* chore: bump chromium in DEPS to f3bf493731e868e1f5f48e7e1adc02ea5eccfbbd

* chore: bump chromium in DEPS to 4db0c87d4aa6f27ffa0b5fc77d20e10047962484

* chore: bump chromium in DEPS to d933a504c264dc8fe85267f47aef3588531875b5

* chore: bump chromium in DEPS to 34afdb68980f581ae911b85b727bc17e126cf5f9

* update disable-redraw-lock.patch

1600387

* update desktop_media_list.patch

1729156

* update notification_provenance.patch

1742779

* update printing.patch

1646772

* update verbose_generate_bpad_syms.patch

1745986

* update patch metadata

* remove printing_compositor manifests

1742734

* update for URLLoaderFactoryType enum

1754716

* remove gin string16 converter

1750093

* ClearCompositorFrame() has been removed

1746301

* message_loop -> message_loop_current

1738552

* include resource_response header

* pdf compositor no longer uses service manager

1742734

* chore: bump chromium in DEPS to 00d5933101d8d8dc9546eadbe7ee1b41077e6db1

* pane focus fns aren't pure virtual anymore

1708767

* fix: make std::hash value-non-const

broken by 1711202

* update swiftshader in zip_manifests

https://swiftshader-review.googlesource.com/c/SwiftShader/+/34911

* address feedback from @deepak1556

* don't enable kLegacyWindowsDWriteFontFallback

1753006

* chore: bump chromium in DEPS to 84497314005e1968da06804f8fde539d9872310e

* update printing.patch

remove bottom diff owing to 1678182 and update for 1678182

* convert CookieChangeListener to new Mojo types

1753371

* rename ui::ClipboardType -> ui::ClipboardBuffer

1758730

* logging::LoggingSettings log_file -> log_file_path

1699477

* roll DEPS to latest lkgr

* fix: override GetFontLookupTableCacheDir()

When Chromium goes to use its fallback font table creation code paths,
it creates the cache directory it uses by calling
GetFontLookupTableCacheDir() with a path that doesn't exist in Electron.
To ensure that a legitimate file path is created, we need to override it
with Electron's DIR_USER_DATA so it doesn't use chrome::DIR_USER_DATA.

* chore: bump chromium in DEPS to 6758a0879931bc4df630a80a36c82d7855ae3155

* update pthread_fchdir patch

1759149

* update printing patch

* update cookie usage and fn signatures

1758437

* chore: bump chromium in DEPS to bdaca97e1cc27fb977e56f30f74cdb906da9527e

* remove fix_make_std_hash_value-non-const.patch

1762335

* Convert enum to enum class for FocusManager::FocusChangeReason

1767281

* roll DEPS to latest lkgr

* update dom_storage_limits.patch

1767556
This commit is contained in:
Electron Bot 2019-08-23 21:14:23 -04:00 committed by Robo
parent c89debd19a
commit b7d25ccb77
85 changed files with 314 additions and 444 deletions

View file

@ -18,19 +18,20 @@ namespace electron {
namespace api {
ui::ClipboardType Clipboard::GetClipboardType(mate::Arguments* args) {
ui::ClipboardBuffer Clipboard::GetClipboardBuffer(mate::Arguments* args) {
std::string type;
if (args->GetNext(&type) && type == "selection")
return ui::ClipboardType::kSelection;
return ui::ClipboardBuffer::kSelection;
else
return ui::ClipboardType::kCopyPaste;
return ui::ClipboardBuffer::kCopyPaste;
}
std::vector<base::string16> Clipboard::AvailableFormats(mate::Arguments* args) {
std::vector<base::string16> format_types;
bool ignore;
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
clipboard->ReadAvailableTypes(GetClipboardType(args), &format_types, &ignore);
clipboard->ReadAvailableTypes(GetClipboardBuffer(args), &format_types,
&ignore);
return format_types;
}
@ -38,7 +39,7 @@ bool Clipboard::Has(const std::string& format_string, mate::Arguments* args) {
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
ui::ClipboardFormatType format(
ui::ClipboardFormatType::GetType(format_string));
return clipboard->IsFormatAvailable(format, GetClipboardType(args));
return clipboard->IsFormatAvailable(format, GetClipboardBuffer(args));
}
std::string Clipboard::Read(const std::string& format_string) {
@ -66,14 +67,14 @@ void Clipboard::WriteBuffer(const std::string& format,
return;
}
ui::ScopedClipboardWriter writer(GetClipboardType(args));
ui::ScopedClipboardWriter writer(GetClipboardBuffer(args));
writer.WriteData(
ui::ClipboardFormatType::GetType(format).Serialize(),
std::string(node::Buffer::Data(buffer), node::Buffer::Length(buffer)));
}
void Clipboard::Write(const mate::Dictionary& data, mate::Arguments* args) {
ui::ScopedClipboardWriter writer(GetClipboardType(args));
ui::ScopedClipboardWriter writer(GetClipboardBuffer(args));
base::string16 text, html, bookmark;
gfx::Image image;
@ -99,7 +100,7 @@ void Clipboard::Write(const mate::Dictionary& data, mate::Arguments* args) {
base::string16 Clipboard::ReadText(mate::Arguments* args) {
base::string16 data;
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
auto type = GetClipboardType(args);
auto type = GetClipboardBuffer(args);
if (clipboard->IsFormatAvailable(ui::ClipboardFormatType::GetPlainTextWType(),
type)) {
clipboard->ReadText(type, &data);
@ -113,19 +114,19 @@ base::string16 Clipboard::ReadText(mate::Arguments* args) {
}
void Clipboard::WriteText(const base::string16& text, mate::Arguments* args) {
ui::ScopedClipboardWriter writer(GetClipboardType(args));
ui::ScopedClipboardWriter writer(GetClipboardBuffer(args));
writer.WriteText(text);
}
base::string16 Clipboard::ReadRTF(mate::Arguments* args) {
std::string data;
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
clipboard->ReadRTF(GetClipboardType(args), &data);
clipboard->ReadRTF(GetClipboardBuffer(args), &data);
return base::UTF8ToUTF16(data);
}
void Clipboard::WriteRTF(const std::string& text, mate::Arguments* args) {
ui::ScopedClipboardWriter writer(GetClipboardType(args));
ui::ScopedClipboardWriter writer(GetClipboardBuffer(args));
writer.WriteRTF(text);
}
@ -136,13 +137,13 @@ base::string16 Clipboard::ReadHTML(mate::Arguments* args) {
uint32_t start;
uint32_t end;
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
clipboard->ReadHTML(GetClipboardType(args), &html, &url, &start, &end);
clipboard->ReadHTML(GetClipboardBuffer(args), &html, &url, &start, &end);
data = html.substr(start, end - start);
return data;
}
void Clipboard::WriteHTML(const base::string16& html, mate::Arguments* args) {
ui::ScopedClipboardWriter writer(GetClipboardType(args));
ui::ScopedClipboardWriter writer(GetClipboardBuffer(args));
writer.WriteHTML(html, std::string());
}
@ -160,18 +161,18 @@ v8::Local<v8::Value> Clipboard::ReadBookmark(mate::Arguments* args) {
void Clipboard::WriteBookmark(const base::string16& title,
const std::string& url,
mate::Arguments* args) {
ui::ScopedClipboardWriter writer(GetClipboardType(args));
ui::ScopedClipboardWriter writer(GetClipboardBuffer(args));
writer.WriteBookmark(title, url);
}
gfx::Image Clipboard::ReadImage(mate::Arguments* args) {
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
SkBitmap bitmap = clipboard->ReadImage(GetClipboardType(args));
SkBitmap bitmap = clipboard->ReadImage(GetClipboardBuffer(args));
return gfx::Image::CreateFrom1xBitmap(bitmap);
}
void Clipboard::WriteImage(const gfx::Image& image, mate::Arguments* args) {
ui::ScopedClipboardWriter writer(GetClipboardType(args));
ui::ScopedClipboardWriter writer(GetClipboardBuffer(args));
SkBitmap orig = image.AsBitmap();
SkBitmap bmp;
@ -189,7 +190,7 @@ base::string16 Clipboard::ReadFindText() {
#endif
void Clipboard::Clear(mate::Arguments* args) {
ui::Clipboard::GetForCurrentThread()->Clear(GetClipboardType(args));
ui::Clipboard::GetForCurrentThread()->Clear(GetClipboardBuffer(args));
}
} // namespace api

View file

@ -19,7 +19,7 @@ namespace api {
class Clipboard {
public:
static ui::ClipboardType GetClipboardType(mate::Arguments* args);
static ui::ClipboardBuffer GetClipboardBuffer(mate::Arguments* args);
static std::vector<base::string16> AvailableFormats(mate::Arguments* args);
static bool Has(const std::string& format_string, mate::Arguments* args);
static void Clear(mate::Arguments* args);

View file

@ -62,13 +62,13 @@ int Main(std::vector<char*>* args) {
base::FilePath operating_dir(
cmd_line->GetSwitchValueNative(crash_reporter::kCrashesDirectoryKey));
CreateCrashServiceDirectory(operating_dir);
base::FilePath log_file = operating_dir.Append(kStandardLogFile);
base::FilePath log_file_path = operating_dir.Append(kStandardLogFile);
// Logging to stderr (to help with debugging failures on the
// buildbots) and to a file.
logging::LoggingSettings settings;
settings.logging_dest = logging::LOG_TO_ALL;
settings.log_file = log_file.value().c_str();
settings.log_file_path = log_file_path.value().c_str();
logging::InitLogging(settings);
// Logging with pid, tid and timestamp.
logging::SetLogItems(true, true, true, false);

View file

@ -6,10 +6,9 @@
#define SHELL_COMMON_GIN_CONVERTERS_FILE_PATH_CONVERTER_H_
#include "base/files/file_path.h"
#include "shell/common/gin_converters/string16_converter.h"
#include "gin/converter.h"
namespace gin {
template <>
struct Converter<base::FilePath> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
@ -22,6 +21,12 @@ struct Converter<base::FilePath> {
if (val->IsNull())
return true;
v8::String::Value str(isolate, val);
if (str.length() == 0) {
*out = base::FilePath();
return true;
}
base::FilePath::StringType path;
if (Converter<base::FilePath::StringType>::FromV8(isolate, val, &path)) {
*out = base::FilePath(path);

View file

@ -12,6 +12,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/values.h"
#include "gin/converter.h"
#include "gin/dictionary.h"
#include "net/base/upload_bytes_element_reader.h"
#include "net/base/upload_data_stream.h"
@ -23,7 +24,6 @@
#include "services/network/public/cpp/resource_request.h"
#include "shell/common/gin_converters/gurl_converter.h"
#include "shell/common/gin_converters/std_converter.h"
#include "shell/common/gin_converters/string16_converter.h"
#include "shell/common/gin_converters/value_converter_gin_adapter.h"
#include "shell/common/node_includes.h"

View file

@ -1,41 +0,0 @@
// Copyright (c) 2019 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef SHELL_COMMON_GIN_CONVERTERS_STRING16_CONVERTER_H_
#define SHELL_COMMON_GIN_CONVERTERS_STRING16_CONVERTER_H_
#include "base/strings/string16.h"
#include "gin/converter.h"
namespace gin {
template <>
struct Converter<base::string16> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const base::string16& val) {
return v8::String::NewFromTwoByte(
isolate, reinterpret_cast<const uint16_t*>(val.data()),
v8::NewStringType::kNormal, val.size())
.ToLocalChecked();
}
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
base::string16* out) {
if (!val->IsString())
return false;
v8::String::Value s(isolate, val);
out->assign(reinterpret_cast<const base::char16*>(*s), s.length());
return true;
}
};
inline v8::Local<v8::String> StringToV8(v8::Isolate* isolate,
const base::string16& input) {
return ConvertToV8(isolate, input).As<v8::String>();
}
} // namespace gin
#endif // SHELL_COMMON_GIN_CONVERTERS_STRING16_CONVERTER_H_

View file

@ -417,7 +417,7 @@ v8::Local<v8::Value> EditFlagsToV8(v8::Isolate* isolate, int editFlags) {
std::vector<base::string16> types;
bool ignore;
ui::Clipboard::GetForCurrentThread()->ReadAvailableTypes(
ui::ClipboardType::kCopyPaste, &types, &ignore);
ui::ClipboardBuffer::kCopyPaste, &types, &ignore);
pasteFlag = !types.empty();
}
dict.Set("canPaste", pasteFlag);

View file

@ -5,8 +5,8 @@
#ifndef SHELL_COMMON_NATIVE_MATE_CONVERTERS_STRING16_CONVERTER_H_
#define SHELL_COMMON_NATIVE_MATE_CONVERTERS_STRING16_CONVERTER_H_
#include "gin/converter.h"
#include "native_mate/converter.h"
#include "shell/common/gin_converters/string16_converter.h"
namespace mate {