chore: bump chromium to 1a093e6a0cb5e72ba78990fe39824 (master) (#24575)
This commit is contained in:
parent
d4a4269989
commit
2fb14f53fe
81 changed files with 407 additions and 346 deletions
|
@ -8,8 +8,8 @@
|
|||
#include <utility>
|
||||
|
||||
#include "base/mac/scoped_sending_event.h"
|
||||
#include "base/message_loop/message_loop_current.h"
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
#include "base/task/current_thread.h"
|
||||
#include "base/task/post_task.h"
|
||||
#include "content/public/browser/browser_task_traits.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
|
@ -106,7 +106,7 @@ void MenuMac::PopupOnUI(const base::WeakPtr<NativeWindow>& native_window,
|
|||
|
||||
[popup_controllers_[window_id] setCloseCallback:std::move(close_callback)];
|
||||
// Make sure events can be pumped while the menu is up.
|
||||
base::MessageLoopCurrent::ScopedNestableTaskAllower allow;
|
||||
base::CurrentThread::ScopedNestableTaskAllower allow;
|
||||
|
||||
// One of the events that could be pumped is |window.close()|.
|
||||
// User-initiated event-tracking loops protect against this by
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/stl_util.h"
|
||||
#include "content/public/browser/child_process_security_policy.h"
|
||||
#include "gin/object_template_builder.h"
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <vector>
|
||||
|
||||
#include "base/containers/id_map.h"
|
||||
#include "base/no_destructor.h"
|
||||
#include "gin/handle.h"
|
||||
#include "gin/object_template_builder.h"
|
||||
#include "gin/wrappable.h"
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "base/message_loop/message_loop_current.h"
|
||||
#include "base/no_destructor.h"
|
||||
#include "base/optional.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/task/current_thread.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
#include "base/values.h"
|
||||
|
@ -2398,7 +2398,7 @@ void WebContents::StartDrag(const gin_helper::Dictionary& item,
|
|||
|
||||
// Start dragging.
|
||||
if (!files.empty()) {
|
||||
base::MessageLoopCurrent::ScopedNestableTaskAllower allow;
|
||||
base::CurrentThread::ScopedNestableTaskAllower allow;
|
||||
DragFileItems(files, icon->image(), web_contents()->GetNativeView());
|
||||
} else {
|
||||
gin_helper::ErrorThrower(args->isolate())
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <utility>
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "chrome/common/chrome_switches.h"
|
||||
#include "components/federated_learning/floc_blocklist_service.h" // nogncheck
|
||||
#include "components/prefs/in_memory_pref_store.h"
|
||||
|
|
|
@ -929,13 +929,6 @@ void ElectronBrowserClient::SiteInstanceGotProcess(
|
|||
extensions::ProcessMap::Get(browser_context)
|
||||
->Insert(extension->id(), site_instance->GetProcess()->GetID(),
|
||||
site_instance->GetId());
|
||||
|
||||
base::PostTask(
|
||||
FROM_HERE, {BrowserThread::IO},
|
||||
base::BindOnce(&extensions::InfoMap::RegisterExtensionProcess,
|
||||
browser_context->extension_system()->info_map(),
|
||||
extension->id(), site_instance->GetProcess()->GetID(),
|
||||
site_instance->GetId()));
|
||||
}
|
||||
#endif // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
}
|
||||
|
@ -1014,13 +1007,6 @@ void ElectronBrowserClient::SiteInstanceDeleting(
|
|||
extensions::ProcessMap::Get(browser_context)
|
||||
->Remove(extension->id(), site_instance->GetProcess()->GetID(),
|
||||
site_instance->GetId());
|
||||
|
||||
base::PostTask(
|
||||
FROM_HERE, {BrowserThread::IO},
|
||||
base::BindOnce(&extensions::InfoMap::UnregisterExtensionProcess,
|
||||
browser_context->extension_system()->info_map(),
|
||||
extension->id(), site_instance->GetProcess()->GetID(),
|
||||
site_instance->GetId()));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -65,7 +65,6 @@
|
|||
#include "base/nix/xdg_util.h"
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
#include "ui/base/x/x11_util.h"
|
||||
#include "ui/base/x/x11_util_internal.h"
|
||||
#include "ui/events/devices/x11/touch_factory_x11.h"
|
||||
#include "ui/gfx/color_utils.h"
|
||||
#include "ui/gfx/x/x11_types.h"
|
||||
|
@ -402,7 +401,8 @@ void ElectronBrowserMainParts::PostDestroyThreads() {
|
|||
void ElectronBrowserMainParts::ToolkitInitialized() {
|
||||
#if defined(USE_X11)
|
||||
// In Aura/X11, Gtk-based LinuxUI implementation is used.
|
||||
gtk_ui_delegate_ = std::make_unique<ui::GtkUiDelegateX11>(gfx::GetXDisplay());
|
||||
gtk_ui_delegate_ =
|
||||
std::make_unique<ui::GtkUiDelegateX11>(x11::Connection::Get());
|
||||
ui::GtkUiDelegate::SetInstance(gtk_ui_delegate_.get());
|
||||
views::LinuxUI* linux_ui = BuildGtkUi(gtk_ui_delegate_.get());
|
||||
views::LinuxUI::SetInstance(linux_ui);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <string>
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/message_loop/message_loop_current.h"
|
||||
#include "base/task/current_thread.h"
|
||||
#include "base/task/thread_pool/initialization_util.h"
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
|
@ -91,7 +91,7 @@ v8::Isolate* JavascriptEnvironment::GetIsolate() {
|
|||
void JavascriptEnvironment::OnMessageLoopCreated() {
|
||||
DCHECK(!microtasks_runner_);
|
||||
microtasks_runner_ = std::make_unique<MicrotasksRunner>(isolate());
|
||||
base::MessageLoopCurrent::Get()->AddTaskObserver(microtasks_runner_.get());
|
||||
base::CurrentThread::Get()->AddTaskObserver(microtasks_runner_.get());
|
||||
}
|
||||
|
||||
void JavascriptEnvironment::OnMessageLoopDestroying() {
|
||||
|
@ -101,7 +101,7 @@ void JavascriptEnvironment::OnMessageLoopDestroying() {
|
|||
v8::HandleScope scope(isolate_);
|
||||
gin_helper::CleanedUpAtExit::DoCleanup();
|
||||
}
|
||||
base::MessageLoopCurrent::Get()->RemoveTaskObserver(microtasks_runner_.get());
|
||||
base::CurrentThread::Get()->RemoveTaskObserver(microtasks_runner_.get());
|
||||
platform_->DrainTasks(isolate_);
|
||||
platform_->UnregisterIsolate(isolate_);
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "chrome/common/chrome_constants.h"
|
||||
#include "content/public/browser/network_service_instance.h"
|
||||
#include "net/net_buildflags.h"
|
||||
#include "services/network/network_service.h"
|
||||
#include "shell/browser/browser_process_impl.h"
|
||||
#include "shell/browser/electron_browser_client.h"
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <string>
|
||||
|
||||
#include "extensions/browser/api/web_request/web_request_info.h"
|
||||
#include "net/base/completion_once_callback.h"
|
||||
#include "services/network/public/cpp/resource_request.h"
|
||||
|
||||
namespace electron {
|
||||
|
|
|
@ -487,13 +487,13 @@ void OffScreenRenderWidgetHostView::CopyFromSurface(
|
|||
}
|
||||
|
||||
void OffScreenRenderWidgetHostView::GetScreenInfo(
|
||||
content::ScreenInfo* screen_info) {
|
||||
blink::ScreenInfo* screen_info) {
|
||||
screen_info->depth = 24;
|
||||
screen_info->depth_per_component = 8;
|
||||
screen_info->orientation_angle = 0;
|
||||
screen_info->device_scale_factor = current_device_scale_factor_;
|
||||
screen_info->orientation_type =
|
||||
content::SCREEN_ORIENTATION_VALUES_LANDSCAPE_PRIMARY;
|
||||
blink::mojom::ScreenOrientation::kLandscapePrimary;
|
||||
screen_info->rect = gfx::Rect(size_);
|
||||
screen_info->available_rect = gfx::Rect(size_);
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase,
|
|||
const gfx::Rect& src_rect,
|
||||
const gfx::Size& output_size,
|
||||
base::OnceCallback<void(const SkBitmap&)> callback) override;
|
||||
void GetScreenInfo(content::ScreenInfo* results) override;
|
||||
void GetScreenInfo(blink::ScreenInfo* results) override;
|
||||
void TransformPointToRootSurface(gfx::PointF* point) override;
|
||||
gfx::Rect GetBoundsInRootWindow(void) override;
|
||||
viz::SurfaceId GetCurrentSurfaceId() const override;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include "content/browser/web_contents/web_contents_impl.h" // nogncheck
|
||||
#include "content/public/browser/render_view_host.h"
|
||||
#include "third_party/blink/public/platform/web_screen_info.h"
|
||||
#include "third_party/blink/public/common/widget/screen_info.h"
|
||||
#include "ui/display/screen.h"
|
||||
|
||||
namespace electron {
|
||||
|
|
|
@ -37,7 +37,7 @@ PluginUtils::GetMimeTypeToExtensionIdMap(
|
|||
base::flat_map<std::string, std::string> mime_type_to_extension_id_map;
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
std::vector<std::string> allowed_extension_ids =
|
||||
MimeTypesHandler::GetMIMETypeWhitelist();
|
||||
MimeTypesHandler::GetMIMETypeAllowlist();
|
||||
// Go through the white-listed extensions and try to use them to intercept
|
||||
// the URL request.
|
||||
for (const std::string& extension_id : allowed_extension_ids) {
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/message_loop/message_loop_current.h"
|
||||
#include "base/message_loop/message_pump_mac.h"
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
#include "base/task/current_thread.h"
|
||||
#include "base/task/post_task.h"
|
||||
#include "content/public/browser/browser_task_traits.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
|
@ -177,7 +177,7 @@
|
|||
|
||||
- (void)popUpContextMenu:(electron::ElectronMenuModel*)menu_model {
|
||||
// Make sure events can be pumped while the menu is up.
|
||||
base::MessageLoopCurrent::ScopedNestableTaskAllower allow;
|
||||
base::CurrentThread::ScopedNestableTaskAllower allow;
|
||||
|
||||
// Show a custom menu.
|
||||
if (menu_model) {
|
||||
|
|
|
@ -30,7 +30,8 @@ std::vector<base::string16> Clipboard::AvailableFormats(
|
|||
gin_helper::Arguments* args) {
|
||||
std::vector<base::string16> format_types;
|
||||
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
|
||||
clipboard->ReadAvailableTypes(GetClipboardBuffer(args), &format_types);
|
||||
clipboard->ReadAvailableTypes(GetClipboardBuffer(args),
|
||||
/* data_dst = */ nullptr, &format_types);
|
||||
return format_types;
|
||||
}
|
||||
|
||||
|
@ -39,7 +40,8 @@ bool Clipboard::Has(const std::string& format_string,
|
|||
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
|
||||
ui::ClipboardFormatType format(
|
||||
ui::ClipboardFormatType::GetType(format_string));
|
||||
return clipboard->IsFormatAvailable(format, GetClipboardBuffer(args));
|
||||
return clipboard->IsFormatAvailable(format, GetClipboardBuffer(args),
|
||||
/* data_dst = */ nullptr);
|
||||
}
|
||||
|
||||
std::string Clipboard::Read(const std::string& format_string) {
|
||||
|
@ -48,7 +50,7 @@ std::string Clipboard::Read(const std::string& format_string) {
|
|||
ui::ClipboardFormatType::GetType(format_string));
|
||||
|
||||
std::string data;
|
||||
clipboard->ReadData(format, &data);
|
||||
clipboard->ReadData(format, /* data_dst = */ nullptr, &data);
|
||||
return data;
|
||||
}
|
||||
|
||||
|
@ -105,14 +107,15 @@ base::string16 Clipboard::ReadText(gin_helper::Arguments* args) {
|
|||
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
|
||||
auto type = GetClipboardBuffer(args);
|
||||
if (clipboard->IsFormatAvailable(ui::ClipboardFormatType::GetPlainTextType(),
|
||||
type)) {
|
||||
clipboard->ReadText(type, &data);
|
||||
type, /* data_dst = */ nullptr)) {
|
||||
clipboard->ReadText(type, /* data_dst = */ nullptr, &data);
|
||||
} else {
|
||||
#if defined(OS_WIN)
|
||||
if (clipboard->IsFormatAvailable(
|
||||
ui::ClipboardFormatType::GetPlainTextAType(), type)) {
|
||||
ui::ClipboardFormatType::GetPlainTextAType(), type,
|
||||
/* data_dst = */ nullptr)) {
|
||||
std::string result;
|
||||
clipboard->ReadAsciiText(type, &result);
|
||||
clipboard->ReadAsciiText(type, /* data_dst = */ nullptr, &result);
|
||||
data = base::ASCIIToUTF16(result);
|
||||
}
|
||||
#endif
|
||||
|
@ -129,7 +132,7 @@ void Clipboard::WriteText(const base::string16& text,
|
|||
base::string16 Clipboard::ReadRTF(gin_helper::Arguments* args) {
|
||||
std::string data;
|
||||
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
|
||||
clipboard->ReadRTF(GetClipboardBuffer(args), &data);
|
||||
clipboard->ReadRTF(GetClipboardBuffer(args), /* data_dst = */ nullptr, &data);
|
||||
return base::UTF8ToUTF16(data);
|
||||
}
|
||||
|
||||
|
@ -145,7 +148,8 @@ base::string16 Clipboard::ReadHTML(gin_helper::Arguments* args) {
|
|||
uint32_t start;
|
||||
uint32_t end;
|
||||
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
|
||||
clipboard->ReadHTML(GetClipboardBuffer(args), &html, &url, &start, &end);
|
||||
clipboard->ReadHTML(GetClipboardBuffer(args), /* data_dst = */ nullptr, &html,
|
||||
&url, &start, &end);
|
||||
data = html.substr(start, end - start);
|
||||
return data;
|
||||
}
|
||||
|
@ -162,7 +166,7 @@ v8::Local<v8::Value> Clipboard::ReadBookmark(gin_helper::Arguments* args) {
|
|||
gin_helper::Dictionary dict =
|
||||
gin_helper::Dictionary::CreateEmpty(args->isolate());
|
||||
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
|
||||
clipboard->ReadBookmark(&title, &url);
|
||||
clipboard->ReadBookmark(/* data_dst = */ nullptr, &title, &url);
|
||||
dict.Set("title", title);
|
||||
dict.Set("url", url);
|
||||
return dict.GetHandle();
|
||||
|
@ -180,6 +184,7 @@ gfx::Image Clipboard::ReadImage(gin_helper::Arguments* args) {
|
|||
base::Optional<gfx::Image> image;
|
||||
clipboard->ReadImage(
|
||||
GetClipboardBuffer(args),
|
||||
/* data_dst = */ nullptr,
|
||||
base::Bind(
|
||||
[](base::Optional<gfx::Image>* image, const SkBitmap& result) {
|
||||
image->emplace(gfx::Image::CreateFrom1xBitmap(result));
|
||||
|
|
|
@ -374,7 +374,7 @@ v8::Local<v8::Value> EditFlagsToV8(v8::Isolate* isolate, int editFlags) {
|
|||
if (editFlags & blink::ContextMenuDataEditFlags::kCanPaste) {
|
||||
std::vector<base::string16> types;
|
||||
ui::Clipboard::GetForCurrentThread()->ReadAvailableTypes(
|
||||
ui::ClipboardBuffer::kCopyPaste, &types);
|
||||
ui::ClipboardBuffer::kCopyPaste, /* data_dst = */ nullptr, &types);
|
||||
pasteFlag = !types.empty();
|
||||
}
|
||||
dict.Set("canPaste", pasteFlag);
|
||||
|
|
|
@ -594,7 +594,7 @@ void SetIsolatedWorldInfo(v8::Local<v8::Value> window,
|
|||
blink::WebString::FromUTF8(origin_url));
|
||||
info.content_security_policy = blink::WebString::FromUTF8(security_policy);
|
||||
info.human_readable_name = blink::WebString::FromUTF8(name);
|
||||
render_frame->GetWebFrame()->SetIsolatedWorldInfo(world_id, info);
|
||||
blink::SetIsolatedWorldInfo(world_id, info);
|
||||
}
|
||||
|
||||
blink::WebCacheResourceTypeStats GetResourceUsage(v8::Isolate* isolate) {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include "shell/renderer/content_settings_observer.h"
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "content/public/renderer/render_frame.h"
|
||||
#include "shell/common/options_switches.h"
|
||||
#include "third_party/blink/public/platform/url_conversion.h"
|
||||
|
|
|
@ -137,7 +137,7 @@ void ElectronRenderFrameObserver::CreateIsolatedWorldContext() {
|
|||
blink::WebString::FromUTF8("Electron Isolated Context");
|
||||
// Setup document's origin policy in isolated world
|
||||
info.security_origin = frame->GetDocument().GetSecurityOrigin();
|
||||
frame->SetIsolatedWorldInfo(WorldIDs::ISOLATED_WORLD_ID, info);
|
||||
blink::SetIsolatedWorldInfo(WorldIDs::ISOLATED_WORLD_ID, info);
|
||||
|
||||
// Create initial script context in isolated world
|
||||
blink::WebScriptSource source("void 0");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue