Update to Chromium version 85.0.4183.0 (#782793)

- Windows: 10.0.19041 SDK is now required.
- macOS: 10.15.1 SDK (at least Xcode 11.2) is now required.
- Remove CefMediaSource::IsValid and CefMediaSink::IsValid which would
  always return true.
This commit is contained in:
Marshall Greenblatt 2020-07-08 13:23:29 -04:00
parent 03c9156c80
commit 6573df6cc3
146 changed files with 726 additions and 790 deletions

View File

@ -1370,13 +1370,15 @@ repack("pak_devtools") {
# Add associated .h files in the make_pack_header("resources") target.
sources = [
"$root_gen_dir/content/browser/devtools/devtools_resources.pak",
"$root_gen_dir/third_party/blink/public/resources/inspector_overlay_resources.pak",
]
# Use public_deps so that generated grit headers are discoverable from
# the libcef_static target. Grit deps that generate .cc files must be
# listed both here and in the libcef_static target.
public_deps = [
"//content/browser/devtools:resources",
"//content/browser/devtools:devtools_resources",
"//third_party/blink/public:devtools_inspector_resources",
]
output = "$root_out_dir/devtools_resources.pak"

View File

@ -7,5 +7,5 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{
'chromium_checkout': 'refs/tags/84.0.4147.0'
'chromium_checkout': 'refs/tags/85.0.4183.0'
}

View File

@ -136,7 +136,11 @@
#define CEF_INCLUDE_BASE_CEF_LOGGING_H_
#pragma once
#if defined(DCHECK)
#if defined(USING_CHROMIUM_INCLUDES)
// When building CEF include the Chromium header directly.
#include "base/logging.h"
#include "base/notreached.h"
#elif defined(DCHECK)
// Do nothing if the macros provided by this header already exist.
// This can happen in cases where Chromium code is used directly by the
// client application. When using Chromium code directly always include
@ -149,10 +153,7 @@
#define DCHECK_IS_ON() true
#endif
#elif defined(USING_CHROMIUM_INCLUDES)
// When building CEF include the Chromium header directly.
#include "base/logging.h"
#else // !USING_CHROMIUM_INCLUDES
#else // !defined(DCHECK)
// The following is substantially similar to the Chromium implementation.
// If the Chromium implementation diverges the below implementation should be
// updated to match.

View File

@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=aa1310919932145744d5347d449d6ee10a3a0813$
// $hash=a259fab661bc913498ae4f46f8dee1c1e592823d$
//
#ifndef CEF_INCLUDE_CAPI_CEF_MEDIA_ROUTER_CAPI_H_
@ -246,11 +246,6 @@ typedef struct _cef_media_sink_t {
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t(CEF_CALLBACK* get_id)(struct _cef_media_sink_t* self);
///
// Returns true (1) if this sink is valid.
///
int(CEF_CALLBACK* is_valid)(struct _cef_media_sink_t* self);
///
// Returns the name of this sink.
///
@ -305,11 +300,6 @@ typedef struct _cef_media_source_t {
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t(CEF_CALLBACK* get_id)(struct _cef_media_source_t* self);
///
// Returns true (1) if this source is valid.
///
int(CEF_CALLBACK* is_valid)(struct _cef_media_source_t* self);
///
// Returns true (1) if this source outputs its content via Cast.
///

View File

@ -42,13 +42,13 @@
// way that may cause binary incompatibility with other builds. The universal
// hash value will change if any platform is affected whereas the platform hash
// values will change only if that particular platform is affected.
#define CEF_API_HASH_UNIVERSAL "74ccf587a0aab55a284b42ee0f68e506441213ee"
#define CEF_API_HASH_UNIVERSAL "cb61274ecf3ff56fdd90572f6e71a278c35ca634"
#if defined(OS_WIN)
#define CEF_API_HASH_PLATFORM "ae24a93d1d41a9cf2e5405dc02e62bf9c0eb95b8"
#define CEF_API_HASH_PLATFORM "b44de0d5c0a0a915d78c334d962befad828cb7ab"
#elif defined(OS_MACOSX)
#define CEF_API_HASH_PLATFORM "aec384331cfba6541bc267f5a1587931e33cb632"
#define CEF_API_HASH_PLATFORM "5110de7013537cf845a02484d39e47669b328e8a"
#elif defined(OS_LINUX)
#define CEF_API_HASH_PLATFORM "775c9c45cd801ff0b462acc181660f271152ac61"
#define CEF_API_HASH_PLATFORM "be51e7502fede165defcae5cfd9c8ce9e80622be"
#endif
#ifdef __cplusplus

View File

@ -229,12 +229,6 @@ class CefMediaSink : public virtual CefBaseRefCounted {
/*--cef()--*/
virtual CefString GetId() = 0;
///
// Returns true if this sink is valid.
///
/*--cef()--*/
virtual bool IsValid() = 0;
///
// Returns the name of this sink.
///
@ -286,12 +280,6 @@ class CefMediaSource : public virtual CefBaseRefCounted {
/*--cef()--*/
virtual CefString GetId() = 0;
///
// Returns true if this source is valid.
///
/*--cef()--*/
virtual bool IsValid() = 0;
///
// Returns true if this source outputs its content via Cast.
///

View File

@ -155,7 +155,7 @@ void AlloyBrowserContext::Initialize() {
// Initialize proxy configuration tracker.
pref_proxy_config_tracker_.reset(new PrefProxyConfigTrackerImpl(
GetPrefs(), base::CreateSingleThreadTaskRunner({BrowserThread::IO})));
GetPrefs(), content::GetIOThreadTaskRunner({})));
// Spell checking support and possibly other subsystems retrieve the
// PrefService associated with a BrowserContext via UserPrefs::Get().

View File

@ -24,7 +24,6 @@
#include "libcef/common/net/net_resource_provider.h"
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/post_task.h"
#include "chrome/browser/browser_process.h"

View File

@ -210,16 +210,25 @@ void CefBrowserPlatformDelegateAlloy::BrowserDestroyed(
}
void CefBrowserPlatformDelegateAlloy::SendCaptureLostEvent() {
content::RenderWidgetHostImpl* widget = content::RenderWidgetHostImpl::From(
browser_->web_contents()->GetRenderViewHost()->GetWidget());
if (!web_contents_)
return;
content::RenderViewHost* host = web_contents_->GetRenderViewHost();
if (!host)
return;
content::RenderWidgetHostImpl* widget =
content::RenderWidgetHostImpl::From(host->GetWidget());
if (widget)
widget->LostCapture();
}
#if defined(OS_WIN) || (defined(OS_POSIX) && !defined(OS_MACOSX))
void CefBrowserPlatformDelegateAlloy::NotifyMoveOrResizeStarted() {
if (!web_contents_)
return;
// Dismiss any existing popups.
content::RenderViewHost* host = browser_->web_contents()->GetRenderViewHost();
content::RenderViewHost* host = web_contents_->GetRenderViewHost();
if (host)
host->NotifyMoveOrResizeStarted();
}
@ -360,7 +369,7 @@ void CefBrowserPlatformDelegateAlloy::Find(int identifier,
auto options = blink::mojom::FindOptions::New();
options->forward = forward;
options->match_case = matchCase;
options->find_next = findNext;
options->find_next_if_selection_matches = findNext;
web_contents_->Find(identifier, searchText, std::move(options));
}

View File

@ -319,6 +319,12 @@ ChromeBrowserProcessAlloy::subresource_filter_ruleset_service() {
return nullptr;
}
federated_learning::FlocBlocklistService*
ChromeBrowserProcessAlloy::floc_blocklist_service() {
NOTREACHED();
return nullptr;
}
optimization_guide::OptimizationGuideService*
ChromeBrowserProcessAlloy::optimization_guide_service() {
NOTREACHED();

View File

@ -82,6 +82,7 @@ class ChromeBrowserProcessAlloy : public BrowserProcess {
safe_browsing::SafeBrowsingService* safe_browsing_service() override;
subresource_filter::RulesetService* subresource_filter_ruleset_service()
override;
federated_learning::FlocBlocklistService* floc_blocklist_service() override;
optimization_guide::OptimizationGuideService* optimization_guide_service()
override;
StartupData* startup_data() override;

View File

@ -18,7 +18,7 @@ class CefVariationsClient : public variations::VariationsClient {
~CefVariationsClient() override = default;
bool IsIncognito() const override {
bool IsOffTheRecord() const override {
return browser_context_->IsOffTheRecord();
}
@ -68,10 +68,6 @@ std::string ChromeProfileAlloy::GetProfileUserName() const {
return std::string();
}
Profile::ProfileType ChromeProfileAlloy::GetProfileType() const {
return REGULAR_PROFILE;
}
Profile* ChromeProfileAlloy::GetOffTheRecordProfile(
const Profile::OTRProfileID& otr_profile_id) {
NOTREACHED();
@ -79,7 +75,6 @@ Profile* ChromeProfileAlloy::GetOffTheRecordProfile(
}
std::vector<Profile*> ChromeProfileAlloy::GetAllOffTheRecordProfiles() {
NOTREACHED();
return {};
}
@ -127,7 +122,7 @@ PrefService* ChromeProfileAlloy::GetOffTheRecordPrefs() {
return nullptr;
}
bool ChromeProfileAlloy::IsSameProfile(Profile* profile) {
bool ChromeProfileAlloy::IsSameOrParent(Profile* profile) {
NOTREACHED();
return false;
}

View File

@ -26,7 +26,6 @@ class ChromeProfileAlloy : public Profile {
variations::VariationsClient* GetVariationsClient() override;
scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() override;
std::string GetProfileUserName() const override;
ProfileType GetProfileType() const override;
Profile* GetOffTheRecordProfile(
const Profile::OTRProfileID& otr_profile_id) override;
std::vector<Profile*> GetAllOffTheRecordProfiles() override;
@ -41,7 +40,7 @@ class ChromeProfileAlloy : public Profile {
bool IsLegacySupervised() const override;
ExtensionSpecialStoragePolicy* GetExtensionSpecialStoragePolicy() override;
PrefService* GetOffTheRecordPrefs() override;
bool IsSameProfile(Profile* profile) override;
bool IsSameOrParent(Profile* profile) override;
base::Time GetStartTime() const override;
base::FilePath last_selected_directory() override;
void set_last_selected_directory(const base::FilePath& path) override;

View File

@ -77,7 +77,8 @@ CefAudioCapturer::CefAudioCapturer(const CefAudioParameters& params,
std::make_unique<mirroring::CapturedAudioInput>(base::BindRepeating(
&StreamCreatorHelper, base::Unretained(browser_->web_contents()),
base::Unretained(audio_stream_creator_.get()))),
media::AudioInputDevice::kLoopback);
media::AudioInputDevice::kLoopback,
media::AudioInputDevice::DeadStreamDetection::kEnabled);
audio_input_device_->Initialize(audio_params, this);
audio_input_device_->Start();

View File

@ -1701,8 +1701,7 @@ bool CefBrowserHostImpl::EmbedsFullscreenWidget() {
}
void CefBrowserHostImpl::EnterFullscreenModeForTab(
content::WebContents* web_contents,
const GURL& origin,
content::RenderFrameHost* requesting_frame,
const blink::mojom::FullscreenOptions& options) {
OnFullscreenModeChange(true);
}
@ -2633,6 +2632,7 @@ void CefBrowserHostImpl::PluginCrashed(const base::FilePath& plugin_path,
}
void CefBrowserHostImpl::DidUpdateFaviconURL(
content::RenderFrameHost* render_frame_host,
const std::vector<blink::mojom::FaviconURLPtr>& candidates) {
if (client_.get()) {
CefRefPtr<CefDisplayHandler> handler = client_->GetDisplayHandler();

View File

@ -434,8 +434,7 @@ class CefBrowserHostImpl : public CefBrowserHost,
const blink::mojom::FileChooserParams& params) override;
bool EmbedsFullscreenWidget() override;
void EnterFullscreenModeForTab(
content::WebContents* web_contents,
const GURL& origin,
content::RenderFrameHost* requesting_frame,
const blink::mojom::FullscreenOptions& options) override;
void ExitFullscreenModeForTab(content::WebContents* web_contents) override;
bool IsFullscreenForTabOrPending(
@ -487,6 +486,7 @@ class CefBrowserHostImpl : public CefBrowserHost,
void PluginCrashed(const base::FilePath& plugin_path,
base::ProcessId plugin_pid) override;
void DidUpdateFaviconURL(
content::RenderFrameHost* render_frame_host,
const std::vector<blink::mojom::FaviconURLPtr>& candidates) override;
void OnAudioStateChanged(bool audible) override;
bool OnMessageReceived(const IPC::Message& message,

View File

@ -16,7 +16,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/task/post_task.h"
#include "base/threading/sequenced_task_runner_handle.h"
#include "base/value_conversions.h"
#include "base/util/values/values_util.h"
#include "base/values.h"
#include "chrome/common/pref_names.h"
#include "components/prefs/scoped_user_pref_update.h"
@ -81,9 +81,9 @@ void CefDevToolsFileManager::Save(const std::string& url,
const base::Value* path_value;
if (file_map->Get(base::MD5String(url), &path_value)) {
// Ignore base::GetValueAsFilePath() failure since we handle empty
// |initial_path| below.
ignore_result(base::GetValueAsFilePath(*path_value, &initial_path));
base::Optional<base::FilePath> path = util::ValueToFilePath(*path_value);
if (path)
initial_path = std::move(*path);
}
if (initial_path.empty()) {
@ -142,7 +142,7 @@ void CefDevToolsFileManager::SaveAsFileSelected(const std::string& url,
DictionaryPrefUpdate update(prefs_, prefs::kDevToolsEditedFiles);
base::DictionaryValue* files_map = update.Get();
files_map->SetKey(base::MD5String(url), base::CreateFilePathValue(path));
files_map->SetKey(base::MD5String(url), util::FilePathToValue(path));
std::string file_system_path = path.AsUTF8Unsafe();
callback.Run(file_system_path);
file_task_runner_->PostTask(FROM_HERE,

View File

@ -152,6 +152,7 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback {
suggested_path, DownloadItem::TARGET_DISPOSITION_OVERWRITE,
download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
download::DownloadItem::MixedContentStatus::UNKNOWN, suggested_path,
base::nullopt /*download_schedule*/,
download::DOWNLOAD_INTERRUPT_REASON_NONE);
}
}
@ -170,7 +171,8 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback {
std::move(callback).Run(path, DownloadItem::TARGET_DISPOSITION_OVERWRITE,
download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
download::DownloadItem::MixedContentStatus::UNKNOWN,
path, download::DOWNLOAD_INTERRUPT_REASON_NONE);
path, base::nullopt /*download_schedule*/,
download::DOWNLOAD_INTERRUPT_REASON_NONE);
}
base::WeakPtr<DownloadManager> manager_;
@ -355,7 +357,8 @@ bool CefDownloadManagerDelegate::DetermineDownloadTarget(
item->GetForcedFilePath(), DownloadItem::TARGET_DISPOSITION_OVERWRITE,
download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
download::DownloadItem::MixedContentStatus::UNKNOWN,
item->GetForcedFilePath(), download::DOWNLOAD_INTERRUPT_REASON_NONE);
item->GetForcedFilePath(), base::nullopt /*download_schedule*/,
download::DOWNLOAD_INTERRUPT_REASON_NONE);
return true;
}

View File

@ -8,6 +8,7 @@
#include <map>
#include "base/files/file_path.h"
#include "base/macros.h"
#include "extensions/browser/component_extension_resource_manager.h"
struct GritResourceMap;

View File

@ -20,7 +20,6 @@
#include "base/path_service.h"
#include "base/strings/string_tokenizer.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/post_task.h"
#include "base/threading/thread_restrictions.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_paths.h"
@ -54,7 +53,6 @@
#include "net/base/mime_util.h"
using content::BrowserContext;
using content::BrowserThread;
namespace extensions {
@ -179,10 +177,6 @@ void CefExtensionSystem::Init() {
// Inform the rest of the extensions system to start.
ready_.Signal();
content::NotificationService::current()->Notify(
NOTIFICATION_EXTENSIONS_READY_DEPRECATED,
content::Source<BrowserContext>(browser_context_),
content::NotificationService::NoDetails());
// Add the internal PDF extension. PDF loading works as follows:
// 1. The PDF PPAPI plugin is registered in libcef/common/content_client.cc
@ -413,7 +407,7 @@ ServiceWorkerManager* CefExtensionSystem::service_worker_manager() {
return service_worker_manager_.get();
}
SharedUserScriptMaster* CefExtensionSystem::shared_user_script_master() {
SharedUserScriptManager* CefExtensionSystem::shared_user_script_manager() {
return nullptr;
}
@ -450,8 +444,8 @@ void CefExtensionSystem::RegisterExtensionWithRequestContexts(
base::OnceClosure callback) {
// TODO(extensions): The |incognito_enabled| value should be set based on
// manifest settings.
base::PostTaskAndReply(
FROM_HERE, {BrowserThread::IO},
content::GetIOThreadTaskRunner({})->PostTaskAndReply(
FROM_HERE,
base::Bind(&InfoMap::AddExtension, info_map(),
base::RetainedRef(extension), base::Time::Now(),
true, // incognito_enabled
@ -464,8 +458,8 @@ void CefExtensionSystem::RegisterExtensionWithRequestContexts(
void CefExtensionSystem::UnregisterExtensionWithRequestContexts(
const std::string& extension_id,
const UnloadedExtensionReason reason) {
base::PostTask(
FROM_HERE, {BrowserThread::IO},
content::GetIOThreadTaskRunner({})->PostTask(
FROM_HERE,
base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason));
}
@ -473,6 +467,10 @@ const base::OneShotEvent& CefExtensionSystem::ready() const {
return ready_;
}
bool CefExtensionSystem::is_ready() const {
return ready_.is_signaled();
}
ContentVerifier* CefExtensionSystem::content_verifier() {
return nullptr;
}

View File

@ -17,12 +17,9 @@
#include "base/one_shot_event.h"
#include "extensions/browser/extension_system.h"
class BrowserContextKeyedServiceFactory;
namespace base {
class DictionaryValue;
class FilePath;
} // namespace base
}
namespace content {
class BrowserContext;
@ -31,11 +28,8 @@ class BrowserContext;
namespace extensions {
class ExtensionRegistry;
class InfoMap;
class ProcessManager;
class RendererStartupHelper;
class SharedUserScriptMaster;
class ValueStoreFactory;
// Used to manage extensions.
class CefExtensionSystem : public ExtensionSystem {
@ -93,7 +87,7 @@ class CefExtensionSystem : public ExtensionSystem {
RuntimeData* runtime_data() override;
ManagementPolicy* management_policy() override;
ServiceWorkerManager* service_worker_manager() override;
SharedUserScriptMaster* shared_user_script_master() override;
SharedUserScriptManager* shared_user_script_manager() override;
StateStore* state_store() override;
StateStore* rules_store() override;
scoped_refptr<ValueStoreFactory> store_factory() override;
@ -107,6 +101,7 @@ class CefExtensionSystem : public ExtensionSystem {
const std::string& extension_id,
const UnloadedExtensionReason reason) override;
const base::OneShotEvent& ready() const override;
bool is_ready() const override;
ContentVerifier* content_verifier() override;
std::unique_ptr<ExtensionSet> GetDependentExtensions(
const Extension* extension) override;

View File

@ -9,6 +9,7 @@
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/notreached.h"
namespace {

View File

@ -209,9 +209,9 @@ void CefMediaRouterImpl::CreateRoute(
auto browser_context = GetBrowserContext(browser_context_getter_);
if (!browser_context) {
error = "Context has already been destroyed";
} else if (!source || !source->IsValid()) {
} else if (!source) {
error = "Source is empty or invalid";
} else if (!sink || !sink->IsValid()) {
} else if (!sink) {
error = "Sink is empty or invalid";
} else if (!sink->IsCompatibleWith(source)) {
error = "Sink is not compatible with source";

View File

@ -15,10 +15,6 @@ CefString CefMediaSinkImpl::GetId() {
return sink_.id();
}
bool CefMediaSinkImpl::IsValid() {
return true;
}
CefString CefMediaSinkImpl::GetName() {
return sink_.name();
}

View File

@ -19,7 +19,6 @@ class CefMediaSinkImpl : public CefMediaSink {
// CefMediaSink methods.
CefString GetId() override;
bool IsValid() override;
CefString GetName() override;
CefString GetDescription() override;
IconType GetIconType() override;

View File

@ -15,10 +15,6 @@ CefString CefMediaSourceImpl::GetId() {
return source_.id();
}
bool CefMediaSourceImpl::IsValid() {
return source_.IsValid();
}
bool CefMediaSourceImpl::IsCastSource() {
return !IsDialSource();
}

View File

@ -18,7 +18,6 @@ class CefMediaSourceImpl : public CefMediaSource {
// CefMediaSource methods.
CefString GetId() override;
bool IsValid() override;
bool IsCastSource() override;
bool IsDialSource() override;

View File

@ -12,7 +12,6 @@
#include "base/bind.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
#include "content/public/common/menu_item.h"
#include "ui/base/accelerators/accelerator.h"
#include "ui/base/models/image_model.h"

View File

@ -226,5 +226,5 @@ int CefBrowserPlatformDelegateNativeAura::TranslateUiChangedButtonFlags(
content::RenderWidgetHostViewAura*
CefBrowserPlatformDelegateNativeAura::GetHostView() const {
return static_cast<content::RenderWidgetHostViewAura*>(
browser_->web_contents()->GetRenderWidgetHostView());
web_contents_->GetRenderWidgetHostView());
}

View File

@ -40,6 +40,11 @@ long GetSystemUptime() {
return 0;
}
// See https://crbug.com/1066670#c57 for background.
inline x11::Window ToX11Window(::Window window) {
return static_cast<x11::Window>(window);
}
} // namespace
CefBrowserPlatformDelegateNativeLinux::CefBrowserPlatformDelegateNativeLinux(
@ -87,7 +92,7 @@ bool CefBrowserPlatformDelegateNativeLinux::CreateHostWindow() {
CefWindowDelegateView* delegate_view = new CefWindowDelegateView(
GetBackgroundColor(), window_x11_->TopLevelAlwaysOnTop(),
GetBoundsChangedCallback());
delegate_view->Init(window_info_.window, browser_->web_contents(),
delegate_view->Init(ToX11Window(window_info_.window), web_contents_,
gfx::Rect(gfx::Point(), rect.size()));
window_widget_ = delegate_view->GetWidget();
@ -99,7 +104,7 @@ bool CefBrowserPlatformDelegateNativeLinux::CreateHostWindow() {
// As an additional requirement on Linux, we must set the colors for the
// render widgets in webkit.
blink::mojom::RendererPreferences* prefs =
browser_->web_contents()->GetMutableRendererPrefs();
web_contents_->GetMutableRendererPrefs();
prefs->focus_ring_color = SkColorSetARGB(255, 229, 151, 0);
prefs->active_selection_bg_color = SkColorSetRGB(30, 144, 255);
@ -117,7 +122,7 @@ bool CefBrowserPlatformDelegateNativeLinux::CreateHostWindow() {
prefs->use_bitmaps = params->use_bitmaps;
prefs->subpixel_rendering = params->subpixel_rendering;
browser_->web_contents()->SyncRendererPrefs();
web_contents_->SyncRendererPrefs();
return true;
}
@ -144,10 +149,10 @@ void CefBrowserPlatformDelegateNativeLinux::SendFocusEvent(bool setFocus) {
if (!setFocus)
return;
if (browser_->web_contents()) {
if (web_contents_) {
// Give logical focus to the RenderWidgetHostViewAura in the views
// hierarchy. This does not change the native keyboard focus.
browser_->web_contents()->Focus();
web_contents_->Focus();
}
#if defined(USE_X11)
@ -164,6 +169,9 @@ void CefBrowserPlatformDelegateNativeLinux::NotifyMoveOrResizeStarted() {
// Call the parent method to dismiss any existing popups.
CefBrowserPlatformDelegateNative::NotifyMoveOrResizeStarted();
if (!web_contents_)
return;
#if defined(USE_X11)
if (!window_x11_)
return;
@ -180,7 +188,7 @@ void CefBrowserPlatformDelegateNativeLinux::NotifyMoveOrResizeStarted() {
// Send updated screen rectangle information to the renderer process so that
// popups are displayed in the correct location.
content::RenderWidgetHostImpl::From(
browser_->web_contents()->GetRenderViewHost()->GetWidget())
web_contents_->GetRenderViewHost()->GetWidget())
->SendScreenRects();
#endif // defined(USE_X11)
}

View File

@ -221,8 +221,7 @@ bool CefBrowserPlatformDelegateNativeMac::CreateHostWindow() {
// Parent the TabContents to the browser view.
const NSRect bounds = [browser_view bounds];
NSView* native_view =
browser_->web_contents()->GetNativeView().GetNativeNSView();
NSView* native_view = web_contents_->GetNativeView().GetNativeNSView();
[browser_view addSubview:native_view];
[native_view setFrame:bounds];
[native_view setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
@ -314,8 +313,7 @@ void CefBrowserPlatformDelegateNativeMac::SendFocusEvent(bool setFocus) {
if (setFocus) {
// Give keyboard focus to the native view.
NSView* view =
browser_->web_contents()->GetContentNativeView().GetNativeNSView();
NSView* view = web_contents_->GetContentNativeView().GetNativeNSView();
DCHECK([view canBecomeKeyView]);
[[view window] makeFirstResponder:view];
}
@ -383,9 +381,12 @@ gfx::Point CefBrowserPlatformDelegateNativeMac::GetDialogPosition(
}
gfx::Size CefBrowserPlatformDelegateNativeMac::GetMaximumDialogSize() {
if (!web_contents_)
return gfx::Size();
// The dialog should try to fit within the overlay for the web contents.
// Note that, for things like print preview, this is just a suggested maximum.
return browser_->web_contents()->GetContainerBounds().size();
return web_contents_->GetContainerBounds().size();
}
content::NativeWebKeyboardEvent
@ -560,6 +561,8 @@ void CefBrowserPlatformDelegateNativeMac::TranslateWebMouseEvent(
content::RenderWidgetHostViewMac*
CefBrowserPlatformDelegateNativeMac::GetHostView() const {
if (!web_contents_)
return nullptr;
return static_cast<content::RenderWidgetHostViewMac*>(
browser_->web_contents()->GetRenderWidgetHostView());
web_contents_->GetRenderWidgetHostView());
}

View File

@ -199,7 +199,7 @@ bool CefBrowserPlatformDelegateNativeWin::CreateHostWindow() {
CefWindowDelegateView* delegate_view = new CefWindowDelegateView(
GetBackgroundColor(), always_on_top, GetBoundsChangedCallback());
delegate_view->Init(window_info_.window, browser_->web_contents(),
delegate_view->Init(window_info_.window, web_contents_,
gfx::Rect(0, 0, point.x(), point.y()));
window_widget_ = delegate_view->GetWidget();
@ -249,10 +249,10 @@ void CefBrowserPlatformDelegateNativeWin::SendFocusEvent(bool setFocus) {
if (!setFocus)
return;
if (browser_->web_contents()) {
if (web_contents_) {
// Give logical focus to the RenderWidgetHostViewAura in the views
// hierarchy. This does not change the native keyboard focus.
browser_->web_contents()->Focus();
web_contents_->Focus();
}
if (window_widget_) {

View File

@ -8,7 +8,6 @@
#include "base/compiler_specific.h"
#import "base/mac/scoped_sending_event.h"
#include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_current.h"
#import "ui/base/cocoa/menu_controller.h"
#include "ui/gfx/geometry/point.h"

View File

@ -7,7 +7,6 @@
#include "libcef/browser/browser_host_impl.h"
#include "libcef/browser/native/menu_2.h"
#include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_current.h"
#include "ui/gfx/geometry/point.h"

View File

@ -9,7 +9,6 @@
#include "base/bind.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@ -132,7 +131,7 @@ class CefNativeMenuWin::MenuHostWindow {
RegisterClass();
hwnd_ = CreateWindowEx(l10n_util::GetExtendedStyles(), kWindowClassName,
L"", 0, 0, 0, 0, 0, HWND_MESSAGE, NULL, NULL, NULL);
gfx::CheckWindowCreated(hwnd_);
gfx::CheckWindowCreated(hwnd_, ::GetLastError());
gfx::SetWindowUserData(hwnd_, this);
}

View File

@ -19,6 +19,10 @@
namespace {
// Restore Xlib constants that were #undef'ed by gen/ui/gfx/x/xproto.h.
constexpr int CopyFromParent = 0;
constexpr int InputOutput = 1;
const char kAtom[] = "ATOM";
const char kWMDeleteWindow[] = "WM_DELETE_WINDOW";
const char kWMProtocols[] = "WM_PROTOCOLS";
@ -29,6 +33,19 @@ const char kNetWMState[] = "_NET_WM_STATE";
const char kXdndProxy[] = "XdndProxy";
const char kUTF8String[] = "UTF8_STRING";
// See https://crbug.com/1066670#c57 for background.
inline x11::Window ToX11Window(::Window window) {
return static_cast<x11::Window>(window);
}
inline ::Window ToWindow(x11::Window window) {
return static_cast<::Window>(window);
}
// See https://crbug.com/1066670#c29 for background.
inline ::Atom GetAtom(const std::string& atom_name) {
return static_cast<::Atom>(gfx::GetAtom(atom_name));
}
::Window FindChild(::Display* display, ::Window window) {
::Window root;
::Window parent;
@ -59,7 +76,7 @@ const char kUTF8String[] = "UTF8_STRING";
}
top_level_window = window;
if (!ui::PropertyExists(parent, kNetWMPid) || parent == root) {
if (!ui::PropertyExists(ToX11Window(parent), kNetWMPid) || parent == root) {
break;
}
window = parent;
@ -99,7 +116,7 @@ CefWindowX11::CefWindowX11(CefRefPtr<CefBrowserHostImpl> browser,
0, // border width
CopyFromParent, // depth
InputOutput,
CopyFromParent, // visual
nullptr, // visual
CWBackPixmap | CWOverrideRedirect, &swa);
CHECK(xwindow_);
@ -114,8 +131,8 @@ CefWindowX11::CefWindowX11(CefRefPtr<CefBrowserHostImpl> browser,
// should listen for activation events and anything else that GTK+ listens
// for, and do something useful.
::Atom protocols[2];
protocols[0] = gfx::GetAtom(kWMDeleteWindow);
protocols[1] = gfx::GetAtom(kNetWMPing);
protocols[0] = GetAtom(kWMDeleteWindow);
protocols[1] = GetAtom(kNetWMPing);
XSetWMProtocols(xdisplay_, xwindow_, protocols, 2);
// We need a WM_CLIENT_MACHINE and WM_LOCALE_NAME value so we integrate with
@ -128,13 +145,13 @@ CefWindowX11::CefWindowX11(CefRefPtr<CefBrowserHostImpl> browser,
static_assert(sizeof(long) >= sizeof(pid_t),
"pid_t should not be larger than long");
long pid = getpid();
XChangeProperty(xdisplay_, xwindow_, gfx::GetAtom(kNetWMPid), XA_CARDINAL, 32,
XChangeProperty(xdisplay_, xwindow_, GetAtom(kNetWMPid), XA_CARDINAL, 32,
PropModeReplace, reinterpret_cast<unsigned char*>(&pid), 1);
// Set the initial window name, if provided.
if (!title.empty()) {
XChangeProperty(xdisplay_, xwindow_, gfx::GetAtom(kNetWMName),
gfx::GetAtom(kUTF8String), 8, PropModeReplace,
XChangeProperty(xdisplay_, xwindow_, GetAtom(kNetWMName),
GetAtom(kUTF8String), 8, PropModeReplace,
reinterpret_cast<const unsigned char*>(title.c_str()),
title.size());
}
@ -150,9 +167,9 @@ void CefWindowX11::Close() {
XEvent ev = {0};
ev.xclient.type = ClientMessage;
ev.xclient.window = xwindow_;
ev.xclient.message_type = gfx::GetAtom(kWMProtocols);
ev.xclient.message_type = GetAtom(kWMProtocols);
ev.xclient.format = 32;
ev.xclient.data.l[0] = gfx::GetAtom(kWMDeleteWindow);
ev.xclient.data.l[0] = GetAtom(kWMDeleteWindow);
ev.xclient.data.l[1] = x11::CurrentTime;
XSendEvent(xdisplay_, xwindow_, false, NoEventMask, &ev);
@ -193,17 +210,19 @@ void CefWindowX11::Show() {
// that all drag&drop-related messages will be sent to the child
// DesktopWindowTreeHostX11. The proxy property is referenced by
// DesktopDragDropClientAuraX11::FindWindowFor.
::Window proxy_target = gfx::kNullAcceleratedWidget;
ui::GetXIDProperty(toplevel_window, kXdndProxy, &proxy_target);
x11::Window window = x11::Window::None;
ui::GetProperty(ToX11Window(toplevel_window), gfx::GetAtom(kXdndProxy),
&window);
::Window proxy_target = ToWindow(window);
if (proxy_target != child) {
// Set the proxy target for the top-most window.
XChangeProperty(xdisplay_, toplevel_window, gfx::GetAtom(kXdndProxy),
XChangeProperty(xdisplay_, toplevel_window, GetAtom(kXdndProxy),
XA_WINDOW, 32, PropModeReplace,
reinterpret_cast<unsigned char*>(&child), 1);
// Do the same for the proxy target per the spec.
XChangeProperty(xdisplay_, child, gfx::GetAtom(kXdndProxy), XA_WINDOW,
32, PropModeReplace,
XChangeProperty(xdisplay_, child, GetAtom(kXdndProxy), XA_WINDOW, 32,
PropModeReplace,
reinterpret_cast<unsigned char*>(&child), 1);
}
}
@ -226,7 +245,7 @@ void CefWindowX11::Focus() {
if (browser_.get()) {
::Window child = FindChild(xdisplay_, xwindow_);
if (child && ui::IsWindowVisible(child)) {
if (child && ui::IsWindowVisible(ToX11Window(child))) {
// Give focus to the child DesktopWindowTreeHostX11.
XSetInputFocus(xdisplay_, child, RevertToParent, x11::CurrentTime);
}
@ -275,7 +294,8 @@ views::DesktopWindowTreeHostX11* CefWindowX11::GetHost() {
::Window child = FindChild(xdisplay_, xwindow_);
if (child) {
return static_cast<views::DesktopWindowTreeHostX11*>(
views::DesktopWindowTreeHostLinux::GetHostForWidget(child));
views::DesktopWindowTreeHostLinux::GetHostForWidget(
ToX11Window(child)));
}
}
return nullptr;
@ -297,8 +317,9 @@ uint32_t CefWindowX11::DispatchEvent(const ui::PlatformEvent& event) {
// Called by X11EventSourceLibevent to determine whether this XEventDispatcher
// implementation is able to process the next translated event sent by it.
void CefWindowX11::CheckCanDispatchNextPlatformEvent(XEvent* xev) {
current_xevent_ = IsTargetedBy(*xev) ? xev : nullptr;
void CefWindowX11::CheckCanDispatchNextPlatformEvent(x11::Event* x11_event) {
XEvent* xev = &x11_event->xlib_event();
current_xevent_ = IsTargetedBy(*x11_event) ? xev : nullptr;
}
void CefWindowX11::PlatformEventDispatchFinished() {
@ -309,9 +330,10 @@ ui::PlatformEventDispatcher* CefWindowX11::GetPlatformEventDispatcher() {
return this;
}
bool CefWindowX11::DispatchXEvent(XEvent* xev) {
if (!IsTargetedBy(*xev))
bool CefWindowX11::DispatchXEvent(x11::Event* x11_event) {
if (!IsTargetedBy(*x11_event))
return false;
XEvent* xev = &x11_event->xlib_event();
ProcessXEvent(xev);
return true;
}
@ -327,8 +349,8 @@ void CefWindowX11::ContinueFocus() {
bool CefWindowX11::TopLevelAlwaysOnTop() const {
::Window toplevel_window = FindToplevelParent(xdisplay_, xwindow_);
Atom state_atom = gfx::GetAtom("_NET_WM_STATE");
Atom state_keep_above = gfx::GetAtom("_NET_WM_STATE_KEEP_ABOVE");
Atom state_atom = GetAtom("_NET_WM_STATE");
Atom state_keep_above = GetAtom("_NET_WM_STATE_KEEP_ABOVE");
Atom* states;
Atom actual_type;
@ -355,9 +377,10 @@ bool CefWindowX11::TopLevelAlwaysOnTop() const {
return always_on_top;
}
bool CefWindowX11::IsTargetedBy(const XEvent& xev) const {
bool CefWindowX11::IsTargetedBy(const x11::Event& x11_event) const {
const XEvent& xev = x11_event.xlib_event();
::Window target_window =
(xev.type == GenericEvent)
xev.type == x11::GeGenericEvent::opcode
? static_cast<XIDeviceEvent*>(xev.xcookie.data)->event
: xev.xany.window;
return target_window == xwindow_;
@ -391,9 +414,9 @@ void CefWindowX11::ProcessXEvent(XEvent* xev) {
}
case ClientMessage: {
Atom message_type = xev->xclient.message_type;
if (message_type == gfx::GetAtom(kWMProtocols)) {
if (message_type == GetAtom(kWMProtocols)) {
Atom protocol = static_cast<Atom>(xev->xclient.data.l[0]);
if (protocol == gfx::GetAtom(kWMDeleteWindow)) {
if (protocol == GetAtom(kWMDeleteWindow)) {
// We have received a close message from the window manager.
if (!browser_ || browser_->TryCloseBrowser()) {
// Allow the close.
@ -409,7 +432,7 @@ void CefWindowX11::ProcessXEvent(XEvent* xev) {
delete this;
}
} else if (protocol == gfx::GetAtom(kNetWMPing)) {
} else if (protocol == GetAtom(kNetWMPing)) {
XEvent reply_event = *xev;
reply_event.xclient.window = parent_xwindow_;
@ -444,7 +467,7 @@ void CefWindowX11::ProcessXEvent(XEvent* xev) {
break;
case PropertyNotify: {
::Atom changed_atom = xev->xproperty.atom;
if (changed_atom == gfx::GetAtom(kNetWMState)) {
if (changed_atom == GetAtom(kNetWMState)) {
// State change event like minimize/maximize.
if (browser_.get()) {
::Window child = FindChild(xdisplay_, xwindow_);
@ -452,16 +475,18 @@ void CefWindowX11::ProcessXEvent(XEvent* xev) {
// Forward the state change to the child DesktopWindowTreeHostX11
// window so that resource usage will be reduced while the window is
// minimized.
std::vector<::Atom> atom_list;
if (ui::GetAtomArrayProperty(xwindow_, kNetWMState, &atom_list) &&
std::vector<x11::Atom> atom_list;
if (ui::GetAtomArrayProperty(ToX11Window(xwindow_), kNetWMState,
&atom_list) &&
!atom_list.empty()) {
ui::SetAtomArrayProperty(child, kNetWMState, "ATOM", atom_list);
ui::SetAtomArrayProperty(ToX11Window(child), kNetWMState, "ATOM",
atom_list);
} else {
// Set an empty list of property values to pass the check in
// DesktopWindowTreeHostX11::OnWMStateUpdated().
XChangeProperty(xdisplay_, child,
gfx::GetAtom(kNetWMState), // name
gfx::GetAtom(kAtom), // type
GetAtom(kNetWMState), // name
GetAtom(kAtom), // type
32, // size in bits of items in 'value'
PropModeReplace, NULL,
0); // num items

View File

@ -53,10 +53,10 @@ class CefWindowX11 : public ui::PlatformEventDispatcher,
uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
// ui::XEventDispatcher methods:
void CheckCanDispatchNextPlatformEvent(XEvent* xev) override;
void CheckCanDispatchNextPlatformEvent(x11::Event* x11_event) override;
void PlatformEventDispatchFinished() override;
ui::PlatformEventDispatcher* GetPlatformEventDispatcher() override;
bool DispatchXEvent(XEvent* event) override;
bool DispatchXEvent(x11::Event* x11_event) override;
::Window xwindow() const { return xwindow_; }
gfx::Rect bounds() const { return bounds_; }
@ -66,7 +66,7 @@ class CefWindowX11 : public ui::PlatformEventDispatcher,
private:
void ContinueFocus();
bool IsTargetedBy(const XEvent& xev) const;
bool IsTargetedBy(const x11::Event& x11_event) const;
void ProcessXEvent(XEvent* xev);
CefRefPtr<CefBrowserHostImpl> browser_;

View File

@ -10,6 +10,7 @@
#include "libcef/common/app_manager.h"
#include "base/notreached.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_restrictions.h"

View File

@ -21,7 +21,6 @@
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/string_util.h"
#include "content/public/browser/global_request_id.h"
#include "content/public/browser/render_frame_host.h"

View File

@ -34,7 +34,7 @@ network::mojom::CookieManager* GetCookieManager(
void ContinueWithLoadedCookies(const AllowCookieCallback& allow_cookie_callback,
DoneCookieCallback done_callback,
const net::CookieStatusList& cookies) {
const net::CookieAccessResultList& cookies) {
CEF_REQUIRE_IOT();
net::CookieList allowed_cookies;
for (const auto& status : cookies) {
@ -48,8 +48,8 @@ void ContinueWithLoadedCookies(const AllowCookieCallback& allow_cookie_callback,
void GetCookieListCallback(const AllowCookieCallback& allow_cookie_callback,
DoneCookieCallback done_callback,
const net::CookieStatusList& included_cookies,
const net::CookieStatusList&) {
const net::CookieAccessResultList& included_cookies,
const net::CookieAccessResultList&) {
CEF_REQUIRE_UIT();
CEF_POST_TASK(CEF_IOT,
base::BindOnce(ContinueWithLoadedCookies, allow_cookie_callback,
@ -80,10 +80,9 @@ struct SaveCookiesProgress {
int num_cookie_lines_left_;
};
void SetCanonicalCookieCallback(
SaveCookiesProgress* progress,
const net::CanonicalCookie& cookie,
net::CanonicalCookie::CookieInclusionStatus status) {
void SetCanonicalCookieCallback(SaveCookiesProgress* progress,
const net::CanonicalCookie& cookie,
net::CookieInclusionStatus status) {
CEF_REQUIRE_UIT();
progress->num_cookie_lines_left_--;
if (status.IsInclude()) {
@ -132,8 +131,8 @@ void SaveCookiesOnUIThread(content::BrowserContext* browser_context,
SetCanonicalCookieCallback(
progress, net::CanonicalCookie(),
net::CanonicalCookie::CookieInclusionStatus(
net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_UNKNOWN_ERROR));
net::CookieInclusionStatus(
net::CookieInclusionStatus::EXCLUDE_UNKNOWN_ERROR));
}
} // namespace
@ -203,7 +202,7 @@ void SaveCookies(content::BrowserContext* browser_context,
while (headers->EnumerateHeader(&iter, name, &cookie_string)) {
total_count++;
net::CanonicalCookie::CookieInclusionStatus returned_status;
net::CookieInclusionStatus returned_status;
std::unique_ptr<net::CanonicalCookie> cookie = net::CanonicalCookie::Create(
request.url, cookie_string, base::Time::Now(),
base::make_optional(response_date), &returned_status);

View File

@ -45,7 +45,7 @@ void RunAsyncCompletionOnUIThread(CefRefPtr<CefCompletionCallback> callback) {
// Always execute the callback asynchronously.
void SetCookieCallbackImpl(CefRefPtr<CefSetCookieCallback> callback,
net::CanonicalCookie::CookieInclusionStatus status) {
net::CookieInclusionStatus status) {
if (!callback.get())
return;
if (!status.IsInclude()) {
@ -104,8 +104,8 @@ void GetAllCookiesCallbackImpl(
void GetCookiesCallbackImpl(
CefRefPtr<CefCookieVisitor> visitor,
const CefBrowserContext::Getter& browser_context_getter,
const net::CookieStatusList& include_cookies,
const net::CookieStatusList&) {
const net::CookieAccessResultList& include_cookies,
const net::CookieAccessResultList&) {
net::CookieList cookies;
for (const auto& status : include_cookies) {
cookies.push_back(status.cookie);
@ -259,10 +259,9 @@ bool CefCookieManagerImpl::SetCookie(const CefString& url,
priority);
if (!canonical_cookie) {
SetCookieCallbackImpl(callback,
net::CanonicalCookie::CookieInclusionStatus(
net::CanonicalCookie::CookieInclusionStatus::
EXCLUDE_UNKNOWN_ERROR));
SetCookieCallbackImpl(
callback, net::CookieInclusionStatus(
net::CookieInclusionStatus::EXCLUDE_UNKNOWN_ERROR));
return true;
}

View File

@ -20,7 +20,6 @@
#include "libcef/common/response_impl.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_features.h"
#include "components/language/core/browser/pref_names.h"
#include "components/prefs/pref_service.h"
#include "content/public/browser/browser_context.h"
@ -98,9 +97,7 @@ std::string GetAcceptLanguageList(content::BrowserContext* browser_context,
// Match the logic in chrome/browser/net/profile_network_context_service.cc.
std::string ComputeAcceptLanguageFromPref(const std::string& language_pref) {
std::string accept_languages_str =
base::FeatureList::IsEnabled(features::kUseNewAcceptLanguageHeader)
? net::HttpUtil::ExpandLanguageList(language_pref)
: language_pref;
net::HttpUtil::ExpandLanguageList(language_pref);
return net::HttpUtil::GenerateAcceptLanguageHeader(accept_languages_str);
}

View File

@ -6,6 +6,7 @@
#include <queue>
#include "base/logging.h"
#include "mojo/public/cpp/system/simple_watcher.h"
#include "mojo/public/cpp/system/string_data_source.h"

View File

@ -7,6 +7,7 @@
#include "include/cef_response_filter.h"
#include "base/callback_forward.h"
#include "mojo/public/cpp/system/data_pipe.h"
namespace net_service {

View File

@ -531,7 +531,8 @@ void CefBrowserPlatformDelegateOsr::DragSourceSystemDragEnded() {
if (!drag_start_rwh_)
return;
content::WebContents* web_contents = browser_->web_contents();
content::WebContentsImpl* web_contents =
static_cast<content::WebContentsImpl*>(browser_->web_contents());
if (!web_contents)
return;

View File

@ -53,6 +53,11 @@
#include "ui/gfx/geometry/dip_util.h"
#include "ui/gfx/geometry/size_conversions.h"
#if defined(USE_X11)
#include "ui/base/x/x11_cursor.h"
#include "ui/base/x/x11_util.h"
#endif
namespace {
// The maximum number of damage rects to cache for outstanding frame requests
@ -187,6 +192,17 @@ ui::ImeTextSpan::UnderlineStyle GetImeUnderlineStyle(
return ui::ImeTextSpan::UnderlineStyle::kSolid;
}
#if defined(USE_AURA)
CefCursorHandle ToCursorHandle(ui::PlatformCursor cursor) {
#if defined(USE_X11)
// See https://crbug.com/1029142 for background.
return static_cast<ui::X11Cursor*>(cursor)->xcursor();
#else
return cursor;
#endif
}
#endif // defined(USE_AURA)
} // namespace
CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
@ -611,10 +627,10 @@ void CefRenderWidgetHostViewOSR::UpdateCursor(
#if defined(USE_AURA)
content::WebCursor web_cursor(ui_cursor);
ui::PlatformCursor platform_cursor;
CefCursorHandle platform_cursor;
if (ui_cursor.type() == ui::mojom::CursorType::kCustom) {
// |web_cursor| owns the resulting |platform_cursor|.
platform_cursor = web_cursor.GetPlatformCursor(ui_cursor);
platform_cursor = ToCursorHandle(web_cursor.GetPlatformCursor(ui_cursor));
} else {
platform_cursor = GetPlatformCursor(ui_cursor.type());
}
@ -1330,8 +1346,7 @@ void CefRenderWidgetHostViewOSR::OnUpdateTextInputStateCalled(
content::TextInputManager* text_input_manager,
content::RenderWidgetHostViewBase* updated_view,
bool did_update_state) {
const content::TextInputState* state =
text_input_manager->GetTextInputState();
const auto state = text_input_manager->GetTextInputState();
if (state && !state->show_ime_if_needed)
return;

View File

@ -36,10 +36,6 @@
#include "ui/events/gesture_detection/motion_event_generic.h"
#include "ui/gfx/geometry/rect.h"
#if defined(OS_LINUX)
#include "ui/base/x/x11_util.h"
#endif
#if defined(OS_MACOSX)
#include "content/browser/renderer_host/browser_compositor_view_mac.h"
#endif
@ -68,6 +64,9 @@ class CefVideoConsumerOSR;
class CefWebContentsViewOSR;
#if defined(USE_X11)
namespace ui {
class XScopedCursor;
}
class CefWindowX11;
#endif
@ -324,7 +323,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
void UpdateBackgroundColorFromRenderer(SkColor color);
#if defined(USE_AURA)
ui::PlatformCursor GetPlatformCursor(ui::mojom::CursorType type);
CefCursorHandle GetPlatformCursor(ui::mojom::CursorType type);
#endif
// The background color of the web content.

View File

@ -179,7 +179,7 @@ XCursorCache* cursor_cache = nullptr;
} // namespace
#endif // defined(USE_X11)
ui::PlatformCursor CefRenderWidgetHostViewOSR::GetPlatformCursor(
CefCursorHandle CefRenderWidgetHostViewOSR::GetPlatformCursor(
ui::mojom::CursorType type) {
#if defined(USE_X11)
if (type == ui::mojom::CursorType::kNone) {

View File

@ -153,7 +153,7 @@ bool IsSystemCursorID(LPCWSTR cursor_id) {
} // namespace
ui::PlatformCursor CefRenderWidgetHostViewOSR::GetPlatformCursor(
CefCursorHandle CefRenderWidgetHostViewOSR::GetPlatformCursor(
ui::mojom::CursorType type) {
// Using a dark 1x1 bit bmp kNone cursor may still cause DWM to do composition
// work unnecessarily. Better to totally remove it from the screen.

View File

@ -106,8 +106,7 @@ void CefVideoConsumerOSR::OnFrameCaptured(
// API requires a non-const pointer. So, cast away the const.
void* const pixels = const_cast<void*>(mapping.memory());
media::VideoFrameMetadata metadata;
metadata.MergeInternalValuesFrom(info->metadata);
media::VideoFrameMetadata metadata = info->metadata;
gfx::Rect damage_rect;
if (bounds_in_pixels_) {
@ -123,9 +122,10 @@ void CefVideoConsumerOSR::OnFrameCaptured(
// This rectangle is relative to the full frame data, i.e. [0, 0,
// coded_size.width(), coded_size.height()]. It does not have to be
// fully contained within visible_rect.
if (!metadata.GetRect(media::VideoFrameMetadata::CAPTURE_UPDATE_RECT,
&damage_rect) ||
damage_rect.IsEmpty()) {
if (metadata.capture_update_rect) {
damage_rect = *metadata.capture_update_rect;
}
if (damage_rect.IsEmpty()) {
damage_rect = gfx::Rect(info->coded_size);
}
}

View File

@ -48,8 +48,8 @@ gfx::NativeWindow CefWebContentsViewOSR::GetTopLevelNativeWindow() const {
return gfx::NativeWindow();
}
void CefWebContentsViewOSR::GetContainerBounds(gfx::Rect* out) const {
*out = GetViewBounds();
gfx::Rect CefWebContentsViewOSR::GetContainerBounds() const {
return GetViewBounds();
}
void CefWebContentsViewOSR::Focus() {}
@ -150,7 +150,8 @@ void CefWebContentsViewOSR::StartDragging(
browser->StartDragging(drop_data, allowed_ops, image, image_offset,
event_info, source_rwh);
} else if (web_contents_) {
web_contents_->SystemDragEnded(source_rwh);
static_cast<content::WebContentsImpl*>(web_contents_)
->SystemDragEnded(source_rwh);
}
}

View File

@ -35,7 +35,7 @@ class CefWebContentsViewOSR : public content::WebContentsView,
gfx::NativeView GetNativeView() const override;
gfx::NativeView GetContentNativeView() const override;
gfx::NativeWindow GetTopLevelNativeWindow() const override;
void GetContainerBounds(gfx::Rect* out) const override;
gfx::Rect GetContainerBounds() const override;
void Focus() override;
void SetInitialFocus() override;
void StoreFocus() override;

View File

@ -6,6 +6,7 @@
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/notreached.h"
#include "base/path_service.h"
#include "chrome/common/chrome_paths.h"

View File

@ -317,7 +317,7 @@ void CefPrintDialogLinux::OnPrintCancel() {
void CefPrintDialogLinux::OnJobCompleted() {
CEF_POST_BACKGROUND_TASK(
base::Bind(base::IgnoreResult(&base::DeleteFile), path_to_pdf_, false));
base::BindOnce(base::GetDeleteFileCallback(), path_to_pdf_));
// Printing finished. Matches AddRef() in PrintDocument();
Release();

View File

@ -139,8 +139,8 @@ void StopWorker(int document_cookie) {
std::unique_ptr<PrinterQuery> printer_query =
queue->PopPrinterQuery(document_cookie);
if (printer_query.get()) {
base::PostTask(
FROM_HERE, {BrowserThread::IO},
content::GetIOThreadTaskRunner({})->PostTask(
FROM_HERE,
base::BindOnce(&PrinterQuery::StopWorker, std::move(printer_query)));
}
}
@ -160,7 +160,8 @@ void SavePdfFile(scoped_refptr<base::RefCountedSharedMemoryMapping> data,
bool ok = file.IsValid() && metafile.SaveTo(&file);
if (!callback.is_null()) {
base::PostTask(FROM_HERE, {BrowserThread::UI}, base::Bind(callback, ok));
content::GetUIThreadTaskRunner({})->PostTask(FROM_HERE,
base::Bind(callback, ok));
}
}
@ -193,9 +194,8 @@ bool CefPrintViewManager::PrintToPDF(content::RenderFrameHost* rfh,
if (pdf_print_state_)
return false;
// Don't print interstitials or crashed tabs.
if (!web_contents() || web_contents()->ShowingInterstitialPage() ||
web_contents()->IsCrashed()) {
// Don't print crashed tabs.
if (!web_contents() || web_contents()->IsCrashed()) {
return false;
}
@ -342,8 +342,8 @@ void CefPrintViewManager::TerminatePdfPrintJob() {
if (!pdf_print_state_->callback_.is_null()) {
// Execute the callback.
base::PostTask(FROM_HERE, {BrowserThread::UI},
base::Bind(pdf_print_state_->callback_, false));
content::GetUIThreadTaskRunner({})->PostTask(
FROM_HERE, base::Bind(pdf_print_state_->callback_, false));
}
// Reset state information.

View File

@ -79,8 +79,7 @@ CefPrintingMessageFilter::CefPrintingMessageFilter(int render_process_id,
->Subscribe(base::Bind(&CefPrintingMessageFilter::ShutdownOnUIThread,
base::Unretained(this)));
is_printing_enabled_.Init(prefs::kPrintingEnabled, profile->GetPrefs());
is_printing_enabled_.MoveToSequence(
base::CreateSingleThreadTaskRunner({BrowserThread::IO}));
is_printing_enabled_.MoveToSequence(content::GetIOThreadTaskRunner({}));
}
void CefPrintingMessageFilter::EnsureShutdownNotifierFactoryBuilt() {

View File

@ -6,6 +6,7 @@
#include "libcef/common/command_line_impl.h"
#include "base/logging.h"
#include "base/notreached.h"
#include "base/process/launch.h"
#include "content/public/browser/child_process_launcher_utils.h"

View File

@ -357,7 +357,7 @@ bool CefRequestContextImpl::ClearSchemeHandlerFactories() {
void CefRequestContextImpl::PurgePluginListCache(bool reload_pages) {
GetBrowserContext(
base::CreateSingleThreadTaskRunner({BrowserThread::UI}),
content::GetUIThreadTaskRunner({}),
base::Bind(&CefRequestContextImpl::PurgePluginListCacheInternal, this,
reload_pages));
}
@ -489,7 +489,7 @@ bool CefRequestContextImpl::SetPreference(const CefString& name,
void CefRequestContextImpl::ClearCertificateExceptions(
CefRefPtr<CefCompletionCallback> callback) {
GetBrowserContext(
base::CreateSingleThreadTaskRunner({BrowserThread::UI}),
content::GetUIThreadTaskRunner({}),
base::Bind(&CefRequestContextImpl::ClearCertificateExceptionsInternal,
this, callback));
}
@ -497,7 +497,7 @@ void CefRequestContextImpl::ClearCertificateExceptions(
void CefRequestContextImpl::ClearHttpAuthCredentials(
CefRefPtr<CefCompletionCallback> callback) {
GetBrowserContext(
base::CreateSingleThreadTaskRunner({BrowserThread::UI}),
content::GetUIThreadTaskRunner({}),
base::Bind(&CefRequestContextImpl::ClearHttpAuthCredentialsInternal, this,
callback));
}
@ -505,7 +505,7 @@ void CefRequestContextImpl::ClearHttpAuthCredentials(
void CefRequestContextImpl::CloseAllConnections(
CefRefPtr<CefCompletionCallback> callback) {
GetBrowserContext(
base::CreateSingleThreadTaskRunner({BrowserThread::UI}),
content::GetUIThreadTaskRunner({}),
base::Bind(&CefRequestContextImpl::CloseAllConnectionsInternal, this,
callback));
}
@ -513,7 +513,7 @@ void CefRequestContextImpl::CloseAllConnections(
void CefRequestContextImpl::ResolveHost(
const CefString& origin,
CefRefPtr<CefResolveCallback> callback) {
GetBrowserContext(base::CreateSingleThreadTaskRunner({BrowserThread::UI}),
GetBrowserContext(content::GetUIThreadTaskRunner({}),
base::Bind(&CefRequestContextImpl::ResolveHostInternal,
this, origin, callback));
}

View File

@ -119,6 +119,15 @@ class UserData : public base::SupportsUserData::Data {
CefView* view_ref_;
};
inline CefWindowHandle ToWindowHandle(gfx::AcceleratedWidget widget) {
#if defined(USE_X11)
// See https://crbug.com/1066670#c57 for background.
return static_cast<uint32_t>(widget);
#else
return widget;
#endif
}
} // namespace
const SkColor kDefaultBackgroundColor = SkColorSetARGB(255, 255, 255, 255);
@ -304,7 +313,7 @@ CefWindowHandle GetWindowHandle(views::Widget* widget) {
if (widget) {
aura::Window* window = widget->GetNativeWindow();
if (window && window->GetRootWindow())
return window->GetHost()->GetAcceleratedWidget();
return ToWindowHandle(window->GetHost()->GetAcceleratedWidget());
}
return kNullWindowHandle;
}

View File

@ -3,9 +3,12 @@
// can be found in the LICENSE file.
#include "libcef/browser/xml_reader_impl.h"
#include "base/logging.h"
#include "include/cef_stream.h"
#include "base/logging.h"
#include "base/notreached.h"
// Static functions
// static

View File

@ -5,6 +5,7 @@
#include "libcef/browser/zip_reader_impl.h"
#include <time.h>
#include "base/logging.h"
#include "base/notreached.h"
#include "include/cef_stream.h"
// Static functions

View File

@ -4,6 +4,7 @@
#include "libcef/common/cef_crash_report_upload_thread.h"
#include "base/notreached.h"
#include "libcef/common/cef_crash_report_utils.h"
#include "third_party/crashpad/crashpad/client/settings.h"

View File

@ -15,6 +15,7 @@
#include "base/stl_util.h"
#include "base/strings/string16.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_piece.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"

View File

@ -14,6 +14,7 @@
#include "include/cef_version.h"
#include "base/macros.h"
#include "base/strings/string_piece_forward.h"
#include "base/synchronization/lock.h"
#include "build/build_config.h"
#include "components/crash/core/app/crash_reporter_client.h"

View File

@ -11,6 +11,7 @@
#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/debug/crash_logging.h"
#include "base/logging.h"
#include "base/stl_util.h"
#include "base/strings/string_piece.h"
#include "base/strings/string_util.h"

View File

@ -81,12 +81,12 @@ CefString CefDragDataImpl::GetLinkMetadata() {
CefString CefDragDataImpl::GetFragmentText() {
base::AutoLock lock_scope(lock_);
return data_.text.is_null() ? CefString() : CefString(data_.text.string());
return data_.text ? CefString(*data_.text) : CefString();
}
CefString CefDragDataImpl::GetFragmentHtml() {
base::AutoLock lock_scope(lock_);
return data_.html.is_null() ? CefString() : CefString(data_.html.string());
return data_.html ? CefString(*data_.html) : CefString();
}
CefString CefDragDataImpl::GetFragmentBaseURL() {
@ -96,8 +96,7 @@ CefString CefDragDataImpl::GetFragmentBaseURL() {
CefString CefDragDataImpl::GetFileName() {
base::AutoLock lock_scope(lock_);
base::Optional<base::FilePath> filename =
data_.GetSafeFilenameForImageFileContents();
auto filename = data_.GetSafeFilenameForImageFileContents();
return filename ? CefString(filename->value()) : CefString();
}
@ -148,13 +147,13 @@ void CefDragDataImpl::SetLinkMetadata(const CefString& data) {
void CefDragDataImpl::SetFragmentText(const CefString& text) {
base::AutoLock lock_scope(lock_);
CHECK_READONLY_RETURN_VOID();
data_.text = base::NullableString16(text.ToString16(), false);
data_.text = text.ToString16();
}
void CefDragDataImpl::SetFragmentHtml(const CefString& fragment) {
base::AutoLock lock_scope(lock_);
CHECK_READONLY_RETURN_VOID();
data_.html = base::NullableString16(fragment.ToString16(), false);
data_.html = fragment.ToString16();
}
void CefDragDataImpl::SetFragmentBaseURL(const CefString& fragment) {

View File

@ -4,6 +4,7 @@
#include "libcef/common/net/net_resource_provider.h"
#include "base/logging.h"
#include "chrome/common/net/net_resource_provider.h"
scoped_refptr<base::RefCountedMemory> NetResourceProvider(int key) {

View File

@ -11,6 +11,7 @@
#include <vector>
#include "base/files/file_path.h"
#include "base/macros.h"
#include "base/time/time.h"
#include "net/base/net_export.h"

View File

@ -11,6 +11,7 @@
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/notreached.h"
#include "base/path_service.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"

View File

@ -8,7 +8,6 @@
#include "base/bind.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
#include "base/task/post_task.h"
#include "base/threading/thread_task_runner_handle.h"
#include "content/public/browser/browser_task_traits.h"

View File

@ -6,11 +6,11 @@
#include "libcef/browser/net_service/browser_urlrequest_impl.h"
#include "libcef/common/app_manager.h"
#include "libcef/common/task_runner_impl.h"
#include "libcef/renderer/render_urlrequest_impl.h"
#include "libcef/features/runtime_checks.h"
#include "libcef/renderer/render_urlrequest_impl.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
#include "base/notreached.h"
#include "content/public/common/content_client.h"
// static

View File

@ -12,6 +12,7 @@
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/notreached.h"
#include "base/synchronization/lock.h"
#include "base/thread_annotations.h"
#include "base/threading/platform_thread.h"

View File

@ -6,6 +6,7 @@
#include "include/cef_task.h"
#include "base/notreached.h"
#include "base/time/time.h"
namespace {

View File

@ -24,6 +24,7 @@
#include "third_party/blink/renderer/core/editing/serializers/serialization.h"
#include "third_party/blink/renderer/core/exported/web_view_impl.h"
#include "third_party/blink/renderer/core/frame/frame_owner.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
@ -150,7 +151,7 @@ v8::MaybeLocal<v8::Value> CallV8Function(v8::Local<v8::Context> context,
blink::LocalFrame* frame = blink::ToLocalFrameIfNotDetached(context);
DCHECK(frame);
if (frame &&
frame->GetDocument()->CanExecuteScripts(blink::kAboutToExecuteScript)) {
frame->DomWindow()->CanExecuteScripts(blink::kAboutToExecuteScript)) {
func_rv = blink::V8ScriptRunner::CallFunction(
function, frame->GetDocument()->GetExecutionContext(), receiver, argc,
args, isolate);

View File

@ -13,6 +13,7 @@
#include "include/internal/cef_types.h"
#include "base/macros.h"
#include "third_party/blink/public/platform/web_common.h"
#include "third_party/blink/renderer/bindings/core/v8/sanitize_script_errors.h"
#include "v8/include/v8.h"

View File

@ -51,7 +51,6 @@ bool CefRenderFrameObserver::OnAssociatedInterfaceRequestForFrame(
}
void CefRenderFrameObserver::DidCommitProvisionalLoad(
bool is_same_document_navigation,
ui::PageTransition transition) {
if (!frame_)
return;

View File

@ -28,8 +28,7 @@ class CefRenderFrameObserver : public content::RenderFrameObserver {
bool OnAssociatedInterfaceRequestForFrame(
const std::string& interface_name,
mojo::ScopedInterfaceEndpointHandle* handle) override;
void DidCommitProvisionalLoad(bool is_same_document_navigation,
ui::PageTransition transition) override;
void DidCommitProvisionalLoad(ui::PageTransition transition) override;
void DidFailProvisionalLoad() override;
void DidFinishLoad() override;
void FrameDetached() override;

View File

@ -14,7 +14,6 @@
#include "libcef/renderer/frame_impl.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
#include "net/base/request_priority.h"
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom.h"
#include "third_party/blink/public/mojom/loader/resource_load_info.mojom.h"

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=3a295e7d6703e2e8effd94da8e97d8b7f451dc32$
// $hash=53dca3d842bb3d2f8a329a38759eb623620439a2$
//
#include "libcef_dll/cpptoc/media_sink_cpptoc.h"
@ -37,22 +37,6 @@ media_sink_get_id(struct _cef_media_sink_t* self) {
return _retval.DetachToUserFree();
}
int CEF_CALLBACK media_sink_is_valid(struct _cef_media_sink_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefMediaSinkCppToC::Get(self)->IsValid();
// Return type: bool
return _retval;
}
cef_string_userfree_t CEF_CALLBACK
media_sink_get_name(struct _cef_media_sink_t* self) {
shutdown_checker::AssertNotShutdown();
@ -166,7 +150,6 @@ media_sink_is_compatible_with(struct _cef_media_sink_t* self,
CefMediaSinkCppToC::CefMediaSinkCppToC() {
GetStruct()->get_id = media_sink_get_id;
GetStruct()->is_valid = media_sink_is_valid;
GetStruct()->get_name = media_sink_get_name;
GetStruct()->get_description = media_sink_get_description;
GetStruct()->get_icon_type = media_sink_get_icon_type;

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=ddd51b3c8020de1b10b00eef06d745a498168323$
// $hash=74a4cfec87c4f42891695c46b3cfcc8683403923$
//
#include "libcef_dll/cpptoc/media_source_cpptoc.h"
@ -36,22 +36,6 @@ media_source_get_id(struct _cef_media_source_t* self) {
return _retval.DetachToUserFree();
}
int CEF_CALLBACK media_source_is_valid(struct _cef_media_source_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefMediaSourceCppToC::Get(self)->IsValid();
// Return type: bool
return _retval;
}
int CEF_CALLBACK media_source_is_cast_source(struct _cef_media_source_t* self) {
shutdown_checker::AssertNotShutdown();
@ -90,7 +74,6 @@ int CEF_CALLBACK media_source_is_dial_source(struct _cef_media_source_t* self) {
CefMediaSourceCppToC::CefMediaSourceCppToC() {
GetStruct()->get_id = media_source_get_id;
GetStruct()->is_valid = media_source_is_valid;
GetStruct()->is_cast_source = media_source_is_cast_source;
GetStruct()->is_dial_source = media_source_is_dial_source;
}

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=63071af2d949b451ad0e7273ca0f5d7bfec425db$
// $hash=6ffdd140e2cb688f1d7db2eb1e2356a62ac08e5e$
//
#include "libcef_dll/ctocpp/media_sink_ctocpp.h"
@ -36,22 +36,6 @@ NO_SANITIZE("cfi-icall") CefString CefMediaSinkCToCpp::GetId() {
return _retvalStr;
}
NO_SANITIZE("cfi-icall") bool CefMediaSinkCToCpp::IsValid() {
shutdown_checker::AssertNotShutdown();
cef_media_sink_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, is_valid))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->is_valid(_struct);
// Return type: bool
return _retval ? true : false;
}
NO_SANITIZE("cfi-icall") CefString CefMediaSinkCToCpp::GetName() {
shutdown_checker::AssertNotShutdown();

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=c57a82e66fdcd26f70a69fbd92554ca8aa38495c$
// $hash=9d3af9897a857a63abec8327f84f5d809be603da$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_MEDIA_SINK_CTOCPP_H_
@ -35,7 +35,6 @@ class CefMediaSinkCToCpp : public CefCToCppRefCounted<CefMediaSinkCToCpp,
// CefMediaSink methods.
CefString GetId() OVERRIDE;
bool IsValid() OVERRIDE;
CefString GetName() OVERRIDE;
CefString GetDescription() OVERRIDE;
IconType GetIconType() OVERRIDE;

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=2b4f20db4eccd1429c748f39db19852cd1644b4a$
// $hash=42bb3686f7f20a5c8cf18d0123fb1f223cb30179$
//
#include "libcef_dll/ctocpp/media_source_ctocpp.h"
@ -35,22 +35,6 @@ NO_SANITIZE("cfi-icall") CefString CefMediaSourceCToCpp::GetId() {
return _retvalStr;
}
NO_SANITIZE("cfi-icall") bool CefMediaSourceCToCpp::IsValid() {
shutdown_checker::AssertNotShutdown();
cef_media_source_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, is_valid))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->is_valid(_struct);
// Return type: bool
return _retval ? true : false;
}
NO_SANITIZE("cfi-icall") bool CefMediaSourceCToCpp::IsCastSource() {
shutdown_checker::AssertNotShutdown();

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=73aeb0f58611c0d7a9fa13f1d9268912e0fba0bd$
// $hash=91c81b57c0fef20afad90845e5e71def3163cd20$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_MEDIA_SOURCE_CTOCPP_H_
@ -35,7 +35,6 @@ class CefMediaSourceCToCpp : public CefCToCppRefCounted<CefMediaSourceCToCpp,
// CefMediaSource methods.
CefString GetId() OVERRIDE;
bool IsValid() OVERRIDE;
bool IsCastSource() OVERRIDE;
bool IsDialSource() OVERRIDE;
};

View File

@ -9,10 +9,9 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=c5439c177bd70bf3d8d52e0381c08d6276453183$
// $hash=149869a5e699a8fbd8a6926cbf388c3653cbec6a$
//
#include "base/logging.h"
#include "include/views/cef_browser_view.h"
#include "include/views/cef_display.h"
#include "include/views/cef_label_button.h"
@ -22,6 +21,9 @@
#include "include/views/cef_textfield.h"
#include "include/views/cef_window.h"
#include "base/logging.h"
#include "base/notreached.h"
// STATIC STUB METHODS - Do not edit by hand.
NO_SANITIZE("cfi-icall")

View File

@ -501,12 +501,6 @@ patches = [
# https://bugs.chromium.org/p/chromium/issues/detail?id=1081397#c9
'name': 'browser_security_policy_1081397',
},
{
# Linux: Fix undefined symbol: ui::GtkUiDelegate::SetInstance in
# ChromeBrowserMainExtraPartsViewsLinux::ToolkitInitialized.
# https://bugs.chromium.org/p/chromium/issues/detail?id=1085806
'name': 'linux_chrome_views_1085806',
},
{
# Linux: Fix undefined symbol: ResourceMapper::MapToJavaDrawableId in
# ChromePageInfoClient::GetJavaResourceId.

View File

@ -1,16 +1,16 @@
diff --git base/BUILD.gn base/BUILD.gn
index c3baf1ffdee3..6a4765994566 100644
index fb85807363f1..bdef6c7f64c7 100644
--- base/BUILD.gn
+++ base/BUILD.gn
@@ -34,6 +34,7 @@ import("//build/config/sysroot.gni")
import("//build/config/ui.gni")
@@ -34,6 +34,7 @@ import("//build/config/ui.gni")
import("//build/nocompile.gni")
import("//build/timestamp.gni")
import("//build_overrides/build.gni")
+import("//cef/libcef/features/features.gni")
import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni")
import("//third_party/icu/config.gni")
@@ -1665,7 +1666,11 @@ jumbo_component("base") {
@@ -1634,7 +1635,11 @@ jumbo_component("base") {
"hash/md5_constexpr_internal.h",
"hash/sha1.h",
]

View File

@ -1,8 +1,8 @@
diff --git content/browser/scheduler/browser_task_executor.cc content/browser/scheduler/browser_task_executor.cc
index 332ef34e24dc..ee866ca5f3b6 100644
index df3ab602e8b8..fa864443fe35 100644
--- content/browser/scheduler/browser_task_executor.cc
+++ content/browser/scheduler/browser_task_executor.cc
@@ -244,7 +244,7 @@ void BrowserTaskExecutor::PostFeatureListSetup() {
@@ -240,7 +240,7 @@ void BrowserTaskExecutor::PostFeatureListSetup() {
// static
void BrowserTaskExecutor::Shutdown() {

View File

@ -1,8 +1,8 @@
diff --git content/browser/child_process_security_policy_impl.cc content/browser/child_process_security_policy_impl.cc
index c2b7778788b3..7723dfb98683 100644
index ca111c5b80ee..35e734fe6a54 100644
--- content/browser/child_process_security_policy_impl.cc
+++ content/browser/child_process_security_policy_impl.cc
@@ -1494,6 +1494,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForOrigin(
@@ -1498,6 +1498,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForOrigin(
// DeclarativeApiTest.PersistRules.
if (actual_process_lock.SchemeIs(url::kDataScheme))
return true;

View File

@ -1,8 +1,8 @@
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
index 01d97a3605ff..bf0ef4f3cc30 100644
index 6e219b3994e2..0e14d81370ef 100644
--- build/config/compiler/BUILD.gn
+++ build/config/compiler/BUILD.gn
@@ -1718,8 +1718,6 @@ config("thin_archive") {
@@ -1742,8 +1742,6 @@ config("thin_archive") {
# archive names to 16 characters, which is not what we want).
if ((is_posix && !is_nacl && !is_mac && !is_ios) || is_fuchsia) {
arflags = [ "-T" ]

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
index ffbec39c3e56..573ee6f18653 100644
index 9fe789540c05..a2646c13e5d5 100644
--- chrome/browser/BUILD.gn
+++ chrome/browser/BUILD.gn
@@ -11,6 +11,7 @@ import("//build/config/crypto.gni")
@@ -12,6 +12,7 @@ import("//build/config/crypto.gni")
import("//build/config/features.gni")
import("//build/config/linux/gtk/gtk.gni")
import("//build/config/ui.gni")
@ -10,7 +10,7 @@ index ffbec39c3e56..573ee6f18653 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/browser/downgrade/buildflags.gni")
import("//chrome/common/features.gni")
@@ -1979,6 +1980,7 @@ static_library("browser") {
@@ -1824,6 +1825,7 @@ static_library("browser") {
"//base/util/values:values_util",
"//build:branding_buildflags",
"//cc",
@ -18,7 +18,7 @@ index ffbec39c3e56..573ee6f18653 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -2313,6 +2315,10 @@ static_library("browser") {
@@ -2156,6 +2158,10 @@ static_library("browser") {
]
}

View File

@ -2,7 +2,7 @@ diff --git chrome/browser/app_controller_mac.mm chrome/browser/app_controller_ma
index 559e51776e42..a429421f7c61 100644
--- chrome/browser/app_controller_mac.mm
+++ chrome/browser/app_controller_mac.mm
@@ -1140,6 +1140,7 @@ - (void)commandDispatch:(id)sender {
@@ -1140,6 +1140,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
// Run a (background) application in a new tab.
- (void)executeApplication:(id)sender {
@ -10,7 +10,7 @@ index 559e51776e42..a429421f7c61 100644
NSInteger tag = [sender tag];
Profile* profile = [self lastProfile];
DCHECK(profile);
@@ -1148,6 +1149,7 @@ - (void)executeApplication:(id)sender {
@@ -1148,6 +1149,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
tag < static_cast<int>(applications.size()));
const extensions::Extension* extension = applications.GetExtension(tag);
BackgroundModeManager::LaunchBackgroundApplication(profile, extension);
@ -18,7 +18,7 @@ index 559e51776e42..a429421f7c61 100644
}
// Same as |-commandDispatch:|, but executes commands using a disposition
@@ -1529,6 +1531,7 @@ - (NSMenu*)applicationDockMenu:(NSApplication*)sender {
@@ -1529,6 +1531,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
// TODO(rickcam): Mock out BackgroundApplicationListModel, then add unit
// tests which use the mock in place of the profile-initialized model.
@ -26,7 +26,7 @@ index 559e51776e42..a429421f7c61 100644
// Avoid breaking unit tests which have no profile.
if (profile) {
BackgroundApplicationListModel applications(profile);
@@ -1555,6 +1558,7 @@ - (NSMenu*)applicationDockMenu:(NSApplication*)sender {
@@ -1555,6 +1558,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
}
}
}
@ -35,10 +35,10 @@ index 559e51776e42..a429421f7c61 100644
return dockMenu;
}
diff --git chrome/browser/browser_process.h chrome/browser/browser_process.h
index 6332572ac884..bf555124ce59 100644
index 132f2a8d15fd..1262f31d39db 100644
--- chrome/browser/browser_process.h
+++ chrome/browser/browser_process.h
@@ -197,10 +197,12 @@ class BrowserProcess {
@@ -201,10 +201,12 @@ class BrowserProcess {
virtual DownloadStatusUpdater* download_status_updater() = 0;
virtual DownloadRequestLimiter* download_request_limiter() = 0;
@ -52,10 +52,10 @@ index 6332572ac884..bf555124ce59 100644
// Returns the StatusTray, which provides an API for displaying status icons
// in the system status tray. Returns NULL if status icons are not supported
diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc
index 13958187a750..0017954a32da 100644
index 77faedcc2944..4d06b472dc64 100644
--- chrome/browser/browser_process_impl.cc
+++ chrome/browser/browser_process_impl.cc
@@ -963,24 +963,19 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
@@ -964,24 +964,19 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
return download_request_limiter_.get();
}
@ -83,7 +83,7 @@ index 13958187a750..0017954a32da 100644
StatusTray* BrowserProcessImpl::status_tray() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h
index 12c76fb96762..60637b2b0044 100644
index 5ac13a0eecee..0bb9262acf1b 100644
--- chrome/browser/browser_process_impl.h
+++ chrome/browser/browser_process_impl.h
@@ -164,9 +164,11 @@ class BrowserProcessImpl : public BrowserProcess,
@ -99,10 +99,10 @@ index 12c76fb96762..60637b2b0044 100644
safe_browsing::SafeBrowsingService* safe_browsing_service() override;
subresource_filter::RulesetService* subresource_filter_ruleset_service()
diff --git chrome/browser/lifetime/browser_close_manager.cc chrome/browser/lifetime/browser_close_manager.cc
index bc7995a47fbd..28d3658d2885 100644
index 2f6bb4a8cd34..d6ba58c228aa 100644
--- chrome/browser/lifetime/browser_close_manager.cc
+++ chrome/browser/lifetime/browser_close_manager.cc
@@ -147,12 +147,14 @@ void BrowserCloseManager::CloseBrowsers() {
@@ -148,12 +148,14 @@ void BrowserCloseManager::CloseBrowsers() {
// exit can restore all browsers open before exiting.
ProfileManager::ShutdownSessionServices();
#endif

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/content_settings/host_content_settings_map_factory.cc chrome/browser/content_settings/host_content_settings_map_factory.cc
index bf7534ed9436..dbbc552ce1b3 100644
index e5c0070b722e..987ded2bacfb 100644
--- chrome/browser/content_settings/host_content_settings_map_factory.cc
+++ chrome/browser/content_settings/host_content_settings_map_factory.cc
@@ -8,6 +8,7 @@
@ -36,7 +36,7 @@ index bf7534ed9436..dbbc552ce1b3 100644
#endif
}
@@ -97,10 +108,16 @@ scoped_refptr<RefcountedKeyedService>
@@ -99,10 +110,16 @@ scoped_refptr<RefcountedKeyedService>
std::move(allowlist_provider));
#if BUILDFLAG(ENABLE_EXTENSIONS)

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index 284154368652..cdd775136329 100644
index 7f8d13d8c4c2..ab5688900991 100644
--- chrome/browser/ui/BUILD.gn
+++ chrome/browser/ui/BUILD.gn
@@ -9,6 +9,7 @@ import("//build/config/crypto.gni")
@ -10,7 +10,7 @@ index 284154368652..cdd775136329 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/common/features.gni")
import("//chromeos/assistant/assistant.gni")
@@ -362,6 +363,10 @@ static_library("ui") {
@@ -335,6 +336,10 @@ static_library("ui") {
"//build/config/compiler:wexit_time_destructors",
]
@ -21,7 +21,7 @@ index 284154368652..cdd775136329 100644
# Since browser and browser_ui actually depend on each other,
# we must omit the dependency from browser_ui to browser.
# However, this means browser_ui and browser should more or less
@@ -383,6 +388,7 @@ static_library("ui") {
@@ -356,6 +361,7 @@ static_library("ui") {
"//base/allocator:buildflags",
"//build:branding_buildflags",
"//cc/paint",
@ -29,7 +29,7 @@ index 284154368652..cdd775136329 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -1489,6 +1495,7 @@ static_library("ui") {
@@ -1473,6 +1479,7 @@ static_library("ui") {
"//components/keep_alive_registry",
"//components/network_session_configurator/common",
"//components/page_load_metrics/browser",

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
index dd86e2e35910..624904c5fef2 100644
index d27f4eb65fa9..9bf1bde37e63 100644
--- chrome/browser/chrome_content_browser_client.cc
+++ chrome/browser/chrome_content_browser_client.cc
@@ -1001,10 +1001,6 @@ void LaunchURL(const GURL& url,
@@ -1021,10 +1021,6 @@ void LaunchURL(const GURL& url,
}
}
@ -13,7 +13,7 @@ index dd86e2e35910..624904c5fef2 100644
void MaybeAppendSecureOriginsAllowlistSwitch(base::CommandLine* cmdline) {
// |allowlist| combines pref/policy + cmdline switch in the browser process.
// For renderer and utility (e.g. NetworkService) processes the switch is the
@@ -1171,6 +1167,14 @@ const blink::UserAgentBrandList& GetBrandVersionList() {
@@ -1191,6 +1187,14 @@ const blink::UserAgentBrandList& GetBrandVersionList() {
return *greased_brand_version_list;
}
@ -29,10 +29,10 @@ index dd86e2e35910..624904c5fef2 100644
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kUserAgent)) {
diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h
index cd96f6bf1cb7..007d024f7dc8 100644
index dad13f199206..43fbc32b5d83 100644
--- chrome/browser/chrome_content_browser_client.h
+++ chrome/browser/chrome_content_browser_client.h
@@ -90,7 +90,8 @@ class ChromeXrIntegrationClient;
@@ -91,7 +91,8 @@ class ChromeXrIntegrationClient;
}
#endif

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
index 8ce681f0d694..9bc310da1695 100644
index f81028b5cda7..9b934d020ce6 100644
--- chrome/browser/profiles/profile_manager.cc
+++ chrome/browser/profiles/profile_manager.cc
@@ -378,7 +378,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
@@ -377,7 +377,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED,
content::NotificationService::AllSources());

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn
index d041bd3f61a8..5f2feb9cd4c5 100644
index 82edacf2604a..01c21d259dda 100644
--- chrome/browser/safe_browsing/BUILD.gn
+++ chrome/browser/safe_browsing/BUILD.gn
@@ -248,6 +248,7 @@ static_library("safe_browsing") {
@@ -251,6 +251,7 @@ static_library("safe_browsing") {
"//chrome/common/safe_browsing:download_type_util",
"//chrome/services/file_util/public/cpp",
"//components/content_settings/core/browser",

View File

@ -164,16 +164,18 @@ index 4e64db143b8a..3dc127b7b992 100644
Profile* profile = Profile::FromBrowserContext(browser_context);
std::vector<std::string> whitelist = MimeTypesHandler::GetMIMETypeWhitelist();
diff --git chrome/common/google_url_loader_throttle.cc chrome/common/google_url_loader_throttle.cc
index a9ee607a2cb0..347261030e0e 100644
index c1870b0f56ef..d32b8d54fb3f 100644
--- chrome/common/google_url_loader_throttle.cc
+++ chrome/common/google_url_loader_throttle.cc
@@ -5,10 +5,15 @@
#include "chrome/common/google_url_loader_throttle.h"
@@ -7,12 +7,17 @@
#include "base/feature_list.h"
#include "base/metrics/histogram_functions.h"
#include "build/build_config.h"
+#include "cef/libcef/features/features.h"
+#include "cef/libcef/features/runtime.h"
#include "chrome/common/chrome_features.h"
#include "chrome/common/net/safe_search_util.h"
#include "components/google/core/common/google_util.h"
#include "net/base/url_util.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
+#if BUILDFLAG(ENABLE_CEF)
@ -183,12 +185,12 @@ index a9ee607a2cb0..347261030e0e 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "extensions/common/extension_urls.h"
#endif
@@ -126,6 +131,11 @@ void GoogleURLLoaderThrottle::WillProcessResponse(
@@ -152,6 +157,11 @@ void GoogleURLLoaderThrottle::WillProcessResponse(
const GURL& response_url,
network::mojom::URLResponseHead* response_head,
bool* defer) {
+#if BUILDFLAG(ENABLE_CEF)
+ if (!extensions::ExtensionsEnabled())
+ if (cef::IsAlloyRuntimeEnabled() && !extensions::ExtensionsEnabled())
+ return;
+#endif
+
@ -196,10 +198,10 @@ index a9ee607a2cb0..347261030e0e 100644
GURL webstore_url(extension_urls::GetWebstoreLaunchURL());
if (response_url.SchemeIsHTTPOrHTTPS() &&
diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc
index c1d92ae00fe5..2574fb1430ed 100644
index 03d1e6a07843..2fd040ed87b5 100644
--- chrome/renderer/chrome_content_renderer_client.cc
+++ chrome/renderer/chrome_content_renderer_client.cc
@@ -831,6 +831,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -842,6 +842,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
if ((status == chrome::mojom::PluginStatus::kUnauthorized ||
status == chrome::mojom::PluginStatus::kBlocked) &&
@ -207,7 +209,7 @@ index c1d92ae00fe5..2574fb1430ed 100644
content_settings_agent_delegate->IsPluginTemporarilyAllowed(
identifier)) {
status = chrome::mojom::PluginStatus::kAllowed;
@@ -1034,7 +1035,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1045,7 +1046,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
plugin_auth_host.BindNewEndpointAndPassReceiver());
plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier);
@ -217,7 +219,7 @@ index c1d92ae00fe5..2574fb1430ed 100644
break;
}
case chrome::mojom::PluginStatus::kBlocked: {
@@ -1043,7 +1045,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1054,7 +1056,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
placeholder->AllowLoading();
RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked"));
@ -227,7 +229,7 @@ index c1d92ae00fe5..2574fb1430ed 100644
break;
}
case chrome::mojom::PluginStatus::kBlockedByPolicy: {
@@ -1053,7 +1056,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1064,7 +1067,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
group_name));
RenderThread::Get()->RecordAction(
UserMetricsAction("Plugin_BlockedByPolicy"));
@ -237,7 +239,7 @@ index c1d92ae00fe5..2574fb1430ed 100644
break;
}
case chrome::mojom::PluginStatus::kBlockedNoLoading: {
@@ -1061,7 +1065,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1072,7 +1076,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
IDR_BLOCKED_PLUGIN_HTML,
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING,
group_name));
@ -248,7 +250,7 @@ index c1d92ae00fe5..2574fb1430ed 100644
}
case chrome::mojom::PluginStatus::kComponentUpdateRequired: {
diff --git chrome/renderer/plugins/chrome_plugin_placeholder.cc chrome/renderer/plugins/chrome_plugin_placeholder.cc
index 4410ede5cb61..b15fa6406a9d 100644
index d662fe9310c9..c4c406d16b95 100644
--- chrome/renderer/plugins/chrome_plugin_placeholder.cc
+++ chrome/renderer/plugins/chrome_plugin_placeholder.cc
@@ -360,8 +360,11 @@ void ChromePluginPlaceholder::OnBlockedContent(

View File

@ -1,5 +1,5 @@
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
index 2ea489762ef5..707431840be8 100644
index 22e0426b61aa..88d226174831 100644
--- chrome/renderer/BUILD.gn
+++ chrome/renderer/BUILD.gn
@@ -4,6 +4,7 @@
@ -10,7 +10,7 @@ index 2ea489762ef5..707431840be8 100644
import("//chrome/common/features.gni")
import("//components/nacl/features.gni")
import("//components/offline_pages/buildflags/features.gni")
@@ -128,6 +129,7 @@ static_library("renderer") {
@@ -137,6 +138,7 @@ static_library("renderer") {
public_deps = [ "//components/contextual_search:buildflags" ]
deps = [
@ -18,7 +18,7 @@ index 2ea489762ef5..707431840be8 100644
"//chrome:resources",
"//chrome:strings",
"//chrome/common",
@@ -192,6 +194,10 @@ static_library("renderer") {
@@ -201,6 +203,10 @@ static_library("renderer") {
configs += [ "//build/config/compiler:wexit_time_destructors" ]

View File

@ -1,5 +1,5 @@
diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc
index d18dbaa7d058..650031520b25 100644
index 945cee14368b..38c180a6e7e6 100644
--- chrome/app/chrome_main_delegate.cc
+++ chrome/app/chrome_main_delegate.cc
@@ -25,6 +25,7 @@
@ -10,7 +10,7 @@ index d18dbaa7d058..650031520b25 100644
#include "chrome/browser/chrome_content_browser_client.h"
#include "chrome/browser/chrome_resource_bundle_helper.h"
#include "chrome/browser/defaults.h"
@@ -391,6 +392,8 @@ struct MainFunction {
@@ -392,6 +393,8 @@ struct MainFunction {
// Initializes the user data dir. Must be called before InitializeLocalState().
void InitializeUserDataDir(base::CommandLine* command_line) {
@ -19,7 +19,7 @@ index d18dbaa7d058..650031520b25 100644
#if defined(OS_WIN)
// Reach out to chrome_elf for the truth on the user data directory.
// Note that in tests, this links to chrome_elf_test_stubs.
@@ -628,7 +631,9 @@ void ChromeMainDelegate::PostFieldTrialInitialization() {
@@ -629,7 +632,9 @@ void ChromeMainDelegate::PostFieldTrialInitialization() {
}
#if defined(OS_WIN)
@ -27,9 +27,9 @@ index d18dbaa7d058..650031520b25 100644
SetUpExtendedCrashReporting(is_browser_process);
+ }
base::Time::ReadMinTimerIntervalLowResMs();
base::sequence_manager::PostFieldTrialInitialization();
#endif
@@ -904,6 +909,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
base::sequence_manager::internal::ThreadControllerPowerMonitor::
InitializeOnMainThread();
@@ -906,6 +911,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
std::string process_type =
command_line.GetSwitchValueASCII(switches::kProcessType);
@ -37,7 +37,7 @@ index d18dbaa7d058..650031520b25 100644
crash_reporter::InitializeCrashKeys();
#if defined(OS_POSIX)
@@ -914,6 +920,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -916,6 +922,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
InitMacCrashReporter(command_line, process_type);
SetUpInstallerPreferences(command_line);
#endif
@ -45,7 +45,7 @@ index d18dbaa7d058..650031520b25 100644
#if defined(OS_WIN)
child_process_logging::Init();
@@ -1037,6 +1044,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1039,6 +1046,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
locale;
}
@ -53,7 +53,7 @@ index d18dbaa7d058..650031520b25 100644
#if defined(OS_POSIX) && !defined(OS_MACOSX)
// Zygote needs to call InitCrashReporter() in RunZygote().
if (process_type != service_manager::switches::kZygoteProcess) {
@@ -1063,6 +1071,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1071,6 +1079,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
// After all the platform Breakpads have been initialized, store the command
// line for crash reporting.
crash_keys::SetCrashKeysFromCommandLine(command_line);
@ -61,7 +61,7 @@ index d18dbaa7d058..650031520b25 100644
#if BUILDFLAG(ENABLE_PDF)
MaybeInitializeGDI();
@@ -1162,6 +1171,7 @@ void ChromeMainDelegate::ZygoteForked() {
@@ -1169,6 +1178,7 @@ void ChromeMainDelegate::ZygoteForked() {
SetUpProfilingShutdownHandler();
}
@ -69,7 +69,7 @@ index d18dbaa7d058..650031520b25 100644
// Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets
// this up for the browser process in a different manner.
const base::CommandLine* command_line =
@@ -1178,6 +1188,7 @@ void ChromeMainDelegate::ZygoteForked() {
@@ -1185,6 +1195,7 @@ void ChromeMainDelegate::ZygoteForked() {
// Reset the command line for the newly spawned process.
crash_keys::SetCrashKeysFromCommandLine(*command_line);
@ -78,10 +78,10 @@ index d18dbaa7d058..650031520b25 100644
#endif // defined(OS_LINUX)
diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc
index c06585b15b8f..763212a575ce 100644
index 5117fe3b5ee3..e8f37fa7066f 100644
--- chrome/browser/chrome_browser_main.cc
+++ chrome/browser/chrome_browser_main.cc
@@ -49,6 +49,7 @@
@@ -48,6 +48,7 @@
#include "build/branding_buildflags.h"
#include "build/build_config.h"
#include "cc/base/switches.h"
@ -89,7 +89,7 @@ index c06585b15b8f..763212a575ce 100644
#include "chrome/browser/about_flags.h"
#include "chrome/browser/active_use_util.h"
#include "chrome/browser/after_startup_task_utils.h"
@@ -885,8 +886,10 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
@@ -889,8 +890,10 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
#if !defined(OS_ANDROID)
// Create the RunLoop for MainMessageLoopRun() to use, and pass a copy of
// its QuitClosure to the BrowserProcessImpl to call when it is time to exit.
@ -101,7 +101,7 @@ index c06585b15b8f..763212a575ce 100644
// These members must be initialized before returning from this function.
// Android doesn't use StartupBrowserCreator.
@@ -1580,11 +1583,13 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1592,11 +1595,13 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// This step is costly and is already measured in
// Startup.StartupBrowserCreator_Start.
// See the comment above for an explanation of |process_command_line|.
@ -117,18 +117,18 @@ index c06585b15b8f..763212a575ce 100644
// Initialize autoupdate timer. Timer callback costs basically nothing
// when browser is not in persistent mode, so it's OK to let it ride on
diff --git chrome/browser/notifications/notification_platform_bridge_mac.mm chrome/browser/notifications/notification_platform_bridge_mac.mm
index acf1849aa1b3..27efc35d74d6 100644
index ad52e63ed83a..6b16ee3ccc96 100644
--- chrome/browser/notifications/notification_platform_bridge_mac.mm
+++ chrome/browser/notifications/notification_platform_bridge_mac.mm
@@ -25,6 +25,7 @@
@@ -24,6 +24,7 @@
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/system/sys_info.h"
#include "base/task/post_task.h"
+#include "cef/libcef/features/runtime.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/notifications/notification_common.h"
#include "chrome/browser/notifications/notification_display_service_impl.h"
@@ -642,6 +643,12 @@ - (void)notificationClick:(NSDictionary*)notificationResponseData {
@@ -651,6 +652,12 @@ getDisplayedAlertsForProfileId:(NSString*)profileId
- (id<NotificationDelivery>)serviceProxy {
id<NotificationDelivery> proxy = [_xpcConnection remoteObjectProxy];
@ -142,7 +142,7 @@ index acf1849aa1b3..27efc35d74d6 100644
base::mac::ScopedMachSendRight exceptionPort(
crash_reporter::GetCrashpadClient().GetHandlerMachPort());
diff --git ui/gtk/select_file_dialog_impl_kde.cc ui/gtk/select_file_dialog_impl_kde.cc
index f09501d6cd8e..edfc2a4c9bb5 100644
index 4eba97d573d8..4697b24f4e34 100644
--- ui/gtk/select_file_dialog_impl_kde.cc
+++ ui/gtk/select_file_dialog_impl_kde.cc
@@ -6,6 +6,8 @@

Some files were not shown because too many files have changed in this diff Show More