chore: bump chromium to 5b340c815ce15ab2efcf277ed19e9 (master) (#22064)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> Co-authored-by: loc <andy@slack-corp.com> Co-authored-by: Robo <hop2deep@gmail.com> Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net>
This commit is contained in:
parent
3a331ffca6
commit
39baf68790
126 changed files with 1047 additions and 961 deletions
|
@ -233,8 +233,6 @@ base::RefCountedMemory* ElectronContentClient::GetDataResourceBytes(
|
|||
void ElectronContentClient::AddAdditionalSchemes(Schemes* schemes) {
|
||||
AppendDelimitedSwitchToVector(switches::kServiceWorkerSchemes,
|
||||
&schemes->service_worker_schemes);
|
||||
AppendDelimitedSwitchToVector(switches::kStandardSchemes,
|
||||
&schemes->standard_schemes);
|
||||
AppendDelimitedSwitchToVector(switches::kSecureSchemes,
|
||||
&schemes->secure_schemes);
|
||||
AppendDelimitedSwitchToVector(switches::kBypassCSPSchemes,
|
||||
|
|
|
@ -342,15 +342,12 @@ int ElectronMainDelegate::RunProcess(
|
|||
return -1;
|
||||
}
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
bool ElectronMainDelegate::DelaySandboxInitialization(
|
||||
const std::string& process_type) {
|
||||
return process_type == kRelauncherProcess;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool ElectronMainDelegate::ShouldCreateFeatureList() {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ElectronMainDelegate::ShouldLockSchemeRegistry() {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -39,10 +39,8 @@ class ElectronMainDelegate : public content::ContentMainDelegate {
|
|||
int RunProcess(
|
||||
const std::string& process_type,
|
||||
const content::MainFunctionParams& main_function_params) override;
|
||||
#if defined(OS_MACOSX)
|
||||
bool DelaySandboxInitialization(const std::string& process_type) override;
|
||||
#endif
|
||||
bool ShouldCreateFeatureList() override;
|
||||
bool ShouldLockSchemeRegistry() override;
|
||||
|
||||
private:
|
||||
#if defined(OS_MACOSX)
|
||||
|
|
|
@ -90,6 +90,7 @@
|
|||
#include "third_party/blink/public/mojom/frame/find_in_page.mojom.h"
|
||||
#include "third_party/blink/public/mojom/frame/fullscreen.mojom.h"
|
||||
#include "third_party/blink/public/platform/web_cursor_info.h"
|
||||
#include "ui/base/mojom/cursor_type.mojom-shared.h"
|
||||
#include "ui/display/screen.h"
|
||||
#include "ui/events/base_event_utils.h"
|
||||
|
||||
|
@ -1236,12 +1237,12 @@ void WebContents::TitleWasSet(content::NavigationEntry* entry) {
|
|||
}
|
||||
|
||||
void WebContents::DidUpdateFaviconURL(
|
||||
const std::vector<content::FaviconURL>& urls) {
|
||||
const std::vector<blink::mojom::FaviconURLPtr>& urls) {
|
||||
std::set<GURL> unique_urls;
|
||||
for (const auto& iter : urls) {
|
||||
if (iter.icon_type != content::FaviconURL::IconType::kFavicon)
|
||||
if (iter->icon_type != blink::mojom::FaviconIconType::kFavicon)
|
||||
continue;
|
||||
const GURL& url = iter.icon_url;
|
||||
const GURL& url = iter->icon_url;
|
||||
if (url.is_valid())
|
||||
unique_urls.insert(url);
|
||||
}
|
||||
|
@ -2331,7 +2332,7 @@ bool WebContents::IsBeingCaptured() {
|
|||
void WebContents::OnCursorChange(const content::WebCursor& cursor) {
|
||||
const content::CursorInfo& info = cursor.info();
|
||||
|
||||
if (info.type == ui::CursorType::kCustom) {
|
||||
if (info.type == ui::mojom::CursorType::kCustom) {
|
||||
Emit("cursor-changed", CursorTypeToString(info),
|
||||
gfx::Image::CreateFrom1xBitmap(info.custom_image),
|
||||
info.image_scale_factor,
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include "content/public/browser/render_widget_host.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "content/public/browser/web_contents_observer.h"
|
||||
#include "content/public/common/favicon_url.h"
|
||||
#include "electron/buildflags/buildflags.h"
|
||||
#include "electron/shell/common/api/api.mojom.h"
|
||||
#include "gin/handle.h"
|
||||
|
@ -476,7 +475,7 @@ class WebContents : public gin_helper::TrackableObject<WebContents>,
|
|||
const content::LoadCommittedDetails& load_details) override;
|
||||
void TitleWasSet(content::NavigationEntry* entry) override;
|
||||
void DidUpdateFaviconURL(
|
||||
const std::vector<content::FaviconURL>& urls) override;
|
||||
const std::vector<blink::mojom::FaviconURLPtr>& urls) override;
|
||||
void PluginCrashed(const base::FilePath& plugin_path,
|
||||
base::ProcessId plugin_pid) override;
|
||||
void MediaStartedPlaying(const MediaPlayerInfo& video_type,
|
||||
|
|
|
@ -125,6 +125,18 @@ void GPUInfoEnumerator::EndDx12VulkanVersionInfo() {
|
|||
value_stack.pop();
|
||||
}
|
||||
|
||||
void GPUInfoEnumerator::BeginOverlayInfo() {
|
||||
value_stack.push(std::move(current));
|
||||
current = std::make_unique<base::DictionaryValue>();
|
||||
}
|
||||
|
||||
void GPUInfoEnumerator::EndOverlayInfo() {
|
||||
auto& top_value = value_stack.top();
|
||||
top_value->SetDictionary(kOverlayInfo, std::move(current));
|
||||
current = std::move(top_value);
|
||||
value_stack.pop();
|
||||
}
|
||||
|
||||
std::unique_ptr<base::DictionaryValue> GPUInfoEnumerator::GetDictionary() {
|
||||
return std::move(current);
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ class GPUInfoEnumerator final : public gpu::GPUInfo::Enumerator {
|
|||
"imageDecodeAcceleratorSupportedProfile";
|
||||
const char* kAuxAttributesKey = "auxAttributes";
|
||||
const char* kDx12VulkanVersionInfoKey = "dx12VulkanVersionInfo";
|
||||
const char* kOverlayInfo = "overlayInfo";
|
||||
|
||||
public:
|
||||
GPUInfoEnumerator();
|
||||
|
@ -50,6 +51,8 @@ class GPUInfoEnumerator final : public gpu::GPUInfo::Enumerator {
|
|||
void EndAuxAttributes() override;
|
||||
void BeginDx12VulkanVersionInfo() override;
|
||||
void EndDx12VulkanVersionInfo() override;
|
||||
void BeginOverlayInfo() override;
|
||||
void EndOverlayInfo() override;
|
||||
std::unique_ptr<base::DictionaryValue> GetDictionary();
|
||||
|
||||
private:
|
||||
|
|
|
@ -34,8 +34,8 @@ bool GPUInfoManager::NeedsCompleteGpuInfoCollection() const {
|
|||
#if defined(OS_MACOSX)
|
||||
return gpu_data_manager_->GetGPUInfo().gl_vendor.empty();
|
||||
#elif defined(OS_WIN)
|
||||
return (gpu_data_manager_->GetGPUInfo().dx_diagnostics.values.empty() &&
|
||||
gpu_data_manager_->GetGPUInfo().dx_diagnostics.children.empty());
|
||||
return gpu_data_manager_->DxdiagDx12VulkanRequested() &&
|
||||
gpu_data_manager_->GetGPUInfo().dx_diagnostics.IsEmpty();
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
|
|
|
@ -40,7 +40,7 @@ class GPUInfoManager : public content::GpuDataManagerObserver {
|
|||
// once we have the complete information data
|
||||
std::vector<gin_helper::Promise<base::DictionaryValue>>
|
||||
complete_info_promise_set_;
|
||||
content::GpuDataManager* gpu_data_manager_;
|
||||
content::GpuDataManagerImpl* gpu_data_manager_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(GPUInfoManager);
|
||||
};
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "net/proxy_resolution/proxy_config.h"
|
||||
#include "net/proxy_resolution/proxy_config_service.h"
|
||||
#include "net/proxy_resolution/proxy_config_with_annotation.h"
|
||||
#include "net/proxy_resolution/proxy_resolution_service.h"
|
||||
#include "services/network/public/cpp/network_switches.h"
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINTING)
|
||||
|
|
|
@ -405,6 +405,9 @@ void ElectronBrowserMainParts::PreMainMessageLoopRun() {
|
|||
node_bindings_->PrepareMessageLoop();
|
||||
node_bindings_->RunMessageLoop();
|
||||
|
||||
// url::Add*Scheme are not threadsafe, this helps prevent data races.
|
||||
url::LockSchemeRegistries();
|
||||
|
||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
extensions_client_ = std::make_unique<ElectronExtensionsClient>();
|
||||
extensions::ExtensionsClient::Set(extensions_client_.get());
|
||||
|
|
|
@ -577,7 +577,11 @@ void NativeWindow::NotifyWindowMessage(UINT message,
|
|||
}
|
||||
#endif
|
||||
|
||||
const views::Widget* NativeWindow::GetWidgetImpl() const {
|
||||
views::Widget* NativeWindow::GetWidget() {
|
||||
return widget();
|
||||
}
|
||||
|
||||
const views::Widget* NativeWindow::GetWidget() const {
|
||||
return widget();
|
||||
}
|
||||
|
||||
|
|
|
@ -306,7 +306,8 @@ class NativeWindow : public base::SupportsUserData,
|
|||
NativeWindow(const gin_helper::Dictionary& options, NativeWindow* parent);
|
||||
|
||||
// views::WidgetDelegate:
|
||||
const views::Widget* GetWidgetImpl() const override;
|
||||
views::Widget* GetWidget() override;
|
||||
const views::Widget* GetWidget() const override;
|
||||
base::string16 GetAccessibleWindowTitle() const override;
|
||||
|
||||
void set_content_view(views::View* view) { content_view_ = view; }
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include "components/viz/common/frame_sinks/begin_frame_args.h"
|
||||
#include "components/viz/common/frame_sinks/copy_output_request.h"
|
||||
#include "components/viz/common/frame_sinks/delay_based_time_source.h"
|
||||
#include "components/viz/common/gl_helper.h"
|
||||
#include "components/viz/common/quads/render_pass.h"
|
||||
#include "content/browser/renderer_host/cursor_manager.h" // nogncheck
|
||||
#include "content/browser/renderer_host/input/synthetic_gesture_target.h" // nogncheck
|
||||
|
@ -32,6 +31,7 @@
|
|||
#include "content/public/browser/context_factory.h"
|
||||
#include "content/public/browser/gpu_data_manager.h"
|
||||
#include "content/public/browser/render_process_host.h"
|
||||
#include "gpu/command_buffer/client/gl_helper.h"
|
||||
#include "media/base/video_frame.h"
|
||||
#include "third_party/blink/public/common/input/web_input_event.h"
|
||||
#include "third_party/skia/include/core/SkCanvas.h"
|
||||
|
@ -211,11 +211,9 @@ OffScreenRenderWidgetHostView::OffScreenRenderWidgetHostView(
|
|||
GetRootLayer()->SetFillsBoundsOpaquely(opaque);
|
||||
GetRootLayer()->SetColor(background_color_);
|
||||
|
||||
ui::ContextFactoryPrivate* context_factory_private =
|
||||
content::GetContextFactoryPrivate();
|
||||
ui::ContextFactory* context_factory = content::GetContextFactory();
|
||||
compositor_ = std::make_unique<ui::Compositor>(
|
||||
context_factory_private->AllocateFrameSinkId(),
|
||||
content::GetContextFactory(), context_factory_private,
|
||||
context_factory->AllocateFrameSinkId(), context_factory,
|
||||
base::ThreadTaskRunnerHandle::Get(), false /* enable_pixel_canvas */,
|
||||
false /* use_external_begin_frame_control */);
|
||||
compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget);
|
||||
|
|
|
@ -19,7 +19,6 @@ class ViewsDelegateMac : public views::ViewsDelegate {
|
|||
views::Widget::InitParams* params,
|
||||
views::internal::NativeWidgetDelegate* delegate) override;
|
||||
ui::ContextFactory* GetContextFactory() override;
|
||||
ui::ContextFactoryPrivate* GetContextFactoryPrivate() override;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(ViewsDelegateMac);
|
||||
|
|
|
@ -36,8 +36,4 @@ ui::ContextFactory* ViewsDelegateMac::GetContextFactory() {
|
|||
return content::GetContextFactory();
|
||||
}
|
||||
|
||||
ui::ContextFactoryPrivate* ViewsDelegateMac::GetContextFactoryPrivate() {
|
||||
return content::GetContextFactoryPrivate();
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -49,7 +49,8 @@ class DevToolsWindowDelegate : public views::ClientView,
|
|||
base::string16 GetWindowTitle() const override { return shell_->GetTitle(); }
|
||||
gfx::ImageSkia GetWindowAppIcon() override { return GetWindowIcon(); }
|
||||
gfx::ImageSkia GetWindowIcon() override { return icon_; }
|
||||
const views::Widget* GetWidgetImpl() const override { return widget_; }
|
||||
views::Widget* GetWidget() override { return widget_; }
|
||||
const views::Widget* GetWidget() const override { return widget_; }
|
||||
views::View* GetContentsView() override { return view_; }
|
||||
views::ClientView* CreateClientView(views::Widget* widget) override {
|
||||
return this;
|
||||
|
|
|
@ -39,11 +39,6 @@ class ElectronPermissionMessageProvider
|
|||
return extensions::PermissionMessages();
|
||||
}
|
||||
|
||||
extensions::PermissionMessages GetPowerfulPermissionMessages(
|
||||
const extensions::PermissionIDSet& permissions) const override {
|
||||
return extensions::PermissionMessages();
|
||||
}
|
||||
|
||||
bool IsPrivilegeIncrease(
|
||||
const extensions::PermissionSet& granted_permissions,
|
||||
const extensions::PermissionSet& requested_permissions,
|
||||
|
|
|
@ -264,17 +264,16 @@ bool Converter<blink::WebMouseWheelEvent>::FromV8(
|
|||
bool has_precise_scrolling_deltas = false;
|
||||
dict.Get("hasPreciseScrollingDeltas", &has_precise_scrolling_deltas);
|
||||
if (has_precise_scrolling_deltas) {
|
||||
out->delta_units =
|
||||
ui::input_types::ScrollGranularity::kScrollByPrecisePixel;
|
||||
out->delta_units = ui::ScrollGranularity::kScrollByPrecisePixel;
|
||||
} else {
|
||||
out->delta_units = ui::input_types::ScrollGranularity::kScrollByPixel;
|
||||
out->delta_units = ui::ScrollGranularity::kScrollByPixel;
|
||||
}
|
||||
|
||||
#if defined(USE_AURA)
|
||||
// Matches the behavior of ui/events/blink/web_input_event_traits.cc:
|
||||
bool can_scroll = true;
|
||||
if (dict.Get("canScroll", &can_scroll) && !can_scroll) {
|
||||
out->delta_units = ui::input_types::ScrollGranularity::kScrollByPage;
|
||||
out->delta_units = ui::ScrollGranularity::kScrollByPage;
|
||||
out->SetModifiers(out->GetModifiers() & ~blink::WebInputEvent::kControlKey);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -148,7 +148,7 @@ v8::Local<v8::Value> Converter<display::Display>::ToV8(
|
|||
dict.Set("accelerometerSupport", val.accelerometer_support());
|
||||
dict.Set("monochrome", val.is_monochrome());
|
||||
dict.Set("colorDepth", val.color_depth());
|
||||
dict.Set("colorSpace", val.color_space().ToString());
|
||||
dict.Set("colorSpace", val.color_spaces().GetRasterColorSpace().ToString());
|
||||
dict.Set("depthPerComponent", val.depth_per_component());
|
||||
dict.Set("size", val.size());
|
||||
dict.Set("workAreaSize", val.work_area_size());
|
||||
|
|
|
@ -2,10 +2,12 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/common/mouse_util.h"
|
||||
#include <string>
|
||||
|
||||
using Cursor = ui::CursorType;
|
||||
#include "shell/common/mouse_util.h"
|
||||
#include "ui/base/mojom/cursor_type.mojom-shared.h"
|
||||
|
||||
using Cursor = ui::mojom::CursorType;
|
||||
|
||||
namespace electron {
|
||||
|
||||
|
|
|
@ -98,8 +98,7 @@ bool IsPlainObject(const v8::Local<v8::Value>& object) {
|
|||
object->IsArrayBuffer() || object->IsArrayBufferView() ||
|
||||
object->IsArray() || object->IsDataView() ||
|
||||
object->IsSharedArrayBuffer() || object->IsProxy() ||
|
||||
object->IsWebAssemblyCompiledModule() ||
|
||||
object->IsModuleNamespaceObject());
|
||||
object->IsWasmModuleObject() || object->IsModuleNamespaceObject());
|
||||
}
|
||||
|
||||
bool IsPlainArray(const v8::Local<v8::Value>& arr) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue