chore: bump chromium to 1e9f9a24aa12 (master) (#17880)

* chore: bump chromium in DEPS to 1e9f9a24aa12bea9cf194a82a7e249bd1242ec4f

* chore: update patches

* Make WebContents' theme color a base::Optional<SkColor>

1540022

* update autofill patch for incorrect header includes

* Move Shell messages to web_test and rename to BlinkTest.

1525181

* Make PlatformNotificationServiceImpl a KeyedService.

1336150

* Move MediaPlayerId to its own file.

1547057

* Remove net/base/completion_callback.h, which is no longer used

1552821

* AW NS: support file scheme cookies

1533486

* Remove SecurityInfo and adapt remaining consumers

1509455

* Remove deprecated type-specific number to string conversion functions

1545881

* DevTools: Adding new performance histograms for launch of top 4 tools

1506388

* Update include paths for //base/hash/hash.h

1544630

* build: Disable ensure_gn_version gclient hook for mac CI checkout

* update patches

* use maybe version of v8::String::NewFromTwoByte

* bump appveyor image version

* fix mac ci hopefully

* Convert enum to enum class for MenuAnchorPosition

1530508

* use maybe version of ToObject

* RenderViewHost::GetProcess is no longer const

* Unrefcount AuthChallengeInfo

1550631

* MenuButtonController takes Button rather than MenuButton

1500935

* add //ui/views_bridge_mac to deps to fix link error

* forward declare views::Button in atom::MenuDelegate

* more v8 patches

* base/{=> hash}/md5.h

1535124

* gfx::{PlatformFontWin => win}::*

1534178

* fix v8 patches

* [base] Rename TaskScheduler to ThreadPool

1561552

* use internal_config_base for bytecode_builtins_list_generator

avoids windows link errors

* FIXME: temporarily disable v8/breakpad integration

* FIXME: temporarily disable prevent-will-redirect test

* FIXME: disable neon on aarch64 pending crbug.com/953815

* update to account for WebCursor refactor

1562755

* enable stack dumping on appveyor

* Revert "FIXME: disable neon on aarch64 pending crbug.com/953815"

This reverts commit 57f082026be3d83069f2a2814684abf4dc9e7b53.

* fix: remove const qualifiers to match upstream

* fix: remove const qualifiers to match upstream in cc files as well

* don't throw an error when testing if an object is an object

* use non-deprecated Buffer constructor

* Remove net::CookieSameSite::DEFAULT_MODE enum value

1567955

* depend on modded dbus-native to work around buffer deprecation

https://github.com/sidorares/dbus-native/pull/262

* revert clang roll to fix arm build on linux

* fixup! depend on modded dbus-native to work around buffer deprecation

need more coffee

* update coffee-script

* robustify verify-mksnapshot w.r.t. command-line parameters

* Revert "robustify verify-mksnapshot w.r.t. command-line parameters"

This reverts commit a49af01411f684f6025528d604895c3696e0bc57.

* fix mksnapshot by matching args

* update patches

* TMP: enable rdp on appveyor

* Changed ContentBrowserClient::CreateQuotaPermissionContext() to return scoped_refptr.

1569376

* Make content::ResourceType an enum class.

1569345

* fixup! Make content::ResourceType an enum class.

* turn off rdp

* use net::CompletionRepeatingCallback instead of base::Callback<void(int)>

* remove disable_ensure_gn_version_gclient_hook.patch

* copy repeating callback instead of std::move

* fix lint

* add completion_repeating_callback.h include
This commit is contained in:
Electron Bot 2019-04-20 13:20:37 -04:00 committed by Jeremy Apthorp
parent ab009bba26
commit 716cb28430
126 changed files with 1267 additions and 621 deletions

View file

@ -672,7 +672,7 @@ void App::OnLogin(scoped_refptr<LoginHandler> login_handler,
if (web_contents) {
prevent_default = Emit(
"login", WebContents::FromOrCreate(isolate(), web_contents),
request_details, login_handler->auth_info(),
request_details, *login_handler->auth_info(),
base::Bind(&PassLoginInformation, base::RetainedRef(login_handler)));
}
@ -1056,7 +1056,7 @@ Browser::LoginItemSettings App::GetLoginItemSettings(mate::Arguments* args) {
#if defined(USE_NSS_CERTS)
void App::ImportCertificate(const base::DictionaryValue& options,
const net::CompletionCallback& callback) {
net::CompletionRepeatingCallback callback) {
auto browser_context = AtomBrowserContext::From("", false);
if (!certificate_manager_model_) {
auto copy = base::DictionaryValue::From(
@ -1069,17 +1069,17 @@ void App::ImportCertificate(const base::DictionaryValue& options,
}
int rv = ImportIntoCertStore(certificate_manager_model_.get(), options);
callback.Run(rv);
std::move(callback).Run(rv);
}
void App::OnCertificateManagerModelCreated(
std::unique_ptr<base::DictionaryValue> options,
const net::CompletionCallback& callback,
net::CompletionOnceCallback callback,
std::unique_ptr<CertificateManagerModel> model) {
certificate_manager_model_ = std::move(model);
int rv =
ImportIntoCertStore(certificate_manager_model_.get(), *(options.get()));
callback.Run(rv);
std::move(callback).Run(rv);
}
#endif

View file

@ -27,7 +27,8 @@
#include "content/public/browser/render_process_host.h"
#include "native_mate/dictionary.h"
#include "native_mate/handle.h"
#include "net/base/completion_callback.h"
#include "net/base/completion_once_callback.h"
#include "net/base/completion_repeating_callback.h"
#include "net/ssl/client_cert_identity.h"
#if defined(USE_NSS_CERTS)
@ -78,7 +79,7 @@ class App : public AtomBrowserClient::Delegate,
#if defined(USE_NSS_CERTS)
void OnCertificateManagerModelCreated(
std::unique_ptr<base::DictionaryValue> options,
const net::CompletionCallback& callback,
net::CompletionOnceCallback callback,
std::unique_ptr<CertificateManagerModel> model);
#endif
@ -199,7 +200,7 @@ class App : public AtomBrowserClient::Delegate,
Browser::LoginItemSettings GetLoginItemSettings(mate::Arguments* args);
#if defined(USE_NSS_CERTS)
void ImportCertificate(const base::DictionaryValue& options,
const net::CompletionCallback& callback);
net::CompletionRepeatingCallback callback);
#endif
v8::Local<v8::Promise> GetFileIcon(const base::FilePath& path,
mate::Arguments* args);

View file

@ -283,7 +283,7 @@ void SetCookieOnIO(scoped_refptr<net::URLRequestContextGetter> getter,
net::CanonicalCookie::CreateSanitizedCookie(
url, name, value, domain, path, creation_time, expiration_time,
last_access_time, secure, http_only,
net::CookieSameSite::DEFAULT_MODE, net::COOKIE_PRIORITY_DEFAULT));
net::CookieSameSite::NO_RESTRICTION, net::COOKIE_PRIORITY_DEFAULT));
auto completion_callback = base::BindOnce(OnSetCookie, std::move(promise));
if (!canonical_cookie || !canonical_cookie->IsCanonical()) {
std::move(completion_callback)

View file

@ -176,13 +176,13 @@ void DesktopCapturer::UpdateSourcesList(DesktopMediaList* list) {
const int64_t device_id =
display::win::DisplayInfo::DeviceIdFromDeviceName(
wide_device_name.c_str());
source.display_id = base::Int64ToString(device_id);
source.display_id = base::NumberToString(device_id);
}
}
#elif defined(OS_MACOSX)
// On Mac, the IDs across the APIs match.
for (auto& source : screen_sources) {
source.display_id = base::Int64ToString(source.media_list_source.id.id);
source.display_id = base::NumberToString(source.media_list_source.id.id);
}
#endif // defined(OS_WIN)
// TODO(ajmacd): Add Linux support. The IDs across APIs differ but Chrome

View file

@ -52,7 +52,7 @@ void MenuViews::PopupAt(TopLevelWindow* window,
std::make_unique<MenuRunner>(model(), flags, close_callback);
menu_runners_[window_id]->RunMenuAt(
native_window->widget(), NULL, gfx::Rect(location, gfx::Size()),
views::MENU_ANCHOR_TOPLEFT, ui::MENU_SOURCE_MOUSE);
views::MenuAnchorPosition::kTopLeft, ui::MENU_SOURCE_MOUSE);
}
void MenuViews::ClosePopupAt(int32_t window_id) {

View file

@ -48,6 +48,7 @@
#include "content/public/browser/storage_partition.h"
#include "native_mate/dictionary.h"
#include "native_mate/object_template_builder.h"
#include "net/base/completion_repeating_callback.h"
#include "net/base/load_flags.h"
#include "net/disk_cache/disk_cache.h"
#include "net/dns/host_cache.h" // nogncheck
@ -268,7 +269,7 @@ void DoCacheActionInIO(
// Call GetBackend and make the backend's ptr accessable in OnGetBackend.
using BackendPtr = disk_cache::Backend*;
auto** backend_ptr = new BackendPtr(nullptr);
net::CompletionCallback on_get_backend =
net::CompletionRepeatingCallback on_get_backend =
base::Bind(&OnGetBackend, base::Owned(backend_ptr), action,
util::CopyablePromise(promise));
int rv = http_cache->GetBackend(backend_ptr, on_get_backend);
@ -365,8 +366,9 @@ void DestroyGlobalHandle(v8::Isolate* isolate,
v8::HandleScope handle_scope(isolate);
if (!global_handle.IsEmpty()) {
v8::Local<v8::Value> local_handle = global_handle.Get(isolate);
if (local_handle->IsObject()) {
v8::Local<v8::Object> object = local_handle->ToObject(isolate);
v8::Local<v8::Object> object;
if (local_handle->IsObject() &&
local_handle->ToObject(isolate->GetCurrentContext()).ToLocal(&object)) {
void* ptr = object->GetAlignedPointerFromInternalField(0);
if (!ptr)
return;

View file

@ -15,7 +15,6 @@
#include "base/values.h"
#include "content/public/browser/download_manager.h"
#include "native_mate/handle.h"
#include "net/base/completion_callback.h"
class GURL;

View file

@ -648,10 +648,11 @@ void TopLevelWindow::SetFocusable(bool focusable) {
}
void TopLevelWindow::SetMenu(v8::Isolate* isolate, v8::Local<v8::Value> value) {
auto context = isolate->GetCurrentContext();
mate::Handle<Menu> menu;
if (value->IsObject() &&
gin::V8ToString(
isolate, value->ToObject(isolate)->GetConstructorName()) == "Menu" &&
v8::Local<v8::Object> object;
if (value->IsObject() && value->ToObject(context).ToLocal(&object) &&
gin::V8ToString(isolate, object->GetConstructorName()) == "Menu" &&
mate::ConvertFromV8(isolate, value, &menu) && !menu.IsEmpty()) {
menu_.Reset(isolate, menu.ToV8());
window_->SetMenu(menu->model());

View file

@ -354,7 +354,7 @@ void URLRequest::OnReceivedRedirect(
}
void URLRequest::OnAuthenticationRequired(
scoped_refptr<const net::AuthChallengeInfo> auth_info) {
const net::AuthChallengeInfo& auth_info) {
if (request_state_.Canceled() || request_state_.Closed()) {
return;
}
@ -364,7 +364,7 @@ void URLRequest::OnAuthenticationRequired(
return;
}
Emit("login", auth_info.get(),
Emit("login", auth_info,
base::Bind(&AtomURLRequest::PassLoginInformation, atom_request_));
}

View file

@ -105,8 +105,7 @@ class URLRequest : public mate::EventEmitter<URLRequest> {
const std::string& method,
const GURL& url,
scoped_refptr<net::HttpResponseHeaders> response_headers);
void OnAuthenticationRequired(
scoped_refptr<const net::AuthChallengeInfo> auth_info);
void OnAuthenticationRequired(const net::AuthChallengeInfo& auth_info);
void OnResponseStarted(
scoped_refptr<net::HttpResponseHeaders> response_headers);
void OnResponseData(scoped_refptr<const net::IOBufferWithSize> data);

View file

@ -86,6 +86,7 @@
#include "net/url_request/url_request_context.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
#include "third_party/blink/public/mojom/frame/find_in_page.mojom.h"
#include "third_party/blink/public/platform/web_cursor_info.h"
#include "third_party/blink/public/platform/web_input_event.h"
#include "ui/display/screen.h"
#include "ui/events/base_event_utils.h"
@ -807,20 +808,20 @@ void WebContents::PluginCrashed(const base::FilePath& plugin_path,
}
void WebContents::MediaStartedPlaying(const MediaPlayerInfo& video_type,
const MediaPlayerId& id) {
const content::MediaPlayerId& id) {
Emit("media-started-playing");
}
void WebContents::MediaStoppedPlaying(
const MediaPlayerInfo& video_type,
const MediaPlayerId& id,
const content::MediaPlayerId& id,
content::WebContentsObserver::MediaStoppedReason reason) {
Emit("media-paused");
}
void WebContents::DidChangeThemeColor(SkColor theme_color) {
if (theme_color != SK_ColorTRANSPARENT) {
Emit("did-change-theme-color", atom::ToRGBHex(theme_color));
void WebContents::DidChangeThemeColor(base::Optional<SkColor> theme_color) {
if (theme_color) {
Emit("did-change-theme-color", atom::ToRGBHex(theme_color.value()));
} else {
Emit("did-change-theme-color", nullptr);
}
@ -1192,7 +1193,7 @@ void WebContents::SetBackgroundThrottling(bool allowed) {
return;
}
const auto* render_view_host = contents->GetRenderViewHost();
auto* render_view_host = contents->GetRenderViewHost();
if (!render_view_host) {
return;
}
@ -1915,10 +1916,9 @@ v8::Local<v8::Promise> WebContents::CapturePage(mate::Arguments* args) {
}
void WebContents::OnCursorChange(const content::WebCursor& cursor) {
content::CursorInfo info;
cursor.GetCursorInfo(&info);
const content::CursorInfo& info = cursor.info();
if (cursor.IsCustom()) {
if (info.type == blink::WebCursorInfo::kTypeCustom) {
Emit("cursor-changed", CursorTypeToString(info),
gfx::Image::CreateFrom1xBitmap(info.custom_image),
info.image_scale_factor,

View file

@ -445,12 +445,12 @@ class WebContents : public mate::TrackableObject<WebContents>,
void PluginCrashed(const base::FilePath& plugin_path,
base::ProcessId plugin_pid) override;
void MediaStartedPlaying(const MediaPlayerInfo& video_type,
const MediaPlayerId& id) override;
const content::MediaPlayerId& id) override;
void MediaStoppedPlaying(
const MediaPlayerInfo& video_type,
const MediaPlayerId& id,
const content::MediaPlayerId& id,
content::WebContentsObserver::MediaStoppedReason reason) override;
void DidChangeThemeColor(SkColor theme_color) override;
void DidChangeThemeColor(base::Optional<SkColor> theme_color) override;
void OnInterfaceRequestFromFrame(
content::RenderFrameHost* render_frame_host,
const std::string& interface_name,

View file

@ -534,7 +534,7 @@ std::string AtomBrowserClient::GetGeolocationApiKey() {
return api_key;
}
content::QuotaPermissionContext*
scoped_refptr<content::QuotaPermissionContext>
AtomBrowserClient::CreateQuotaPermissionContext() {
return new AtomQuotaPermissionContext;
}
@ -867,7 +867,8 @@ NotificationPresenter* AtomBrowserClient::GetNotificationPresenter() {
}
content::PlatformNotificationService*
AtomBrowserClient::GetPlatformNotificationService() {
AtomBrowserClient::GetPlatformNotificationService(
content::BrowserContext* browser_context) {
if (!notification_service_) {
notification_service_.reset(new PlatformNotificationService(this));
}

View file

@ -90,7 +90,8 @@ class AtomBrowserClient : public content::ContentBrowserClient,
base::CommandLine* command_line) override;
void DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host) override;
std::string GetGeolocationApiKey() override;
content::QuotaPermissionContext* CreateQuotaPermissionContext() override;
scoped_refptr<content::QuotaPermissionContext> CreateQuotaPermissionContext()
override;
content::GeneratedCodeCacheSettings GetGeneratedCodeCacheSettings(
content::BrowserContext* context) override;
void AllowCertificateError(
@ -144,8 +145,8 @@ class AtomBrowserClient : public content::ContentBrowserClient,
net::NetLog* GetNetLog() override;
content::MediaObserver* GetMediaObserver() override;
content::DevToolsManagerDelegate* GetDevToolsManagerDelegate() override;
content::PlatformNotificationService* GetPlatformNotificationService()
override;
content::PlatformNotificationService* GetPlatformNotificationService(
content::BrowserContext* browser_context) override;
content::BrowserMainParts* CreateBrowserMainParts(
const content::MainFunctionParams&) override;
base::FilePath GetDefaultDownloadDirectory() override;

View file

@ -76,7 +76,7 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/l10n_util_win.h"
#include "ui/display/win/dpi.h"
#include "ui/gfx/platform_font_win.h"
#include "ui/gfx/system_fonts_win.h"
#include "ui/strings/grit/app_locale_settings.h"
#endif
@ -102,7 +102,7 @@ void Erase(T* container, typename T::iterator iter) {
#if defined(OS_WIN)
// gfx::Font callbacks
void AdjustUIFont(gfx::PlatformFontWin::FontAdjustment* font_adjustment) {
void AdjustUIFont(gfx::win::FontAdjustment* font_adjustment) {
l10n_util::NeedOverrideDefaultUIFont(&font_adjustment->font_family_override,
&font_adjustment->font_scale);
font_adjustment->font_scale *= display::win::GetAccessibilityFontScale();
@ -380,8 +380,8 @@ void AtomBrowserMainParts::ToolkitInitialized() {
#endif
#if defined(OS_WIN)
gfx::PlatformFontWin::SetAdjustFontCallback(&AdjustUIFont);
gfx::PlatformFontWin::SetGetMinimumFontSizeCallback(&GetMinimumFontSize);
gfx::win::SetAdjustFontCallback(&AdjustUIFont);
gfx::win::SetGetMinimumFontSizeCallback(&GetMinimumFontSize);
wchar_t module_name[MAX_PATH] = {0};
if (GetModuleFileName(NULL, module_name, MAX_PATH))

View file

@ -131,7 +131,7 @@ bool Browser::IsDefaultProtocolClient(const std::string& protocol,
void Browser::SetAppUserModelID(const base::string16& name) {}
bool Browser::SetBadgeCount(int count) {
DockSetBadgeText(count != 0 ? base::IntToString(count) : "");
DockSetBadgeText(count != 0 ? base::NumberToString(count) : "");
badge_count_ = count;
return true;
}

View file

@ -352,9 +352,8 @@ blink::WebSecurityStyle CommonWebContentsDelegate::GetSecurityStyle(
SecurityStateTabHelper* helper =
SecurityStateTabHelper::FromWebContents(web_contents);
DCHECK(helper);
security_state::SecurityInfo security_info;
helper->GetSecurityInfo(&security_info);
return security_state::GetSecurityStyle(security_info,
return security_state::GetSecurityStyle(helper->GetSecurityLevel(),
*helper->GetVisibleSecurityState(),
security_style_explanations);
}

View file

@ -70,5 +70,5 @@ void IOThread::CleanUp() {
system_request_context_->proxy_resolution_service()->OnShutdown();
if (net_log_)
net_log_->ShutDownBeforeTaskScheduler();
net_log_->ShutDownBeforeThreadPool();
}

View file

@ -10,7 +10,7 @@
#include "atom/common/node_includes.h"
#include "base/command_line.h"
#include "base/message_loop/message_loop.h"
#include "base/task/task_scheduler/initialization_util.h"
#include "base/task/thread_pool/initialization_util.h"
#include "base/threading/thread_task_runner_handle.h"
#include "content/public/common/content_switches.h"
#include "gin/array_buffer.h"

View file

@ -26,7 +26,7 @@ LoginHandler::LoginHandler(net::URLRequest* request,
net::AuthCredentials* credentials,
content::ResourceRequestInfo* resource_request_info)
: credentials_(credentials),
auth_info_(&auth_info),
auth_info_(std::make_unique<net::AuthChallengeInfo>(auth_info)),
auth_callback_(std::move(callback)),
weak_factory_(this) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);

View file

@ -5,6 +5,8 @@
#ifndef ATOM_BROWSER_LOGIN_HANDLER_H_
#define ATOM_BROWSER_LOGIN_HANDLER_H_
#include <memory>
#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
@ -57,7 +59,7 @@ class LoginHandler : public base::RefCountedThreadSafe<LoginHandler> {
net::AuthCredentials* credentials_;
// Who/where/what asked for the authentication.
scoped_refptr<const net::AuthChallengeInfo> auth_info_;
std::unique_ptr<const net::AuthChallengeInfo> auth_info_;
// WebContents associated with the login request.
content::ResourceRequestInfo::WebContentsGetter web_contents_getter_;

View file

@ -29,19 +29,19 @@ namespace atom {
const char* ResourceTypeToString(content::ResourceType type) {
switch (type) {
case content::RESOURCE_TYPE_MAIN_FRAME:
case content::ResourceType::kMainFrame:
return "mainFrame";
case content::RESOURCE_TYPE_SUB_FRAME:
case content::ResourceType::kSubFrame:
return "subFrame";
case content::RESOURCE_TYPE_STYLESHEET:
case content::ResourceType::kStylesheet:
return "stylesheet";
case content::RESOURCE_TYPE_SCRIPT:
case content::ResourceType::kScript:
return "script";
case content::RESOURCE_TYPE_IMAGE:
case content::ResourceType::kImage:
return "image";
case content::RESOURCE_TYPE_OBJECT:
case content::ResourceType::kObject:
return "object";
case content::RESOURCE_TYPE_XHR:
case content::ResourceType::kXhr:
return "xhr";
default:
return "other";

View file

@ -347,13 +347,13 @@ void AtomURLRequest::OnReceivedRedirect(net::URLRequest* request,
}
void AtomURLRequest::OnAuthRequired(net::URLRequest* request,
net::AuthChallengeInfo* auth_info) {
const net::AuthChallengeInfo& auth_info) {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
base::PostTaskWithTraits(
FROM_HERE, {content::BrowserThread::UI},
base::BindOnce(&AtomURLRequest::InformDelegateAuthenticationRequired,
this, scoped_refptr<net::AuthChallengeInfo>(auth_info)));
this, auth_info));
}
void AtomURLRequest::OnResponseStarted(net::URLRequest* request,
@ -468,7 +468,7 @@ void AtomURLRequest::InformDelegateReceivedRedirect(
}
void AtomURLRequest::InformDelegateAuthenticationRequired(
scoped_refptr<net::AuthChallengeInfo> auth_info) const {
const net::AuthChallengeInfo& auth_info) const {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (delegate_)
delegate_->OnAuthenticationRequired(auth_info);

View file

@ -53,7 +53,7 @@ class AtomURLRequest : public base::RefCountedThreadSafe<AtomURLRequest>,
const net::RedirectInfo& info,
bool* defer_redirect) override;
void OnAuthRequired(net::URLRequest* request,
net::AuthChallengeInfo* auth_info) override;
const net::AuthChallengeInfo& auth_info) override;
void OnResponseStarted(net::URLRequest* request, int net_error) override;
void OnReadCompleted(net::URLRequest* request, int bytes_read) override;
@ -93,7 +93,7 @@ class AtomURLRequest : public base::RefCountedThreadSafe<AtomURLRequest>,
const GURL& url,
scoped_refptr<net::HttpResponseHeaders> response_headers) const;
void InformDelegateAuthenticationRequired(
scoped_refptr<net::AuthChallengeInfo> auth_info) const;
const net::AuthChallengeInfo& auth_info) const;
void InformDelegateResponseStarted(
scoped_refptr<net::HttpResponseHeaders>) const;
void InformDelegateResponseData(

View file

@ -122,7 +122,7 @@ void URLRequestBufferJob::Kill() {
void URLRequestBufferJob::GetResponseInfo(net::HttpResponseInfo* info) {
std::string status("HTTP/1.1 ");
status.append(base::IntToString(status_code_));
status.append(base::NumberToString(status_code_));
status.append(" ");
status.append(net::GetHttpReasonPhrase(status_code_));
status.append("\0\0", 2);

View file

@ -296,7 +296,7 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
const auto& custom_standard_schemes = atom::api::GetStandardSchemes();
cookie_schemes.insert(cookie_schemes.end(), custom_standard_schemes.begin(),
custom_standard_schemes.end());
cookie_monster->SetCookieableSchemes(cookie_schemes);
cookie_monster->SetCookieableSchemes(cookie_schemes, base::NullCallback());
// Setup handlers for custom job factory.
top_job_factory_.reset(new AtomURLRequestJobFactory);

View file

@ -48,7 +48,7 @@ void BeforeStartInUI(base::WeakPtr<URLRequestStreamJob> job,
status_code = 200;
}
std::string status("HTTP/1.1 ");
status.append(base::IntToString(status_code));
status.append(base::NumberToString(status_code));
status.append(" ");
status.append(
net::GetHttpReasonPhrase(static_cast<net::HttpStatusCode>(status_code)));

View file

@ -79,7 +79,6 @@ PlatformNotificationService::~PlatformNotificationService() {}
void PlatformNotificationService::DisplayNotification(
content::RenderProcessHost* render_process_host,
content::BrowserContext* browser_context,
const std::string& notification_id,
const GURL& origin,
const blink::PlatformNotificationData& notification_data,
@ -100,7 +99,6 @@ void PlatformNotificationService::DisplayNotification(
}
void PlatformNotificationService::DisplayPersistentNotification(
content::BrowserContext* browser_context,
const std::string& notification_id,
const GURL& service_worker_scope,
const GURL& origin,
@ -108,11 +106,9 @@ void PlatformNotificationService::DisplayPersistentNotification(
const blink::NotificationResources& notification_resources) {}
void PlatformNotificationService::ClosePersistentNotification(
content::BrowserContext* browser_context,
const std::string& notification_id) {}
void PlatformNotificationService::CloseNotification(
content::BrowserContext* browser_context,
const std::string& notification_id) {
auto* presenter = browser_client_->GetNotificationPresenter();
if (!presenter)
@ -121,25 +117,19 @@ void PlatformNotificationService::CloseNotification(
}
void PlatformNotificationService::GetDisplayedNotifications(
content::BrowserContext* browser_context,
DisplayedNotificationsCallback callback) {}
int64_t PlatformNotificationService::ReadNextPersistentNotificationId(
content::BrowserContext* browser_context) {
int64_t PlatformNotificationService::ReadNextPersistentNotificationId() {
// Electron doesn't support persistent notifications.
return 0;
}
void PlatformNotificationService::RecordNotificationUkmEvent(
content::BrowserContext* browser_context,
const content::NotificationDatabaseData& data) {}
void PlatformNotificationService::ScheduleTrigger(
content::BrowserContext* browser_context,
base::Time timestamp) {}
void PlatformNotificationService::ScheduleTrigger(base::Time timestamp) {}
base::Time PlatformNotificationService::ReadNextTriggerTimestamp(
content::BrowserContext* browser_context) {
base::Time PlatformNotificationService::ReadNextTriggerTimestamp() {
return base::Time::Max();
}

View file

@ -8,7 +8,6 @@
#include <set>
#include <string>
#include "content/public/browser/browser_context.h"
#include "content/public/browser/platform_notification_service.h"
namespace atom {
@ -25,34 +24,25 @@ class PlatformNotificationService
// content::PlatformNotificationService:
void DisplayNotification(
content::RenderProcessHost* render_process_host,
content::BrowserContext* browser_context,
const std::string& notification_id,
const GURL& origin,
const blink::PlatformNotificationData& notification_data,
const blink::NotificationResources& notification_resources) override;
void DisplayPersistentNotification(
content::BrowserContext* browser_context,
const std::string& notification_id,
const GURL& service_worker_scope,
const GURL& origin,
const blink::PlatformNotificationData& notification_data,
const blink::NotificationResources& notification_resources) override;
void ClosePersistentNotification(content::BrowserContext* browser_context,
const std::string& notification_id) override;
void CloseNotification(content::BrowserContext* browser_context,
const std::string& notification_id) override;
void ClosePersistentNotification(const std::string& notification_id) override;
void CloseNotification(const std::string& notification_id) override;
void GetDisplayedNotifications(
content::BrowserContext* browser_context,
DisplayedNotificationsCallback callback) override;
int64_t ReadNextPersistentNotificationId(
content::BrowserContext* browser_context) override;
int64_t ReadNextPersistentNotificationId() override;
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;
void ScheduleTrigger(base::Time timestamp) override;
base::Time ReadNextTriggerTimestamp() override;
private:
AtomBrowserClient* browser_client_;

View file

@ -14,7 +14,7 @@
#include "atom/browser/notifications/win/windows_toast_notification.h"
#include "base/environment.h"
#include "base/files/file_util.h"
#include "base/md5.h"
#include "base/hash/md5.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_restrictions.h"
#include "base/time/time.h"

View file

@ -351,7 +351,7 @@ void OffScreenRenderWidgetHostView::SetBounds(const gfx::Rect& new_bounds) {
SetSize(new_bounds.size());
}
gfx::NativeView OffScreenRenderWidgetHostView::GetNativeView() const {
gfx::NativeView OffScreenRenderWidgetHostView::GetNativeView() {
return gfx::NativeView();
}
@ -366,11 +366,11 @@ ui::TextInputClient* OffScreenRenderWidgetHostView::GetTextInputClient() {
void OffScreenRenderWidgetHostView::Focus() {}
bool OffScreenRenderWidgetHostView::HasFocus() const {
bool OffScreenRenderWidgetHostView::HasFocus() {
return false;
}
bool OffScreenRenderWidgetHostView::IsSurfaceAvailableForCopy() const {
bool OffScreenRenderWidgetHostView::IsSurfaceAvailableForCopy() {
return GetDelegatedFrameHost()->CanCopyFromCompositingSurface();
}
@ -411,7 +411,7 @@ void OffScreenRenderWidgetHostView::EnsureSurfaceSynchronizedForWebTest() {
SynchronizeVisualProperties();
}
gfx::Rect OffScreenRenderWidgetHostView::GetViewBounds() const {
gfx::Rect OffScreenRenderWidgetHostView::GetViewBounds() {
if (IsPopupWidget())
return popup_position_;
@ -429,8 +429,7 @@ void OffScreenRenderWidgetHostView::SetBackgroundColor(SkColor color) {
}
}
base::Optional<SkColor> OffScreenRenderWidgetHostView::GetBackgroundColor()
const {
base::Optional<SkColor> OffScreenRenderWidgetHostView::GetBackgroundColor() {
return background_color_;
}
@ -438,7 +437,7 @@ void OffScreenRenderWidgetHostView::UpdateBackgroundColor() {
NOTREACHED();
}
gfx::Size OffScreenRenderWidgetHostView::GetVisibleViewportSize() const {
gfx::Size OffScreenRenderWidgetHostView::GetVisibleViewportSize() {
return size_;
}
@ -580,7 +579,7 @@ void OffScreenRenderWidgetHostView::CopyFromSurface(
}
void OffScreenRenderWidgetHostView::GetScreenInfo(
content::ScreenInfo* screen_info) const {
content::ScreenInfo* screen_info) {
screen_info->depth = 24;
screen_info->depth_per_component = 8;
screen_info->orientation_angle = 0;
@ -621,8 +620,7 @@ void OffScreenRenderWidgetHostView::ImeCompositionRangeChanged(
const gfx::Range&,
const std::vector<gfx::Rect>&) {}
gfx::Size OffScreenRenderWidgetHostView::GetCompositorViewportPixelSize()
const {
gfx::Size OffScreenRenderWidgetHostView::GetCompositorViewportPixelSize() {
return gfx::ScaleToCeiledSize(GetRequestedRendererSize(),
current_device_scale_factor_);
}

View file

@ -84,22 +84,22 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase,
void InitAsChild(gfx::NativeView) override;
void SetSize(const gfx::Size&) override;
void SetBounds(const gfx::Rect&) override;
gfx::NativeView GetNativeView(void) const override;
gfx::NativeView GetNativeView(void) override;
gfx::NativeViewAccessible GetNativeViewAccessible(void) override;
ui::TextInputClient* GetTextInputClient() override;
void Focus(void) override;
bool HasFocus(void) const override;
bool HasFocus(void) override;
uint32_t GetCaptureSequenceNumber() const override;
bool IsSurfaceAvailableForCopy(void) const override;
bool IsSurfaceAvailableForCopy(void) override;
void Show(void) override;
void Hide(void) override;
bool IsShowing(void) override;
void EnsureSurfaceSynchronizedForWebTest() override;
gfx::Rect GetViewBounds(void) const override;
gfx::Size GetVisibleViewportSize() const override;
gfx::Rect GetViewBounds(void) override;
gfx::Size GetVisibleViewportSize() override;
void SetInsets(const gfx::Insets&) override;
void SetBackgroundColor(SkColor color) override;
base::Optional<SkColor> GetBackgroundColor() const override;
base::Optional<SkColor> GetBackgroundColor() override;
void UpdateBackgroundColor() override;
bool LockMouse(void) override;
void UnlockMouse(void) override;
@ -139,7 +139,7 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase,
const gfx::Rect& src_rect,
const gfx::Size& output_size,
base::OnceCallback<void(const SkBitmap&)> callback) override;
void GetScreenInfo(content::ScreenInfo* results) const override;
void GetScreenInfo(content::ScreenInfo* results) override;
void InitAsGuest(content::RenderWidgetHostView*,
content::RenderWidgetHostViewGuest*) override;
void TransformPointToRootSurface(gfx::PointF* point) override;
@ -149,7 +149,7 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase,
CreateSyntheticGestureTarget() override;
void ImeCompositionRangeChanged(const gfx::Range&,
const std::vector<gfx::Rect>&) override;
gfx::Size GetCompositorViewportPixelSize() const override;
gfx::Size GetCompositorViewportPixelSize() override;
content::RenderWidgetHostViewBase* CreateViewForWidget(
content::RenderWidgetHost*,

View file

@ -143,6 +143,8 @@ class InspectableWebContentsImpl
int boundary_value) override {}
void ReadyForTest() override {}
void SetOpenNewWindowForPopups(bool value) override {}
void RecordPerformanceHistogram(const std::string& name,
double duration) override {}
// content::DevToolsFrontendHostDelegate:
void HandleMessageFromDevToolsFrontend(const std::string& message);

View file

@ -255,7 +255,7 @@ const char* MenuBar::GetClassName() const {
return kViewClassName;
}
void MenuBar::OnMenuButtonClicked(views::MenuButton* source,
void MenuBar::OnMenuButtonClicked(views::Button* source,
const gfx::Point& point,
const ui::Event* event) {
// Hide the accelerator when a submenu is activated.

View file

@ -16,8 +16,9 @@
#include "ui/views/view.h"
namespace views {
class Button;
class MenuButton;
}
} // namespace views
namespace atom {
@ -78,7 +79,7 @@ class MenuBar : public views::AccessiblePaneView,
const char* GetClassName() const override;
// views::MenuButtonListener:
void OnMenuButtonClicked(views::MenuButton* source,
void OnMenuButtonClicked(views::Button* source,
const gfx::Point& point,
const ui::Event* event) override;
void OnNativeThemeChanged(const ui::NativeTheme* theme) override;

View file

@ -22,7 +22,7 @@ MenuDelegate::MenuDelegate(MenuBar* menu_bar)
MenuDelegate::~MenuDelegate() {}
void MenuDelegate::RunMenu(AtomMenuModel* model,
views::MenuButton* button,
views::Button* button,
ui::MenuSourceType source_type) {
gfx::Point screen_loc;
views::View::ConvertPointToScreen(button, &screen_loc);
@ -43,8 +43,9 @@ void MenuDelegate::RunMenu(AtomMenuModel* model,
menu_runner_.reset(new views::MenuRunner(
item,
views::MenuRunner::CONTEXT_MENU | views::MenuRunner::HAS_MNEMONICS));
menu_runner_->RunMenuAt(button->GetWidget()->GetTopLevelWidget(), button,
bounds, views::MENU_ANCHOR_TOPRIGHT, source_type);
menu_runner_->RunMenuAt(button->GetWidget()->GetTopLevelWidget(),
static_cast<views::MenuButton*>(button), bounds,
views::MenuAnchorPosition::kTopRight, source_type);
}
void MenuDelegate::ExecuteCommand(int id) {

View file

@ -13,7 +13,8 @@
namespace views {
class MenuRunner;
}
class Button;
} // namespace views
namespace atom {
@ -25,7 +26,7 @@ class MenuDelegate : public views::MenuDelegate {
~MenuDelegate() override;
void RunMenu(AtomMenuModel* model,
views::MenuButton* button,
views::Button* button,
ui::MenuSourceType source_type);
class Observer {

View file

@ -169,7 +169,8 @@ void NotifyIcon::PopUpContextMenu(const gfx::Point& pos,
views::MenuRunner::CONTEXT_MENU | views::MenuRunner::HAS_MNEMONICS,
base::Bind(&NotifyIcon::OnContextMenuClosed,
weak_factory_.GetWeakPtr())));
menu_runner_->RunMenuAt(widget_.get(), NULL, rect, views::MENU_ANCHOR_TOPLEFT,
menu_runner_->RunMenuAt(widget_.get(), NULL, rect,
views::MenuAnchorPosition::kTopLeft,
ui::MENU_SOURCE_MOUSE);
}

View file

@ -335,13 +335,13 @@ void WebContentsPreferences::AppendCommandLineSwitches(
int guest_instance_id = 0;
if (GetAsInteger(&preference_, options::kGuestInstanceID, &guest_instance_id))
command_line->AppendSwitchASCII(switches::kGuestInstanceID,
base::IntToString(guest_instance_id));
base::NumberToString(guest_instance_id));
// Pass the opener's window id.
int opener_id;
if (GetAsInteger(&preference_, options::kOpenerID, &opener_id))
command_line->AppendSwitchASCII(switches::kOpenerID,
base::IntToString(opener_id));
base::NumberToString(opener_id));
#if defined(OS_MACOSX)
// Enable scroll bounce.