Merge pull request #17507 from electron/chromium-upgrade/75
chore: update to chromium 75.0.3740.3
This commit is contained in:
commit
5d45b59f7f
74 changed files with 597 additions and 398 deletions
|
@ -303,8 +303,12 @@ void SetCookieOnIO(scoped_refptr<net::URLRequestContextGetter> getter,
|
|||
EXCLUDE_FAILURE_TO_STORE);
|
||||
return;
|
||||
}
|
||||
net::CookieOptions options;
|
||||
if (http_only) {
|
||||
options.set_include_httponly();
|
||||
}
|
||||
GetCookieStore(getter)->SetCanonicalCookieAsync(
|
||||
std::move(canonical_cookie), url.scheme(), http_only,
|
||||
std::move(canonical_cookie), url.scheme(), options,
|
||||
std::move(completion_callback));
|
||||
}
|
||||
|
||||
|
|
|
@ -830,7 +830,11 @@ bool AtomBrowserClient::HandleExternalProtocol(
|
|||
ui::PageTransition page_transition,
|
||||
bool has_user_gesture,
|
||||
const std::string& method,
|
||||
const net::HttpRequestHeaders& headers) {
|
||||
const net::HttpRequestHeaders& headers,
|
||||
network::mojom::URLLoaderFactoryRequest* factory_request,
|
||||
// clang-format off
|
||||
network::mojom::URLLoaderFactory*& out_factory) { // NOLINT
|
||||
// clang-format on
|
||||
base::PostTaskWithTraits(
|
||||
FROM_HERE, {BrowserThread::UI},
|
||||
base::BindOnce(&HandleExternalProtocolInUI, url, web_contents_getter,
|
||||
|
|
|
@ -172,7 +172,12 @@ class AtomBrowserClient : public content::ContentBrowserClient,
|
|||
ui::PageTransition page_transition,
|
||||
bool has_user_gesture,
|
||||
const std::string& method,
|
||||
const net::HttpRequestHeaders& headers) override;
|
||||
const net::HttpRequestHeaders& headers,
|
||||
network::mojom::URLLoaderFactoryRequest* factory_request,
|
||||
// clang-format off
|
||||
network::mojom::URLLoaderFactory*& out_factory) // NOLINT
|
||||
// clang-format on
|
||||
override;
|
||||
|
||||
private:
|
||||
struct ProcessPreferences {
|
||||
|
|
|
@ -40,6 +40,9 @@ void IOThread::Init() {
|
|||
std::unique_ptr<network::URLRequestContextBuilderMojo> builder =
|
||||
std::make_unique<network::URLRequestContextBuilderMojo>();
|
||||
|
||||
// Enable file:// support.
|
||||
builder->set_file_enabled(true);
|
||||
|
||||
auto cert_verifier = std::make_unique<net::CachingCertVerifier>(
|
||||
std::make_unique<net::MultiThreadedCertVerifier>(
|
||||
net::CertVerifyProc::CreateDefault()));
|
||||
|
|
|
@ -17,6 +17,22 @@
|
|||
- (void)setAppearance:(NSAppearance*)appearance API_AVAILABLE(macosx(10.14));
|
||||
@end
|
||||
|
||||
#if !defined(MAC_OS_X_VERSION_10_13_2)
|
||||
|
||||
// forward declare Touch ID APIs
|
||||
typedef NS_ENUM(NSInteger, LABiometryType) {
|
||||
LABiometryTypeNone = 0,
|
||||
LABiometryTypeFaceID = 1,
|
||||
LABiometryTypeTouchID = 2,
|
||||
} API_AVAILABLE(macosx(10.13.2));
|
||||
|
||||
@interface LAContext (HighSierraPointTwoSDK)
|
||||
@property(nonatomic, readonly)
|
||||
LABiometryType biometryType API_AVAILABLE(macosx(10.13.2));
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
||||
// forward declare Access APIs
|
||||
typedef NSString* AVMediaType NS_EXTENSIBLE_STRING_ENUM;
|
||||
|
||||
|
|
|
@ -80,9 +80,6 @@ NetworkContextService::CreateNetworkContextParams(bool in_memory,
|
|||
network_context_params->enable_ftp_url_support = true;
|
||||
#endif // !BUILDFLAG(DISABLE_FTP_SUPPORT)
|
||||
|
||||
// Needed for PAC scripts that use data URLs.
|
||||
network_context_params->enable_data_url_support = true;
|
||||
|
||||
proxy_config_monitor_.AddToNetworkContextParams(network_context_params.get());
|
||||
|
||||
BrowserProcessImpl::ApplyProxyModeFromCommandLine(
|
||||
|
|
|
@ -249,11 +249,6 @@ SystemNetworkContextManager::CreateNetworkContextParams() {
|
|||
|
||||
network_context_params->http_cache_enabled = false;
|
||||
|
||||
// These are needed for PAC scripts that use file or data URLs (Or FTP URLs?).
|
||||
// TODO(crbug.com/839566): remove file support for all cases.
|
||||
network_context_params->enable_data_url_support = true;
|
||||
if (!base::FeatureList::IsEnabled(network::features::kNetworkService))
|
||||
network_context_params->enable_file_url_support = true;
|
||||
#if !BUILDFLAG(DISABLE_FTP_SUPPORT)
|
||||
network_context_params->enable_ftp_url_support = true;
|
||||
#endif
|
||||
|
|
|
@ -156,8 +156,6 @@ URLRequestContextGetter::Handle::CreateNetworkContextParams() {
|
|||
net::HttpUtil::GenerateAcceptLanguageHeader(
|
||||
AtomBrowserClient::Get()->GetApplicationLocale());
|
||||
|
||||
network_context_params->enable_data_url_support = false;
|
||||
|
||||
if (!browser_context_->IsOffTheRecord()) {
|
||||
auto base_path = browser_context_->GetPath();
|
||||
network_context_params->http_cache_path =
|
||||
|
@ -263,6 +261,10 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
|
|||
if (!url_request_context_) {
|
||||
std::unique_ptr<network::URLRequestContextBuilderMojo> builder =
|
||||
std::make_unique<network::URLRequestContextBuilderMojo>();
|
||||
|
||||
// Enable file:// support.
|
||||
builder->set_file_enabled(true);
|
||||
|
||||
auto network_delegate = std::make_unique<AtomNetworkDelegate>();
|
||||
network_delegate_ = network_delegate.get();
|
||||
builder->set_network_delegate(std::move(network_delegate));
|
||||
|
|
|
@ -134,4 +134,13 @@ void PlatformNotificationService::RecordNotificationUkmEvent(
|
|||
content::BrowserContext* browser_context,
|
||||
const content::NotificationDatabaseData& data) {}
|
||||
|
||||
void PlatformNotificationService::ScheduleTrigger(
|
||||
content::BrowserContext* browser_context,
|
||||
base::Time timestamp) {}
|
||||
|
||||
base::Time PlatformNotificationService::ReadNextTriggerTimestamp(
|
||||
content::BrowserContext* browser_context) {
|
||||
return base::Time::Max();
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
|
|
|
@ -49,6 +49,10 @@ class PlatformNotificationService
|
|||
void RecordNotificationUkmEvent(
|
||||
content::BrowserContext* browser_context,
|
||||
const content::NotificationDatabaseData& data) override;
|
||||
void ScheduleTrigger(content::BrowserContext* browser_context,
|
||||
base::Time timestamp) override;
|
||||
base::Time ReadNextTriggerTimestamp(
|
||||
content::BrowserContext* browser_context) override;
|
||||
|
||||
private:
|
||||
AtomBrowserClient* browser_client_;
|
||||
|
|
|
@ -126,7 +126,7 @@ LRESULT CALLBACK DesktopNotificationController::WndProc(HWND hwnd,
|
|||
}
|
||||
|
||||
void DesktopNotificationController::StartAnimation() {
|
||||
_ASSERT(hwnd_controller_);
|
||||
DCHECK(hwnd_controller_);
|
||||
|
||||
if (!is_animating_ && hwnd_controller_) {
|
||||
// NOTE: 15ms is shorter than what we'd need for 60 fps, but since
|
||||
|
@ -217,7 +217,7 @@ void DesktopNotificationController::AnimateAll() {
|
|||
}
|
||||
|
||||
if (!keep_animating) {
|
||||
_ASSERT(hwnd_controller_);
|
||||
DCHECK(hwnd_controller_);
|
||||
if (hwnd_controller_)
|
||||
KillTimer(hwnd_controller_, TimerID_Animate);
|
||||
is_animating_ = false;
|
||||
|
@ -325,7 +325,7 @@ void DesktopNotificationController::CreateToast(NotificationLink&& data) {
|
|||
int toast_pos = 0;
|
||||
if (!instances_.empty()) {
|
||||
auto& item = instances_.back();
|
||||
_ASSERT(item.hwnd);
|
||||
DCHECK(item.hwnd);
|
||||
|
||||
ScreenMetrics scr;
|
||||
auto* toast = Toast::Get(item.hwnd);
|
||||
|
@ -379,7 +379,7 @@ DesktopNotificationController::Notification::Notification(
|
|||
DesktopNotificationController::Notification::Notification(
|
||||
const shared_ptr<NotificationData>& data)
|
||||
: data_(data) {
|
||||
_ASSERT(data != nullptr);
|
||||
DCHECK(data != nullptr);
|
||||
}
|
||||
|
||||
DesktopNotificationController::Notification::~Notification() = default;
|
||||
|
@ -391,7 +391,7 @@ bool DesktopNotificationController::Notification::operator==(
|
|||
|
||||
void DesktopNotificationController::Notification::Close() {
|
||||
// No business calling this when not pointing to a valid instance
|
||||
_ASSERT(data_);
|
||||
DCHECK(data_);
|
||||
|
||||
if (data_->controller)
|
||||
data_->controller->CloseNotification(*this);
|
||||
|
@ -401,7 +401,7 @@ void DesktopNotificationController::Notification::Set(std::wstring caption,
|
|||
std::wstring body_text,
|
||||
HBITMAP image) {
|
||||
// No business calling this when not pointing to a valid instance
|
||||
_ASSERT(data_);
|
||||
DCHECK(data_);
|
||||
|
||||
// Do nothing when the notification has been closed
|
||||
if (!data_->controller)
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <uxtheme.h>
|
||||
#include <windowsx.h>
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <memory>
|
||||
|
||||
#include "atom/browser/notifications/win/win32_desktop_notifications/common.h"
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
#include "atom/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.h"
|
||||
|
||||
#include "base/logging.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
class DesktopNotificationController::Toast {
|
||||
|
@ -42,7 +44,7 @@ class DesktopNotificationController::Toast {
|
|||
return ease_in_active_ || ease_out_active_ || IsStackCollapseActive();
|
||||
}
|
||||
bool IsHighlighted() const {
|
||||
_ASSERT(!(is_highlighted_ && !IsWindowVisible(hwnd_)));
|
||||
DCHECK(!(is_highlighted_ && !IsWindowVisible(hwnd_)));
|
||||
return is_highlighted_;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ ULONG DesktopNotificationController::Toast::UIAutomationInterface::Release() {
|
|||
delete this;
|
||||
return 0;
|
||||
}
|
||||
_ASSERT(ret > 0);
|
||||
DCHECK_GT(ret, 0);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ DelayedNativeViewHost::DelayedNativeViewHost(gfx::NativeView native_view)
|
|||
DelayedNativeViewHost::~DelayedNativeViewHost() {}
|
||||
|
||||
void DelayedNativeViewHost::ViewHierarchyChanged(
|
||||
const ViewHierarchyChangedDetails& details) {
|
||||
const views::ViewHierarchyChangedDetails& details) {
|
||||
NativeViewHost::ViewHierarchyChanged(details);
|
||||
if (details.is_add && GetWidget())
|
||||
Attach(native_view_);
|
||||
|
|
|
@ -18,7 +18,7 @@ class DelayedNativeViewHost : public views::NativeViewHost {
|
|||
|
||||
// views::View:
|
||||
void ViewHierarchyChanged(
|
||||
const ViewHierarchyChangedDetails& details) override;
|
||||
const views::ViewHierarchyChangedDetails& details) override;
|
||||
|
||||
private:
|
||||
gfx::NativeView native_view_;
|
||||
|
|
|
@ -429,7 +429,7 @@ void InspectableWebContentsImpl::CallClientFunction(
|
|||
}
|
||||
javascript.append(");");
|
||||
GetDevToolsWebContents()->GetMainFrame()->ExecuteJavaScript(
|
||||
base::UTF8ToUTF16(javascript));
|
||||
base::UTF8ToUTF16(javascript), base::NullCallback());
|
||||
}
|
||||
|
||||
gfx::Rect InspectableWebContentsImpl::GetDevToolsBounds() const {
|
||||
|
@ -476,7 +476,8 @@ void InspectableWebContentsImpl::LoadCompleted() {
|
|||
}
|
||||
base::string16 javascript = base::UTF8ToUTF16(
|
||||
"Components.dockController.setDockSide(\"" + dock_state_ + "\");");
|
||||
GetDevToolsWebContents()->GetMainFrame()->ExecuteJavaScript(javascript);
|
||||
GetDevToolsWebContents()->GetMainFrame()->ExecuteJavaScript(
|
||||
javascript, base::NullCallback());
|
||||
}
|
||||
|
||||
if (view_->GetDelegate())
|
||||
|
@ -738,7 +739,8 @@ void InspectableWebContentsImpl::DispatchProtocolMessage(
|
|||
if (message.length() < kMaxMessageChunkSize) {
|
||||
base::string16 javascript =
|
||||
base::UTF8ToUTF16("DevToolsAPI.dispatchMessage(" + message + ");");
|
||||
GetDevToolsWebContents()->GetMainFrame()->ExecuteJavaScript(javascript);
|
||||
GetDevToolsWebContents()->GetMainFrame()->ExecuteJavaScript(
|
||||
javascript, base::NullCallback());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -887,7 +889,8 @@ void InspectableWebContentsImpl::DidFinishNavigation(
|
|||
base::GenerateGUID().c_str());
|
||||
// Invoking content::DevToolsFrontendHost::SetupExtensionsAPI(frame, script);
|
||||
// should be enough, but it seems to be a noop currently.
|
||||
frame->ExecuteJavaScriptForTests(base::UTF8ToUTF16(script));
|
||||
frame->ExecuteJavaScriptForTests(base::UTF8ToUTF16(script),
|
||||
base::NullCallback());
|
||||
}
|
||||
|
||||
void InspectableWebContentsImpl::SendMessageAck(int request_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue