chore: bump chromium to 98ebf6c3f0b7bd96bdb1a4b42208f (master) (#22999)
Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: Electron Bot <anonymous@electronjs.org> Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net>
This commit is contained in:
parent
b8c1709a88
commit
3e8d77d564
106 changed files with 645 additions and 673 deletions
|
@ -544,7 +544,6 @@ App::App(v8::Isolate* isolate) {
|
|||
static_cast<ElectronBrowserClient*>(ElectronBrowserClient::Get())
|
||||
->set_delegate(this);
|
||||
Browser::Get()->AddObserver(this);
|
||||
content::GpuDataManager::GetInstance()->AddObserver(this);
|
||||
|
||||
base::ProcessId pid = base::GetCurrentProcId();
|
||||
auto process_metric = std::make_unique<electron::ProcessMetric>(
|
||||
|
@ -622,6 +621,21 @@ void App::OnPreMainMessageLoopRun() {
|
|||
}
|
||||
}
|
||||
|
||||
void App::OnPreCreateThreads() {
|
||||
DCHECK(!content::GpuDataManager::Initialized());
|
||||
content::GpuDataManager* manager = content::GpuDataManager::GetInstance();
|
||||
manager->AddObserver(this);
|
||||
|
||||
if (disable_hw_acceleration_) {
|
||||
manager->DisableHardwareAcceleration();
|
||||
}
|
||||
|
||||
if (disable_domain_blocking_for_3DAPIs_) {
|
||||
content::GpuDataManagerImpl::GetInstance()
|
||||
->DisableDomainBlockingFor3DAPIsForTesting();
|
||||
}
|
||||
}
|
||||
|
||||
void App::OnAccessibilitySupportChanged() {
|
||||
Emit("accessibility-support-changed", IsAccessibilitySupportEnabled());
|
||||
}
|
||||
|
@ -1031,7 +1045,11 @@ void App::DisableHardwareAcceleration(gin_helper::ErrorThrower thrower) {
|
|||
"before app is ready");
|
||||
return;
|
||||
}
|
||||
content::GpuDataManager::GetInstance()->DisableHardwareAcceleration();
|
||||
if (content::GpuDataManager::Initialized()) {
|
||||
content::GpuDataManager::GetInstance()->DisableHardwareAcceleration();
|
||||
} else {
|
||||
disable_hw_acceleration_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
void App::DisableDomainBlockingFor3DAPIs(gin_helper::ErrorThrower thrower) {
|
||||
|
@ -1041,8 +1059,12 @@ void App::DisableDomainBlockingFor3DAPIs(gin_helper::ErrorThrower thrower) {
|
|||
"before app is ready");
|
||||
return;
|
||||
}
|
||||
content::GpuDataManagerImpl::GetInstance()
|
||||
->DisableDomainBlockingFor3DAPIsForTesting();
|
||||
if (content::GpuDataManager::Initialized()) {
|
||||
content::GpuDataManagerImpl::GetInstance()
|
||||
->DisableDomainBlockingFor3DAPIsForTesting();
|
||||
} else {
|
||||
disable_domain_blocking_for_3DAPIs_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool App::IsAccessibilitySupportEnabled() {
|
||||
|
|
|
@ -70,7 +70,6 @@ class App : public ElectronBrowserClient::Delegate,
|
|||
base::FilePath GetAppPath() const;
|
||||
void RenderProcessReady(content::RenderProcessHost* host);
|
||||
void RenderProcessDisconnected(base::ProcessId host_pid);
|
||||
void PreMainMessageLoopRun();
|
||||
|
||||
protected:
|
||||
explicit App(v8::Isolate* isolate);
|
||||
|
@ -88,6 +87,7 @@ class App : public ElectronBrowserClient::Delegate,
|
|||
void OnFinishLaunching(const base::DictionaryValue& launch_info) override;
|
||||
void OnAccessibilitySupportChanged() override;
|
||||
void OnPreMainMessageLoopRun() override;
|
||||
void OnPreCreateThreads() override;
|
||||
#if defined(OS_MACOSX)
|
||||
void OnWillContinueUserActivity(bool* prevent_default,
|
||||
const std::string& type) override;
|
||||
|
@ -240,6 +240,9 @@ class App : public ElectronBrowserClient::Delegate,
|
|||
std::unique_ptr<electron::ProcessMetric>>;
|
||||
ProcessMetricMap app_metrics_;
|
||||
|
||||
bool disable_hw_acceleration_ = false;
|
||||
bool disable_domain_blocking_for_3DAPIs_ = false;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(App);
|
||||
};
|
||||
|
||||
|
|
|
@ -248,7 +248,7 @@ v8::Local<v8::Promise> Cookies::Get(v8::Isolate* isolate,
|
|||
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,
|
||||
|
@ -332,7 +332,7 @@ v8::Local<v8::Promise> Cookies::Set(v8::Isolate* isolate,
|
|||
options.set_include_httponly();
|
||||
}
|
||||
options.set_same_site_cookie_context(
|
||||
net::CookieOptions::SameSiteCookieContext::SAME_SITE_STRICT);
|
||||
net::CookieOptions::SameSiteCookieContext::MakeInclusive());
|
||||
|
||||
auto* storage_partition =
|
||||
content::BrowserContext::GetDefaultStoragePartition(browser_context_);
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "shell/common/gin_helper/dictionary.h"
|
||||
#include "shell/common/gin_helper/object_template_builder.h"
|
||||
#include "shell/common/node_includes.h"
|
||||
#include "ui/base/models/image_model.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
|
@ -142,7 +143,7 @@ void Menu::InsertSubMenuAt(int index,
|
|||
}
|
||||
|
||||
void Menu::SetIcon(int index, const gfx::Image& image) {
|
||||
model_->SetIcon(index, image);
|
||||
model_->SetIcon(index, ui::ImageModel::FromImage(image));
|
||||
}
|
||||
|
||||
void Menu::SetSublabel(int index, const base::string16& sublabel) {
|
||||
|
|
|
@ -89,7 +89,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() {
|
||||
|
|
|
@ -392,7 +392,8 @@ WebContents::WebContents(v8::Isolate* isolate,
|
|||
: content::WebContentsObserver(web_contents),
|
||||
type_(Type::REMOTE),
|
||||
weak_factory_(this) {
|
||||
web_contents->SetUserAgentOverride(GetBrowserContext()->GetUserAgent(),
|
||||
web_contents->SetUserAgentOverride(blink::UserAgentOverride::UserAgentOnly(
|
||||
GetBrowserContext()->GetUserAgent()),
|
||||
false);
|
||||
Init(isolate);
|
||||
AttachAsUserData(web_contents);
|
||||
|
@ -570,7 +571,8 @@ void WebContents::InitWithSessionAndOptions(
|
|||
&WebContents::OnElectronBrowserConnectionError, base::Unretained(this)));
|
||||
AutofillDriverFactory::CreateForWebContents(web_contents());
|
||||
|
||||
web_contents()->SetUserAgentOverride(GetBrowserContext()->GetUserAgent(),
|
||||
web_contents()->SetUserAgentOverride(blink::UserAgentOverride::UserAgentOnly(
|
||||
GetBrowserContext()->GetUserAgent()),
|
||||
false);
|
||||
|
||||
if (IsGuest()) {
|
||||
|
@ -1491,7 +1493,8 @@ void WebContents::LoadURL(const GURL& url,
|
|||
|
||||
std::string user_agent;
|
||||
if (options.Get("userAgent", &user_agent))
|
||||
web_contents()->SetUserAgentOverride(user_agent, false);
|
||||
web_contents()->SetUserAgentOverride(
|
||||
blink::UserAgentOverride::UserAgentOnly(user_agent), false);
|
||||
|
||||
std::string extra_headers;
|
||||
if (options.Get("extraHeaders", &extra_headers))
|
||||
|
@ -1623,11 +1626,12 @@ bool WebContents::IsCrashed() const {
|
|||
|
||||
void WebContents::SetUserAgent(const std::string& user_agent,
|
||||
gin_helper::Arguments* args) {
|
||||
web_contents()->SetUserAgentOverride(user_agent, false);
|
||||
web_contents()->SetUserAgentOverride(
|
||||
blink::UserAgentOverride::UserAgentOnly(user_agent), false);
|
||||
}
|
||||
|
||||
std::string WebContents::GetUserAgent() {
|
||||
return web_contents()->GetUserAgentOverride();
|
||||
return web_contents()->GetUserAgentOverride().ua_string_override;
|
||||
}
|
||||
|
||||
v8::Local<v8::Promise> WebContents::SavePage(
|
||||
|
|
|
@ -145,6 +145,8 @@ void FrameSubscriber::OnFrameCaptured(
|
|||
|
||||
void FrameSubscriber::OnStopped() {}
|
||||
|
||||
void FrameSubscriber::OnLog(const std::string& message) {}
|
||||
|
||||
void FrameSubscriber::Done(const gfx::Rect& damage, const SkBitmap& frame) {
|
||||
if (frame.drawsNothing())
|
||||
return;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#define SHELL_BROWSER_API_FRAME_SUBSCRIBER_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
|
@ -53,6 +54,7 @@ class FrameSubscriber : public content::WebContentsObserver,
|
|||
mojo::PendingRemote<viz::mojom::FrameSinkVideoConsumerFrameCallbacks>
|
||||
callbacks) override;
|
||||
void OnStopped() override;
|
||||
void OnLog(const std::string& message) override;
|
||||
|
||||
void Done(const gfx::Rect& damage, const SkBitmap& frame);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue