chore: bump chromium to f755b70e34659441e72c1a928a406 (master) (#21000)
This commit is contained in:
parent
a5c9bd53e0
commit
49b47ee4ed
181 changed files with 1117 additions and 1786 deletions
|
@ -697,8 +697,7 @@ void App::AllowCertificateError(
|
|||
const GURL& request_url,
|
||||
bool is_main_frame_request,
|
||||
bool strict_enforcement,
|
||||
const base::RepeatingCallback<void(content::CertificateRequestResultType)>&
|
||||
callback) {
|
||||
base::OnceCallback<void(content::CertificateRequestResultType)> callback) {
|
||||
v8::Locker locker(isolate());
|
||||
v8::HandleScope handle_scope(isolate());
|
||||
bool prevent_default = Emit(
|
||||
|
@ -707,7 +706,7 @@ void App::AllowCertificateError(
|
|||
|
||||
// Deny the certificate by default.
|
||||
if (!prevent_default)
|
||||
callback.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY);
|
||||
std::move(callback).Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY);
|
||||
}
|
||||
|
||||
base::OnceClosure App::SelectClientCertificate(
|
||||
|
|
|
@ -114,8 +114,8 @@ class App : public AtomBrowserClient::Delegate,
|
|||
const GURL& request_url,
|
||||
bool is_main_frame_request,
|
||||
bool strict_enforcement,
|
||||
const base::RepeatingCallback<
|
||||
void(content::CertificateRequestResultType)>& callback) override;
|
||||
base::OnceCallback<void(content::CertificateRequestResultType)> callback)
|
||||
override;
|
||||
base::OnceClosure SelectClientCertificate(
|
||||
content::WebContents* web_contents,
|
||||
net::SSLCertRequestInfo* cert_request_info,
|
||||
|
|
|
@ -243,7 +243,7 @@ void BrowserWindow::OnCloseButtonClicked(bool* prevent_default) {
|
|||
// Already closed by renderer
|
||||
return;
|
||||
|
||||
if (web_contents()->NeedToFireBeforeUnload())
|
||||
if (web_contents()->NeedToFireBeforeUnloadOrUnload())
|
||||
web_contents()->DispatchBeforeUnload(false /* auto_cancel */);
|
||||
else
|
||||
web_contents()->Close();
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "base/bind_helpers.h"
|
||||
#include "base/task/post_task.h"
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
#include "content/public/common/service_manager_connection.h"
|
||||
#include "content/public/browser/system_connector.h"
|
||||
#include "gin/dictionary.h"
|
||||
#include "gin/function_template.h"
|
||||
#include "services/device/public/mojom/constants.mojom.h"
|
||||
|
@ -87,17 +87,16 @@ void PowerSaveBlocker::UpdatePowerSaveBlocker() {
|
|||
|
||||
device::mojom::WakeLock* PowerSaveBlocker::GetWakeLock() {
|
||||
if (!wake_lock_) {
|
||||
device::mojom::WakeLockProviderPtr wake_lock_provider;
|
||||
DCHECK(content::ServiceManagerConnection::GetForProcess());
|
||||
auto* connector =
|
||||
content::ServiceManagerConnection::GetForProcess()->GetConnector();
|
||||
connector->BindInterface(device::mojom::kServiceName,
|
||||
mojo::MakeRequest(&wake_lock_provider));
|
||||
mojo::Remote<device::mojom::WakeLockProvider> wake_lock_provider;
|
||||
DCHECK(content::GetSystemConnector());
|
||||
content::GetSystemConnector()->Connect(
|
||||
device::mojom::kServiceName,
|
||||
wake_lock_provider.BindNewPipeAndPassReceiver());
|
||||
|
||||
wake_lock_provider->GetWakeLockWithoutContext(
|
||||
device::mojom::WakeLockType::kPreventAppSuspension,
|
||||
device::mojom::WakeLockReason::kOther, ELECTRON_PRODUCT_NAME,
|
||||
mojo::MakeRequest(&wake_lock_));
|
||||
wake_lock_.BindNewPipeAndPassReceiver());
|
||||
}
|
||||
return wake_lock_.get();
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "gin/handle.h"
|
||||
#include "gin/object_template_builder.h"
|
||||
#include "gin/wrappable.h"
|
||||
#include "mojo/public/cpp/bindings/remote.h"
|
||||
#include "services/device/public/mojom/wake_lock.mojom.h"
|
||||
|
||||
namespace electron {
|
||||
|
@ -49,7 +50,7 @@ class PowerSaveBlocker : public gin::Wrappable<PowerSaveBlocker> {
|
|||
using WakeLockTypeMap = std::map<int, device::mojom::WakeLockType>;
|
||||
WakeLockTypeMap wake_lock_types_;
|
||||
|
||||
device::mojom::WakeLockPtr wake_lock_;
|
||||
mojo::Remote<device::mojom::WakeLock> wake_lock_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(PowerSaveBlocker);
|
||||
};
|
||||
|
|
|
@ -91,7 +91,7 @@ namespace predictors {
|
|||
// error. Probably upstream the constructor should be moved to
|
||||
// preconnect_manager.cc.
|
||||
PreconnectRequest::PreconnectRequest(
|
||||
const GURL& origin,
|
||||
const url::Origin& origin,
|
||||
int num_sockets,
|
||||
const net::NetworkIsolationKey& network_isolation_key)
|
||||
: origin(origin),
|
||||
|
@ -553,7 +553,7 @@ void Session::DownloadURL(const GURL& url) {
|
|||
auto* download_manager =
|
||||
content::BrowserContext::GetDownloadManager(browser_context());
|
||||
auto download_params = std::make_unique<download::DownloadUrlParameters>(
|
||||
url, MISSING_TRAFFIC_ANNOTATION);
|
||||
url, MISSING_TRAFFIC_ANNOTATION, net::NetworkIsolationKey());
|
||||
download_manager->DownloadUrl(std::move(download_params));
|
||||
}
|
||||
|
||||
|
@ -642,7 +642,8 @@ static void StartPreconnectOnUI(
|
|||
const GURL& url,
|
||||
int num_sockets_to_preconnect) {
|
||||
std::vector<predictors::PreconnectRequest> requests = {
|
||||
{url.GetOrigin(), num_sockets_to_preconnect, net::NetworkIsolationKey()}};
|
||||
{url::Origin::Create(url), num_sockets_to_preconnect,
|
||||
net::NetworkIsolationKey()}};
|
||||
browser_context->GetPreconnectManager()->Start(url, requests);
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,9 @@ class BufferDataSource : public mojo::DataPipeProducer::DataSource {
|
|||
size_t readable_size = buffer_.size() - offset;
|
||||
size_t writable_size = buffer.size();
|
||||
size_t copyable_size = std::min(readable_size, writable_size);
|
||||
memcpy(buffer.data(), &buffer_[offset], copyable_size);
|
||||
if (copyable_size > 0) {
|
||||
memcpy(buffer.data(), &buffer_[offset], copyable_size);
|
||||
}
|
||||
result.bytes_read = copyable_size;
|
||||
} else {
|
||||
NOTREACHED();
|
||||
|
|
|
@ -1868,7 +1868,8 @@ void WebContents::Print(gin_helper::Arguments* args) {
|
|||
|
||||
std::vector<printing::PrinterBasicInfo> WebContents::GetPrinterList() {
|
||||
std::vector<printing::PrinterBasicInfo> printers;
|
||||
auto print_backend = printing::PrintBackend::CreateInstance(nullptr);
|
||||
auto print_backend = printing::PrintBackend::CreateInstance(
|
||||
nullptr, g_browser_process->GetApplicationLocale());
|
||||
{
|
||||
// TODO(deepak1556): Deprecate this api in favor of an
|
||||
// async version and post a non blocing task call.
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
#include "content/public/browser/keyboard_event_processing_result.h"
|
||||
#include "content/public/browser/render_widget_host.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "content/public/browser/web_contents_binding_set.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"
|
||||
#include "mojo/public/cpp/bindings/binding_set.h"
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
#include "services/service_manager/public/cpp/binder_registry.h"
|
||||
#include "shell/browser/api/frame_subscriber.h"
|
||||
|
|
|
@ -35,6 +35,11 @@ void GPUInfoEnumerator::AddTimeDeltaInSecondsF(const char* name,
|
|||
current->SetInteger(name, value.InMilliseconds());
|
||||
}
|
||||
|
||||
void GPUInfoEnumerator::AddBinary(const char* name,
|
||||
const base::span<const uint8_t>& value) {
|
||||
current->Set(name, std::make_unique<base::Value>(value));
|
||||
}
|
||||
|
||||
void GPUInfoEnumerator::BeginGPUDevice() {
|
||||
value_stack.push(std::move(current));
|
||||
current = std::make_unique<base::DictionaryValue>();
|
||||
|
|
|
@ -36,6 +36,8 @@ class GPUInfoEnumerator final : public gpu::GPUInfo::Enumerator {
|
|||
void AddBool(const char* name, bool value) override;
|
||||
void AddTimeDeltaInSecondsF(const char* name,
|
||||
const base::TimeDelta& value) override;
|
||||
void AddBinary(const char* name,
|
||||
const base::span<const uint8_t>& value) override;
|
||||
void BeginGPUDevice() override;
|
||||
void EndGPUDevice() override;
|
||||
void BeginVideoDecodeAcceleratorSupportedProfile() override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue