chore: bump chromium to cbeb16cf544f79c1990f1eae4d4fe (master) (#19610)
Co-authored-by: Erick Zhao <erickzhao@github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by Micha Hanselmann <DeerMichel@github.com>
This commit is contained in:
parent
12df0e8994
commit
db21391156
71 changed files with 348 additions and 355 deletions
|
@ -268,8 +268,4 @@ void AtomContentClient::AddContentDecryptionModules(
|
|||
}
|
||||
}
|
||||
|
||||
bool AtomContentClient::IsDataResourceGzipped(int resource_id) {
|
||||
return ui::ResourceBundle::GetSharedInstance().IsGzipped(resource_id);
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -30,7 +30,6 @@ class AtomContentClient : public content::ContentClient {
|
|||
void AddContentDecryptionModules(
|
||||
std::vector<content::CdmInfo>* cdms,
|
||||
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) override;
|
||||
bool IsDataResourceGzipped(int resource_id) override;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(AtomContentClient);
|
||||
|
|
|
@ -13,10 +13,6 @@
|
|||
#include "components/services/pdf_compositor/public/cpp/manifest.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
#include "chrome/services/printing/public/cpp/manifest.h"
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
// TODO(https://crbug.com/781334): Remove these helpers and just update the
|
||||
|
@ -53,9 +49,6 @@ GetElectronBuiltinServiceManifests() {
|
|||
static base::NoDestructor<std::vector<service_manager::Manifest>> manifests{{
|
||||
#if BUILDFLAG(ENABLE_PRINTING)
|
||||
MakeOutOfProcess(printing::GetPdfCompositorManifest()),
|
||||
#endif
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
MakeOutOfProcess(GetChromePrintingManifest()),
|
||||
#endif
|
||||
}};
|
||||
return *manifests;
|
||||
|
|
|
@ -723,7 +723,6 @@ void App::AllowCertificateError(
|
|||
const GURL& request_url,
|
||||
bool is_main_frame_request,
|
||||
bool strict_enforcement,
|
||||
bool expired_previous_decision,
|
||||
const base::RepeatingCallback<void(content::CertificateRequestResultType)>&
|
||||
callback) {
|
||||
v8::Locker locker(isolate());
|
||||
|
|
|
@ -120,7 +120,6 @@ class App : public AtomBrowserClient::Delegate,
|
|||
const GURL& request_url,
|
||||
bool is_main_frame_request,
|
||||
bool strict_enforcement,
|
||||
bool expired_previous_decision,
|
||||
const base::RepeatingCallback<
|
||||
void(content::CertificateRequestResultType)>& callback) override;
|
||||
base::OnceClosure SelectClientCertificate(
|
||||
|
|
|
@ -31,7 +31,7 @@ SystemPreferences::~SystemPreferences() {
|
|||
|
||||
#if !defined(OS_MACOSX)
|
||||
bool SystemPreferences::IsDarkMode() {
|
||||
return ui::NativeTheme::GetInstanceForNativeUi()->SystemDarkModeEnabled();
|
||||
return ui::NativeTheme::GetInstanceForNativeUi()->ShouldUseDarkColors();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -637,7 +637,7 @@ void SystemPreferences::RemoveUserDefault(const std::string& name) {
|
|||
|
||||
bool SystemPreferences::IsDarkMode() {
|
||||
if (@available(macOS 10.14, *)) {
|
||||
return ui::NativeTheme::GetInstanceForNativeUi()->SystemDarkModeEnabled();
|
||||
return ui::NativeTheme::GetInstanceForNativeUi()->ShouldUseDarkColors();
|
||||
}
|
||||
NSString* mode = [[NSUserDefaults standardUserDefaults]
|
||||
stringForKey:@"AppleInterfaceStyle"];
|
||||
|
|
|
@ -337,8 +337,7 @@ bool AtomBrowserClient::IsRendererSubFrame(int process_id) const {
|
|||
}
|
||||
|
||||
void AtomBrowserClient::RenderProcessWillLaunch(
|
||||
content::RenderProcessHost* host,
|
||||
service_manager::mojom::ServiceRequest* service_request) {
|
||||
content::RenderProcessHost* host) {
|
||||
// When a render process is crashed, it might be reused.
|
||||
int process_id = host->GetID();
|
||||
if (IsProcessObserved(process_id))
|
||||
|
@ -403,7 +402,7 @@ void AtomBrowserClient::OverrideWebkitPrefs(content::RenderViewHost* host,
|
|||
prefs->navigate_on_drag_drop = false;
|
||||
|
||||
ui::NativeTheme* native_theme = ui::NativeTheme::GetInstanceForNativeUi();
|
||||
prefs->preferred_color_scheme = native_theme->SystemDarkModeEnabled()
|
||||
prefs->preferred_color_scheme = native_theme->ShouldUseDarkColors()
|
||||
? blink::PreferredColorScheme::kDark
|
||||
: blink::PreferredColorScheme::kLight;
|
||||
|
||||
|
@ -619,13 +618,12 @@ void AtomBrowserClient::AllowCertificateError(
|
|||
const GURL& request_url,
|
||||
bool is_main_frame_request,
|
||||
bool strict_enforcement,
|
||||
bool expired_previous_decision,
|
||||
const base::RepeatingCallback<void(content::CertificateRequestResultType)>&
|
||||
callback) {
|
||||
if (delegate_) {
|
||||
delegate_->AllowCertificateError(
|
||||
web_contents, cert_error, ssl_info, request_url, is_main_frame_request,
|
||||
strict_enforcement, expired_previous_decision, callback);
|
||||
delegate_->AllowCertificateError(web_contents, cert_error, ssl_info,
|
||||
request_url, is_main_frame_request,
|
||||
strict_enforcement, callback);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -70,9 +70,7 @@ class AtomBrowserClient : public content::ContentBrowserClient,
|
|||
bool CanUseCustomSiteInstance() override;
|
||||
|
||||
protected:
|
||||
void RenderProcessWillLaunch(
|
||||
content::RenderProcessHost* host,
|
||||
service_manager::mojom::ServiceRequest* service_request) override;
|
||||
void RenderProcessWillLaunch(content::RenderProcessHost* host) override;
|
||||
content::SpeechRecognitionManagerDelegate*
|
||||
CreateSpeechRecognitionManagerDelegate() override;
|
||||
content::TtsControllerDelegate* GetTtsControllerDelegate() override;
|
||||
|
@ -107,7 +105,6 @@ class AtomBrowserClient : public content::ContentBrowserClient,
|
|||
const GURL& request_url,
|
||||
bool is_main_frame_request,
|
||||
bool strict_enforcement,
|
||||
bool expired_previous_decision,
|
||||
const base::Callback<void(content::CertificateRequestResultType)>&
|
||||
callback) override;
|
||||
base::OnceClosure SelectClientCertificate(
|
||||
|
|
|
@ -271,11 +271,6 @@ BrowserProcessImpl::CachedDefaultWebClientState() {
|
|||
return shell_integration::UNKNOWN_DEFAULT;
|
||||
}
|
||||
|
||||
prefs::InProcessPrefServiceFactory* BrowserProcessImpl::pref_service_factory()
|
||||
const {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void BrowserProcessImpl::SetApplicationLocale(const std::string& locale) {
|
||||
locale_ = locale;
|
||||
}
|
||||
|
|
|
@ -92,7 +92,6 @@ class BrowserProcessImpl : public BrowserProcess {
|
|||
resource_coordinator::TabManager* GetTabManager() override;
|
||||
shell_integration::DefaultWebClientState CachedDefaultWebClientState()
|
||||
override;
|
||||
prefs::InProcessPrefServiceFactory* pref_service_factory() const override;
|
||||
void CreateDevToolsProtocolHandler() override {}
|
||||
void CreateDevToolsAutoOpener() override {}
|
||||
void set_background_mode_manager_for_test(
|
||||
|
|
|
@ -23,8 +23,7 @@ namespace electron {
|
|||
LoginHandler::LoginHandler(net::URLRequest* request,
|
||||
const net::AuthChallengeInfo& auth_info,
|
||||
net::NetworkDelegate::AuthCallback callback,
|
||||
net::AuthCredentials* credentials,
|
||||
content::ResourceRequestInfo* resource_request_info)
|
||||
net::AuthCredentials* credentials)
|
||||
: credentials_(credentials),
|
||||
auth_info_(std::make_unique<net::AuthChallengeInfo>(auth_info)),
|
||||
auth_callback_(std::move(callback)),
|
||||
|
@ -35,8 +34,11 @@ LoginHandler::LoginHandler(net::URLRequest* request,
|
|||
new base::DictionaryValue);
|
||||
FillRequestDetails(request_details.get(), request);
|
||||
|
||||
web_contents_getter_ =
|
||||
resource_request_info->GetWebContentsGetterForRequest();
|
||||
// TODO(deepak1556): fix with network service
|
||||
// tracking issue: #19602
|
||||
CHECK(false) << "fix with network service";
|
||||
// web_contents_getter_ =
|
||||
// resource_request_info->GetWebContentsGetterForRequest();
|
||||
|
||||
base::PostTaskWithTraits(
|
||||
FROM_HERE, {BrowserThread::UI},
|
||||
|
@ -72,6 +74,9 @@ void LoginHandler::NotifyRequestDestroyed() {
|
|||
|
||||
content::WebContents* LoginHandler::GetWebContents() const {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
// TODO(deepak1556): fix with network service
|
||||
// tracking issue: #19602
|
||||
CHECK(false) << "fix with network service";
|
||||
return web_contents_getter_.Run();
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "base/memory/weak_ptr.h"
|
||||
#include "base/sequenced_task_runner_helpers.h"
|
||||
#include "base/strings/string16.h"
|
||||
#include "content/public/browser/resource_request_info.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "net/base/network_delegate.h"
|
||||
|
||||
namespace content {
|
||||
|
@ -27,8 +27,7 @@ class LoginHandler : public base::RefCountedThreadSafe<LoginHandler> {
|
|||
LoginHandler(net::URLRequest* request,
|
||||
const net::AuthChallengeInfo& auth_info,
|
||||
net::NetworkDelegate::AuthCallback callback,
|
||||
net::AuthCredentials* credentials,
|
||||
content::ResourceRequestInfo* resource_request_info);
|
||||
net::AuthCredentials* credentials);
|
||||
|
||||
// The auth is cancelled, must be called on UI thread.
|
||||
void CancelAuth();
|
||||
|
|
|
@ -335,7 +335,7 @@ NativeWindowMac::NativeWindowMac(const mate::Dictionary& options,
|
|||
params.delegate = this;
|
||||
params.type = views::Widget::InitParams::TYPE_WINDOW;
|
||||
params.native_widget = new AtomNativeWidgetMac(this, styleMask, widget());
|
||||
widget()->Init(params);
|
||||
widget()->Init(std::move(params));
|
||||
window_ = static_cast<AtomNSWindow*>(
|
||||
widget()->GetNativeWindow().GetNativeNSWindow());
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ NativeWindowViews::NativeWindowViews(const mate::Dictionary& options,
|
|||
params.wm_class_class = name;
|
||||
#endif
|
||||
|
||||
widget()->Init(params);
|
||||
widget()->Init(std::move(params));
|
||||
|
||||
bool fullscreen = false;
|
||||
options.Get(options::kFullscreen, &fullscreen);
|
||||
|
|
|
@ -276,7 +276,8 @@ OffScreenRenderWidgetHostView::~OffScreenRenderWidgetHostView() {
|
|||
// Marking the DelegatedFrameHost as removed from the window hierarchy is
|
||||
// necessary to remove all connections to its old ui::Compositor.
|
||||
if (is_showing_)
|
||||
delegated_frame_host_->WasHidden();
|
||||
delegated_frame_host_->WasHidden(
|
||||
content::DelegatedFrameHost::HiddenCause::kOther);
|
||||
delegated_frame_host_->DetachFromCompositor();
|
||||
|
||||
delegated_frame_host_.reset(NULL);
|
||||
|
@ -397,7 +398,9 @@ void OffScreenRenderWidgetHostView::Hide() {
|
|||
if (render_widget_host_)
|
||||
render_widget_host_->WasHidden();
|
||||
|
||||
GetDelegatedFrameHost()->WasHidden();
|
||||
// TODO(deermichel): correct or kOther?
|
||||
GetDelegatedFrameHost()->WasHidden(
|
||||
content::DelegatedFrameHost::HiddenCause::kOccluded);
|
||||
GetDelegatedFrameHost()->DetachFromCompositor();
|
||||
|
||||
is_showing_ = false;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "shell/browser/ui/views/autofill_popup_view.h"
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/i18n/rtl.h"
|
||||
|
@ -75,7 +76,7 @@ void AutofillPopupView::Show() {
|
|||
params.delegate = this;
|
||||
params.parent = parent_widget_->GetNativeView();
|
||||
params.z_order = ui::ZOrderLevel::kFloatingUIElement;
|
||||
widget->Init(params);
|
||||
widget->Init(std::move(params));
|
||||
|
||||
// No animation for popup appearance (too distracting).
|
||||
widget->SetVisibilityAnimationTransition(views::Widget::ANIMATE_HIDE);
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#include "shell/browser/ui/views/inspectable_web_contents_view_views.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "shell/browser/ui/inspectable_web_contents_delegate.h"
|
||||
#include "shell/browser/ui/inspectable_web_contents_impl.h"
|
||||
|
@ -191,7 +193,7 @@ void InspectableWebContentsViewViews::SetIsDocked(bool docked, bool activate) {
|
|||
¶ms.wm_class_class);
|
||||
#endif
|
||||
|
||||
devtools_window_->Init(params);
|
||||
devtools_window_->Init(std::move(params));
|
||||
devtools_window_->UpdateWindowIcon();
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#include "shell/browser/ui/win/atom_desktop_native_widget_aura.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "shell/browser/ui/win/atom_desktop_window_tree_host_win.h"
|
||||
#include "ui/views/corewm/tooltip_controller.h"
|
||||
#include "ui/wm/public/tooltip_client.h"
|
||||
|
@ -20,13 +22,12 @@ AtomDesktopNativeWidgetAura::AtomDesktopNativeWidgetAura(
|
|||
}
|
||||
|
||||
void AtomDesktopNativeWidgetAura::InitNativeWidget(
|
||||
const views::Widget::InitParams& params) {
|
||||
views::Widget::InitParams modified_params = params;
|
||||
views::Widget::InitParams params) {
|
||||
desktop_window_tree_host_ = new AtomDesktopWindowTreeHostWin(
|
||||
native_window_view_,
|
||||
static_cast<views::DesktopNativeWidgetAura*>(params.native_widget));
|
||||
modified_params.desktop_window_tree_host = desktop_window_tree_host_;
|
||||
views::DesktopNativeWidgetAura::InitNativeWidget(modified_params);
|
||||
params.desktop_window_tree_host = desktop_window_tree_host_;
|
||||
views::DesktopNativeWidgetAura::InitNativeWidget(std::move(params));
|
||||
}
|
||||
|
||||
void AtomDesktopNativeWidgetAura::Activate() {
|
||||
|
|
|
@ -19,7 +19,7 @@ class AtomDesktopNativeWidgetAura : public views::DesktopNativeWidgetAura {
|
|||
explicit AtomDesktopNativeWidgetAura(NativeWindowViews* native_window_view);
|
||||
|
||||
// views::DesktopNativeWidgetAura:
|
||||
void InitNativeWidget(const views::Widget::InitParams& params) override;
|
||||
void InitNativeWidget(views::Widget::InitParams params) override;
|
||||
|
||||
// internal::NativeWidgetPrivate:
|
||||
void Activate() override;
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#include "shell/browser/ui/win/notify_icon.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/win/windows_version.h"
|
||||
|
@ -215,7 +217,7 @@ void NotifyIcon::PopUpContextMenu(const gfx::Point& pos,
|
|||
params.force_software_compositing = true;
|
||||
params.z_order = ui::ZOrderLevel::kFloatingUIElement;
|
||||
|
||||
widget_->Init(params);
|
||||
widget_->Init(std::move(params));
|
||||
|
||||
widget_->Show();
|
||||
widget_->Activate();
|
||||
|
|
|
@ -20,13 +20,13 @@
|
|||
#include "services/service_manager/sandbox/switches.h"
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINTING)
|
||||
#include "chrome/services/printing/printing_service.h"
|
||||
#include "chrome/services/printing/public/mojom/constants.mojom.h"
|
||||
#include "components/services/pdf_compositor/public/cpp/pdf_compositor_service_factory.h"
|
||||
#include "components/services/pdf_compositor/public/mojom/pdf_compositor.mojom.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#include "chrome/services/printing/pdf_to_emf_converter_factory.h"
|
||||
#include "chrome/services/printing/printing_service.h"
|
||||
#include "chrome/services/printing/public/mojom/printing_service.mojom.h"
|
||||
#include "chrome/utility/printing_handler.h"
|
||||
#endif // defined(OS_WIN)
|
||||
|
||||
|
@ -43,6 +43,13 @@ void RunServiceAsyncThenTerminateProcess(
|
|||
base::BindOnce([] { content::UtilityThread::Get()->ReleaseProcess(); }));
|
||||
}
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINTING) && defined(OS_WIN)
|
||||
auto RunPrintingService(
|
||||
mojo::PendingReceiver<printing::mojom::PrintingService> receiver) {
|
||||
return std::make_unique<printing::PrintingService>(std::move(receiver));
|
||||
}
|
||||
#endif
|
||||
|
||||
auto RunProxyResolver(
|
||||
mojo::PendingReceiver<proxy_resolver::mojom::ProxyResolverFactory>
|
||||
receiver) {
|
||||
|
@ -119,6 +126,15 @@ bool AtomContentUtilityClient::HandleServiceRequest(
|
|||
return false;
|
||||
}
|
||||
|
||||
mojo::ServiceFactory* AtomContentUtilityClient::GetMainThreadServiceFactory() {
|
||||
static base::NoDestructor<mojo::ServiceFactory> factory {
|
||||
#if BUILDFLAG(ENABLE_PRINTING) && defined(OS_WIN)
|
||||
RunPrintingService
|
||||
#endif
|
||||
};
|
||||
return factory.get();
|
||||
}
|
||||
|
||||
mojo::ServiceFactory* AtomContentUtilityClient::GetIOThreadServiceFactory() {
|
||||
static base::NoDestructor<mojo::ServiceFactory> factory{RunProxyResolver};
|
||||
return factory.get();
|
||||
|
@ -132,10 +148,6 @@ AtomContentUtilityClient::MaybeCreateMainThreadService(
|
|||
if (service_name == printing::mojom::kServiceName) {
|
||||
return printing::CreatePdfCompositorService(std::move(request));
|
||||
}
|
||||
|
||||
if (service_name == printing::mojom::kChromePrintingServiceName) {
|
||||
return std::make_unique<printing::PrintingService>(std::move(request));
|
||||
}
|
||||
#endif
|
||||
|
||||
return nullptr;
|
||||
|
|
|
@ -29,6 +29,7 @@ class AtomContentUtilityClient : public content::ContentUtilityClient {
|
|||
bool HandleServiceRequest(
|
||||
const std::string& service_name,
|
||||
service_manager::mojom::ServiceRequest request) override;
|
||||
mojo::ServiceFactory* GetMainThreadServiceFactory() override;
|
||||
mojo::ServiceFactory* GetIOThreadServiceFactory() override;
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue