mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
chore: bump chromium to 83.0.4102.3 (#22941)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> Co-authored-by: Andy Locascio <andy@slack-corp.com> Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
This commit is contained in:
@@ -204,7 +204,7 @@ v8::Local<v8::Promise> Cookies::Get(const gin_helper::Dictionary& filter) {
|
||||
net::CookieOptions options;
|
||||
options.set_include_httponly();
|
||||
options.set_same_site_cookie_context(
|
||||
net::CookieOptions::SameSiteCookieContext::SAME_SITE_STRICT);
|
||||
net::CookieOptions::SameSiteCookieContext::MakeInclusive());
|
||||
options.set_do_not_update_access_time();
|
||||
|
||||
manager->GetCookieList(GURL(url), options,
|
||||
|
||||
@@ -82,7 +82,8 @@ bool NativeTheme::ShouldUseInvertedColorScheme() {
|
||||
return false;
|
||||
return is_inverted;
|
||||
#else
|
||||
return color_utils::IsInvertedColorScheme();
|
||||
return ui_theme_->GetHighContrastColorScheme() ==
|
||||
ui::NativeTheme::HighContrastColorScheme::kDark;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,9 @@ bool SystemPreferences::IsDarkMode() {
|
||||
#endif
|
||||
|
||||
bool SystemPreferences::IsInvertedColorScheme() {
|
||||
return color_utils::IsInvertedColorScheme();
|
||||
return ui::NativeTheme::GetInstanceForNativeUi()
|
||||
->GetHighContrastColorScheme() ==
|
||||
ui::NativeTheme::HighContrastColorScheme::kDark;
|
||||
}
|
||||
|
||||
bool SystemPreferences::IsHighContrastColorScheme() {
|
||||
|
||||
@@ -69,6 +69,9 @@
|
||||
#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/x/x11_types.h"
|
||||
#include "ui/gtk/gtk_ui_delegate.h"
|
||||
#include "ui/gtk/gtk_ui_delegate_x11.h"
|
||||
#include "ui/views/linux_ui/linux_ui.h"
|
||||
#endif
|
||||
|
||||
@@ -267,7 +270,6 @@ void ElectronBrowserMainParts::RegisterDestructionCallback(
|
||||
int ElectronBrowserMainParts::PreEarlyInitialization() {
|
||||
field_trial_list_ = std::make_unique<base::FieldTrialList>(nullptr);
|
||||
#if defined(USE_X11)
|
||||
views::LinuxUI::SetInstance(BuildGtkUi());
|
||||
OverrideLinuxAppDataPath();
|
||||
|
||||
// Installs the X11 error handlers for the browser process used during
|
||||
@@ -403,6 +405,13 @@ 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());
|
||||
ui::GtkUiDelegate::SetInstance(gtk_ui_delegate_.get());
|
||||
views::LinuxUI::SetInstance(BuildGtkUi(ui::GtkUiDelegate::instance()));
|
||||
#endif
|
||||
|
||||
#if defined(USE_AURA) && defined(USE_X11)
|
||||
views::LinuxUI::instance()->Initialize();
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,12 @@ class WMState;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(USE_X11)
|
||||
namespace ui {
|
||||
class GtkUiDelegate;
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace electron {
|
||||
|
||||
class ElectronBrowserContext;
|
||||
@@ -121,6 +127,10 @@ class ElectronBrowserMainParts : public content::BrowserMainParts {
|
||||
std::unique_ptr<wm::WMState> wm_state_;
|
||||
#endif
|
||||
|
||||
#if defined(USE_X11)
|
||||
std::unique_ptr<ui::GtkUiDelegate> gtk_ui_delegate_;
|
||||
#endif
|
||||
|
||||
std::unique_ptr<views::LayoutProvider> layout_provider_;
|
||||
|
||||
// A fake BrowserProcess object that used to feed the source code from chrome.
|
||||
|
||||
@@ -120,7 +120,8 @@ void ProxyingWebSocket::OnConnectionEstablished(
|
||||
mojo::PendingRemote<network::mojom::WebSocket> websocket,
|
||||
mojo::PendingReceiver<network::mojom::WebSocketClient> client_receiver,
|
||||
network::mojom::WebSocketHandshakeResponsePtr response,
|
||||
mojo::ScopedDataPipeConsumerHandle readable) {
|
||||
mojo::ScopedDataPipeConsumerHandle readable,
|
||||
mojo::ScopedDataPipeProducerHandle writable) {
|
||||
DCHECK(forwarding_handshake_client_);
|
||||
DCHECK(!is_done_);
|
||||
is_done_ = true;
|
||||
@@ -128,6 +129,7 @@ void ProxyingWebSocket::OnConnectionEstablished(
|
||||
client_receiver_ = std::move(client_receiver);
|
||||
handshake_response_ = std::move(response);
|
||||
readable_ = std::move(readable);
|
||||
writable_ = std::move(writable);
|
||||
|
||||
response_->remote_endpoint = handshake_response_->remote_endpoint;
|
||||
|
||||
@@ -156,7 +158,8 @@ void ProxyingWebSocket::ContinueToCompleted() {
|
||||
web_request_api_->OnCompleted(&info_, request_, net::ERR_WS_UPGRADE);
|
||||
forwarding_handshake_client_->OnConnectionEstablished(
|
||||
std::move(websocket_), std::move(client_receiver_),
|
||||
std::move(handshake_response_), std::move(readable_));
|
||||
std::move(handshake_response_), std::move(readable_),
|
||||
std::move(writable_));
|
||||
|
||||
// Deletes |this|.
|
||||
delete this;
|
||||
|
||||
@@ -59,7 +59,8 @@ class ProxyingWebSocket : public network::mojom::WebSocketHandshakeClient,
|
||||
mojo::PendingRemote<network::mojom::WebSocket> websocket,
|
||||
mojo::PendingReceiver<network::mojom::WebSocketClient> client_receiver,
|
||||
network::mojom::WebSocketHandshakeResponsePtr response,
|
||||
mojo::ScopedDataPipeConsumerHandle readable) override;
|
||||
mojo::ScopedDataPipeConsumerHandle readable,
|
||||
mojo::ScopedDataPipeProducerHandle writable) override;
|
||||
|
||||
// network::mojom::AuthenticationHandler method:
|
||||
void OnAuthRequired(const net::AuthChallengeInfo& auth_info,
|
||||
@@ -149,6 +150,7 @@ class ProxyingWebSocket : public network::mojom::WebSocketHandshakeClient,
|
||||
mojo::PendingReceiver<network::mojom::WebSocketClient> client_receiver_;
|
||||
network::mojom::WebSocketHandshakeResponsePtr handshake_response_ = nullptr;
|
||||
mojo::ScopedDataPipeConsumerHandle readable_;
|
||||
mojo::ScopedDataPipeProducerHandle writable_;
|
||||
|
||||
extensions::WebRequestInfo info_;
|
||||
|
||||
|
||||
@@ -94,8 +94,8 @@ ResolveProxyHelper::PendingRequest::PendingRequest(
|
||||
|
||||
ResolveProxyHelper::PendingRequest::~PendingRequest() noexcept = default;
|
||||
|
||||
ResolveProxyHelper::PendingRequest& ResolveProxyHelper::PendingRequest::
|
||||
operator=(ResolveProxyHelper::PendingRequest&& pending_request) noexcept =
|
||||
default;
|
||||
ResolveProxyHelper::PendingRequest&
|
||||
ResolveProxyHelper::PendingRequest::operator=(
|
||||
ResolveProxyHelper::PendingRequest&& pending_request) noexcept = default;
|
||||
|
||||
} // namespace electron
|
||||
|
||||
@@ -100,7 +100,6 @@ void DevToolsManagerDelegate::Inspect(content::DevToolsAgentHost* agent_host) {}
|
||||
|
||||
void DevToolsManagerDelegate::HandleCommand(
|
||||
content::DevToolsAgentHostClientChannel* channel,
|
||||
const std::string& method,
|
||||
base::span<const uint8_t> message,
|
||||
NotHandledCallback callback) {
|
||||
std::move(callback).Run(message);
|
||||
|
||||
@@ -24,7 +24,6 @@ class DevToolsManagerDelegate : public content::DevToolsManagerDelegate {
|
||||
// DevToolsManagerDelegate implementation.
|
||||
void Inspect(content::DevToolsAgentHost* agent_host) override;
|
||||
void HandleCommand(content::DevToolsAgentHostClientChannel* channel,
|
||||
const std::string& method,
|
||||
base::span<const uint8_t> message,
|
||||
NotHandledCallback callback) override;
|
||||
scoped_refptr<content::DevToolsAgentHost> CreateNewTarget(
|
||||
|
||||
@@ -180,8 +180,16 @@ void Clipboard::WriteBookmark(const base::string16& title,
|
||||
|
||||
gfx::Image Clipboard::ReadImage(gin_helper::Arguments* args) {
|
||||
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
|
||||
SkBitmap bitmap = clipboard->ReadImage(GetClipboardBuffer(args));
|
||||
return gfx::Image::CreateFrom1xBitmap(bitmap);
|
||||
base::Optional<gfx::Image> image;
|
||||
clipboard->ReadImage(
|
||||
GetClipboardBuffer(args),
|
||||
base::Bind(
|
||||
[](base::Optional<gfx::Image>* image, const SkBitmap& result) {
|
||||
image->emplace(gfx::Image::CreateFrom1xBitmap(result));
|
||||
},
|
||||
&image));
|
||||
DCHECK(image.has_value());
|
||||
return image.value();
|
||||
}
|
||||
|
||||
void Clipboard::WriteImage(const gfx::Image& image,
|
||||
|
||||
Reference in New Issue
Block a user