Update to Chromium version 69.0.3476.0 (#571360)

This commit is contained in:
Marshall Greenblatt 2018-07-02 13:11:49 -04:00
parent 669e8673ce
commit 2d48a07bec
47 changed files with 546 additions and 547 deletions

View File

@ -776,6 +776,8 @@ static_library("libcef_static") {
libs = [
"comctl32.lib",
# For D3D11_DECODER_PROFILE_H264_VLD_NOFGT.
"dxguid.lib",
]
}

View File

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

View File

@ -116,6 +116,12 @@ ChromeBrowserProcessStub::network_connection_tracker() {
return NULL;
}
network::NetworkQualityTracker*
ChromeBrowserProcessStub::network_quality_tracker() {
NOTREACHED();
return NULL;
}
WatchDogThread* ChromeBrowserProcessStub::watchdog_thread() {
NOTREACHED();
return NULL;

View File

@ -50,6 +50,7 @@ class ChromeBrowserProcessStub : public BrowserProcess,
IOThread* io_thread() override;
SystemNetworkContextManager* system_network_context_manager() override;
content::NetworkConnectionTracker* network_connection_tracker() override;
network::NetworkQualityTracker* network_quality_tracker() override;
WatchDogThread* watchdog_thread() override;
ProfileManager* profile_manager() override;
PrefService* local_state() override;

View File

@ -617,11 +617,12 @@ void CefContentBrowserClient::RegisterInProcessServices(
void CefContentBrowserClient::RegisterOutOfProcessServices(
OutOfProcessServiceMap* services) {
(*services)[printing::mojom::kServiceName] =
base::ASCIIToUTF16("PDF Compositor Service");
base::BindRepeating(&base::ASCIIToUTF16, "PDF Compositor Service");
(*services)[printing::mojom::kChromePrintingServiceName] =
base::ASCIIToUTF16("Printing Service");
base::BindRepeating(&base::ASCIIToUTF16, "Printing Service");
(*services)[proxy_resolver::mojom::kProxyResolverServiceName] =
l10n_util::GetStringUTF16(IDS_UTILITY_PROCESS_PROXY_RESOLVER_NAME);
base::BindRepeating(&l10n_util::GetStringUTF16,
IDS_UTILITY_PROCESS_PROXY_RESOLVER_NAME);
}
std::unique_ptr<base::Value> CefContentBrowserClient::GetServiceManifestOverlay(

View File

@ -456,6 +456,7 @@ void CefExtensionSystem::InstallUpdate(
const std::string& extension_id,
const std::string& public_key,
const base::FilePath& temp_dir,
bool install_immediately,
InstallUpdateCallback install_update_callback) {
NOTREACHED();
base::DeleteFile(temp_dir, true /* recursive */);

View File

@ -114,6 +114,7 @@ class CefExtensionSystem : public ExtensionSystem {
void InstallUpdate(const std::string& extension_id,
const std::string& public_key,
const base::FilePath& temp_dir,
bool install_immediately,
InstallUpdateCallback install_update_callback) override;
bool FinishDelayedInstallationIfReady(const std::string& extension_id,
bool install_immediately) override;

View File

@ -445,7 +445,10 @@ net::NetworkDelegate::AuthRequiredResponse CefNetworkDelegate::OnAuthRequired(
}
bool CefNetworkDelegate::OnCanGetCookies(const net::URLRequest& request,
const net::CookieList& cookie_list) {
const net::CookieList& cookie_list,
bool allowed_from_caller) {
if (!allowed_from_caller)
return false;
if (net_util::IsInternalRequest(&request))
return true;
@ -472,7 +475,10 @@ bool CefNetworkDelegate::OnCanGetCookies(const net::URLRequest& request,
bool CefNetworkDelegate::OnCanSetCookie(const net::URLRequest& request,
const net::CanonicalCookie& cookie,
net::CookieOptions* options) {
net::CookieOptions* options,
bool allowed_from_caller) {
if (!allowed_from_caller)
return false;
if (net_util::IsInternalRequest(&request))
return true;

View File

@ -41,10 +41,12 @@ class CefNetworkDelegate : public net::NetworkDelegateImpl {
bool started,
int net_error) override;
bool OnCanGetCookies(const net::URLRequest& request,
const net::CookieList& cookie_list) override;
const net::CookieList& cookie_list,
bool allowed_from_caller) override;
bool OnCanSetCookie(const net::URLRequest& request,
const net::CanonicalCookie& cookie,
net::CookieOptions* options) override;
net::CookieOptions* options,
bool allowed_from_caller) override;
bool OnCanAccessFile(const net::URLRequest& request,
const base::FilePath& original_path,
const base::FilePath& absolute_path) const override;

View File

@ -282,11 +282,14 @@ void CefResourceRequestJob::GetLoadTimingInfo(
load_timing_info->receive_headers_end = receive_headers_end_;
}
bool CefResourceRequestJob::IsRedirectResponse(GURL* location,
int* http_status_code) {
bool CefResourceRequestJob::IsRedirectResponse(
GURL* location,
int* http_status_code,
bool* insecure_scheme_was_upgraded) {
CEF_REQUIRE_IOT();
bool redirect = false;
*insecure_scheme_was_upgraded = false;
if (redirect_url_.is_valid()) {
// Redirect to the new URL.

View File

@ -38,7 +38,9 @@ class CefResourceRequestJob : public net::URLRequestJob {
int ReadRawData(net::IOBuffer* dest, int dest_size) override;
void GetResponseInfo(net::HttpResponseInfo* info) override;
void GetLoadTimingInfo(net::LoadTimingInfo* load_timing_info) const override;
bool IsRedirectResponse(GURL* location, int* http_status_code) override;
bool IsRedirectResponse(GURL* location,
int* http_status_code,
bool* insecure_scheme_was_upgraded) override;
bool GetMimeType(std::string* mime_type) const override;
bool GetCharset(std::string* charset) override;
int GetResponseCode() const override;

View File

@ -193,11 +193,6 @@ CefStoragePartitionProxy::GetBluetoothAllowedDevicesMap() {
return parent_->GetBluetoothAllowedDevicesMap();
}
content::BlobURLLoaderFactory*
CefStoragePartitionProxy::GetBlobURLLoaderFactory() {
return parent_->GetBlobURLLoaderFactory();
}
content::BlobRegistryWrapper* CefStoragePartitionProxy::GetBlobRegistry() {
return parent_->GetBlobRegistry();
}

View File

@ -77,7 +77,6 @@ class CefStoragePartitionProxy : public content::StoragePartition {
content::PaymentAppContextImpl* GetPaymentAppContext() override;
content::BroadcastChannelProvider* GetBroadcastChannelProvider() override;
content::BluetoothAllowedDevicesMap* GetBluetoothAllowedDevicesMap() override;
content::BlobURLLoaderFactory* GetBlobURLLoaderFactory() override;
content::BlobRegistryWrapper* GetBlobRegistry() override;
content::PrefetchURLLoaderService* GetPrefetchURLLoaderService() override;
content::CookieStoreContext* GetCookieStoreContext() override;

View File

@ -34,7 +34,7 @@ std::string GenerateHeaders(const HeaderMap& map) {
void ParseHeaders(const std::string& header_str, HeaderMap& map) {
// Parse the request header values
for (net::HttpUtil::HeadersIterator i(header_str.begin(), header_str.end(),
"\n");
"\n\r");
i.GetNext();) {
map.insert(std::make_pair(i.name(), i.values()));
}

View File

@ -583,7 +583,7 @@ void CefRequestImpl::Get(const CefMsg_LoadRequest_Params& params,
CefRequest::HeaderMap headerMap;
if (!params.headers.empty()) {
for (net::HttpUtil::HeadersIterator i(params.headers.begin(),
params.headers.end(), "\n");
params.headers.end(), "\n\r");
i.GetNext();) {
request.AddHTTPHeaderField(blink::WebString::FromUTF8(i.name()),
blink::WebString::FromUTF8(i.values()));

View File

@ -100,6 +100,13 @@ const char kCdmSupportedCodecAvc1[] = "avc1";
const char kCdmSupportedEncryptionSchemeCenc[] = "cenc";
const char kCdmSupportedEncryptionSchemeCbcs[] = "cbcs";
// Arguments passed to MakeCdmInfo.
struct CdmInfoArgs {
base::FilePath path;
std::string version;
content::CdmCapability capability;
};
std::unique_ptr<base::DictionaryValue> ParseManifestFile(
const base::FilePath& manifest_path) {
CEF_REQUIRE_BLOCKING();
@ -183,26 +190,84 @@ bool IsCompatibleWithChrome(const base::DictionaryValue& manifest,
error_message);
}
// Determine the set of encryption schemes supported from |manifest|. It is
// assumed that all CDMs support 'cenc', so if the manifest entry
// |kCdmSupportedEncryptionSchemesName| is missing, the result will indicate
// support for 'cenc' only. Incorrect types in the manifest entry will log
// the error and return the empty set. Unrecognized values will be reported
// but otherwise ignored.
base::flat_set<media::EncryptionMode> GetSupportedEncryptionSchemes(
// Returns true and updates |video_codecs| if the appropriate manifest entry is
// valid. Returns false and does not modify |video_codecs| if the manifest entry
// is incorrectly formatted.
bool GetCodecs(const base::DictionaryValue& manifest,
std::vector<media::VideoCodec>* video_codecs,
std::string* error_message) {
DCHECK(video_codecs);
const base::Value* value = manifest.FindKey(kCdmCodecsListName);
if (!value) {
std::stringstream ss;
ss << "Widevine CDM component manifest is missing codecs.";
*error_message = ss.str();
return true;
}
if (!value->is_string()) {
std::stringstream ss;
ss << "Manifest entry " << kCdmCodecsListName << " is not a string.";
*error_message = ss.str();
return false;
}
const std::string& codecs = value->GetString();
if (codecs.empty()) {
std::stringstream ss;
ss << "Widevine CDM component manifest has empty codecs list.";
*error_message = ss.str();
return true;
}
std::vector<media::VideoCodec> result;
const std::vector<base::StringPiece> supported_codecs =
base::SplitStringPiece(codecs, kCdmValueDelimiter, base::TRIM_WHITESPACE,
base::SPLIT_WANT_NONEMPTY);
for (const auto& codec : supported_codecs) {
if (codec == kCdmSupportedCodecVp8)
result.push_back(media::VideoCodec::kCodecVP8);
else if (codec == kCdmSupportedCodecVp9)
result.push_back(media::VideoCodec::kCodecVP9);
#if BUILDFLAG(USE_PROPRIETARY_CODECS)
else if (codec == kCdmSupportedCodecAvc1)
result.push_back(media::VideoCodec::kCodecH264);
#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
}
video_codecs->swap(result);
return true;
}
// Returns true and updates |encryption_schemes| if the appropriate manifest
// entry is valid. Returns false and does not modify |encryption_schemes| if the
// manifest entry is incorrectly formatted. It is assumed that all CDMs support
// 'cenc', so if the manifest entry is missing, the result will indicate support
// for 'cenc' only. Incorrect types in the manifest entry will log the error and
// fail. Unrecognized values will be reported but otherwise ignored.
bool GetEncryptionSchemes(
const base::DictionaryValue& manifest,
base::flat_set<media::EncryptionMode>* encryption_schemes,
std::string* error_message) {
DCHECK(encryption_schemes);
const base::Value* value =
manifest.FindKey(kCdmSupportedEncryptionSchemesName);
if (!value)
return {media::EncryptionMode::kCenc};
if (!value) {
// No manifest entry found, so assume only 'cenc' supported for backwards
// compatibility.
encryption_schemes->insert(media::EncryptionMode::kCenc);
return true;
}
if (!value->is_list()) {
std::stringstream ss;
ss << "Manifest entry " << kCdmSupportedEncryptionSchemesName
<< " is not a list.";
*error_message = ss.str();
return {};
return false;
}
const base::Value::ListStorage& list = value->GetList();
@ -213,7 +278,7 @@ base::flat_set<media::EncryptionMode> GetSupportedEncryptionSchemes(
ss << "Unrecognized item type in manifest entry "
<< kCdmSupportedEncryptionSchemesName;
*error_message = ss.str();
return {};
return false;
}
const std::string& scheme = item.GetString();
@ -225,30 +290,52 @@ base::flat_set<media::EncryptionMode> GetSupportedEncryptionSchemes(
std::stringstream ss;
ss << "Unrecognized encryption scheme " << scheme << " in manifest entry "
<< kCdmSupportedEncryptionSchemesName;
if (!error_message->empty())
*error_message += ", ";
*error_message += ss.str();
*error_message = ss.str();
}
}
return result;
// As the manifest entry exists, it must specify at least one valid value.
if (result.empty())
return false;
encryption_schemes->swap(result);
return true;
}
// Returns true and updates |session_types| if the appropriate manifest entry is
// valid. Returns false if the manifest entry is incorrectly formatted.
bool GetSessionTypes(const base::DictionaryValue& manifest,
base::flat_set<media::CdmSessionType>* session_types,
std::string* error_message) {
DCHECK(session_types);
bool is_persistent_license_supported = false;
const base::Value* value = manifest.FindKey(kCdmPersistentLicenseSupportName);
if (value) {
if (!value->is_bool())
return false;
is_persistent_license_supported = value->GetBool();
}
// Temporary session is always supported.
session_types->insert(media::CdmSessionType::kTemporary);
if (is_persistent_license_supported)
session_types->insert(media::CdmSessionType::kPersistentLicense);
return true;
}
// Verify and load the contents of |base_path|.
cef_cdm_registration_error_t LoadWidevineCdmInfo(
const base::FilePath& base_path,
base::FilePath* cdm_path,
std::string* cdm_version,
std::string* cdm_codecs,
bool* supports_persistent_license,
base::flat_set<media::EncryptionMode>* supported_encryption_schemes,
CdmInfoArgs* args,
std::string* error_message) {
std::stringstream ss;
*cdm_path = base_path.AppendASCII(
args->path = base_path.AppendASCII(
base::GetNativeLibraryName(kWidevineCdmLibraryName));
if (!base::PathExists(*cdm_path)) {
ss << "Missing file " << cdm_path->value();
if (!base::PathExists(args->path)) {
ss << "Missing file " << args->path.value();
*error_message = ss.str();
return CEF_CDM_REGISTRATION_ERROR_INCORRECT_CONTENTS;
}
@ -271,22 +358,17 @@ cef_cdm_registration_error_t LoadWidevineCdmInfo(
if (!IsCompatibleWithChrome(*manifest, error_message))
return CEF_CDM_REGISTRATION_ERROR_INCOMPATIBLE;
*cdm_version = GetManifestValue(*manifest, kCdmVersionName, error_message);
if (cdm_version->empty())
args->version = GetManifestValue(*manifest, kCdmVersionName, error_message);
if (args->version.empty())
return CEF_CDM_REGISTRATION_ERROR_INCORRECT_CONTENTS;
*cdm_codecs = GetManifestValue(*manifest, kCdmCodecsListName, error_message);
if (cdm_codecs->empty())
return CEF_CDM_REGISTRATION_ERROR_INCORRECT_CONTENTS;
const base::Value* value =
manifest->FindKey(kCdmPersistentLicenseSupportName);
*supports_persistent_license = value && value->is_bool() && value->GetBool();
*supported_encryption_schemes =
GetSupportedEncryptionSchemes(*manifest, error_message);
if (supported_encryption_schemes->empty())
if (!GetCodecs(*manifest, &args->capability.video_codecs, error_message) ||
!GetEncryptionSchemes(*manifest, &args->capability.encryption_schemes,
error_message) ||
!GetSessionTypes(*manifest, &args->capability.session_types,
error_message)) {
return CEF_CDM_REGISTRATION_ERROR_INCORRECT_CONTENTS;
}
return CEF_CDM_REGISTRATION_ERROR_NONE;
}
@ -305,54 +387,19 @@ void DeliverWidevineCdmCallback(cef_cdm_registration_error_t result,
callback->OnCdmRegistrationComplete(result, error_message);
}
std::vector<media::VideoCodec> ConvertCodecsString(const std::string& codecs) {
std::vector<media::VideoCodec> supported_video_codecs;
const std::vector<base::StringPiece> supported_codecs =
base::SplitStringPiece(codecs, kCdmValueDelimiter, base::TRIM_WHITESPACE,
base::SPLIT_WANT_NONEMPTY);
for (const auto& codec : supported_codecs) {
if (codec == kCdmSupportedCodecVp8)
supported_video_codecs.push_back(media::VideoCodec::kCodecVP8);
else if (codec == kCdmSupportedCodecVp9)
supported_video_codecs.push_back(media::VideoCodec::kCodecVP9);
#if BUILDFLAG(USE_PROPRIETARY_CODECS)
else if (codec == kCdmSupportedCodecAvc1)
supported_video_codecs.push_back(media::VideoCodec::kCodecH264);
#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
}
return supported_video_codecs;
content::CdmInfo MakeCdmInfo(const CdmInfoArgs& args) {
return content::CdmInfo(kWidevineCdmDisplayName, kWidevineCdmGuid,
base::Version(args.version), args.path,
kWidevineCdmFileSystemId, args.capability,
kWidevineKeySystem, false);
}
content::CdmInfo MakeCdmInfo(
const base::FilePath& cdm_path,
const std::string& cdm_version,
const std::string& cdm_codecs,
bool supports_persistent_license,
const base::flat_set<media::EncryptionMode>& supported_encryption_schemes) {
std::vector<media::VideoCodec> supported_video_codecs =
ConvertCodecsString(cdm_codecs);
return content::CdmInfo(
kWidevineCdmDisplayName, kWidevineCdmGuid, base::Version(cdm_version),
cdm_path, kWidevineCdmFileSystemId, supported_video_codecs,
supports_persistent_license, supported_encryption_schemes,
kWidevineKeySystem, false);
}
void RegisterWidevineCdmOnUIThread(
const base::FilePath& cdm_path,
const std::string& cdm_version,
const std::string& cdm_codecs,
bool supports_persistent_license,
const base::flat_set<media::EncryptionMode>& supported_encryption_schemes,
CefRefPtr<CefRegisterCdmCallback> callback) {
void RegisterWidevineCdmOnUIThread(std::unique_ptr<CdmInfoArgs> args,
CefRefPtr<CefRegisterCdmCallback> callback) {
CEF_REQUIRE_UIT();
// Register Widevine with the CdmRegistry.
content::CdmRegistry::GetInstance()->RegisterCdm(
MakeCdmInfo(cdm_path, cdm_version, cdm_codecs,
supports_persistent_license, supported_encryption_schemes));
content::CdmRegistry::GetInstance()->RegisterCdm(MakeCdmInfo(*args));
DeliverWidevineCdmCallback(CEF_CDM_REGISTRATION_ERROR_NONE, std::string(),
callback);
@ -363,16 +410,10 @@ void LoadWidevineCdmInfoOnBlockingThread(
CefRefPtr<CefRegisterCdmCallback> callback) {
CEF_REQUIRE_BLOCKING();
base::FilePath cdm_path;
std::string cdm_version;
std::string cdm_codecs;
bool supports_persistent_license;
base::flat_set<media::EncryptionMode> supported_encryption_schemes;
std::unique_ptr<CdmInfoArgs> args = std::make_unique<CdmInfoArgs>();
std::string error_message;
cef_cdm_registration_error_t result =
LoadWidevineCdmInfo(base_path, &cdm_path, &cdm_version, &cdm_codecs,
&supports_persistent_license,
&supported_encryption_schemes, &error_message);
LoadWidevineCdmInfo(base_path, args.get(), &error_message);
if (result != CEF_CDM_REGISTRATION_ERROR_NONE) {
CEF_POST_TASK(CEF_UIT, base::Bind(DeliverWidevineCdmCallback, result,
error_message, callback));
@ -380,10 +421,8 @@ void LoadWidevineCdmInfoOnBlockingThread(
}
// Continue execution on the UI thread.
CEF_POST_TASK(CEF_UIT,
base::Bind(RegisterWidevineCdmOnUIThread, cdm_path, cdm_version,
cdm_codecs, supports_persistent_license,
supported_encryption_schemes, callback));
CEF_POST_TASK(CEF_UIT, base::Bind(RegisterWidevineCdmOnUIThread,
base::Passed(std::move(args)), callback));
}
} // namespace
@ -445,25 +484,16 @@ void CefWidevineLoader::AddContentDecryptionModules(
// Load contents of the plugin directory synchronously. This only occurs once
// on zygote process startup so should not have a huge performance penalty.
base::FilePath cdm_adapter_path;
base::FilePath cdm_path;
std::string cdm_version;
std::string cdm_codecs;
bool supports_persistent_license;
base::flat_set<media::EncryptionMode> supported_encryption_schemes;
CdmInfoArgs args;
std::string error_message;
cef_cdm_registration_error_t result =
LoadWidevineCdmInfo(base_path, &cdm_path, &cdm_version, &cdm_codecs,
&supports_persistent_license,
&supported_encryption_schemes, &error_message);
LoadWidevineCdmInfo(base_path, &args, &error_message);
if (result != CEF_CDM_REGISTRATION_ERROR_NONE) {
LOG(ERROR) << "Widevine CDM registration failed; " << error_message;
return;
}
cdms->push_back(MakeCdmInfo(cdm_path, cdm_version, cdm_codecs,
supports_persistent_license,
supported_encryption_schemes));
cdms->push_back(MakeCdmInfo(args));
}
#endif // defined(OS_LINUX)

View File

@ -15,6 +15,7 @@ MSVC_PUSH_WARNING_LEVEL(0);
#include "third_party/blink/public/web/web_node.h"
#include "third_party/blink/public/web/web_view_client.h"
#include "third_party/blink/renderer/bindings/core/v8/referrer_script_info.h"
#include "third_party/blink/renderer/bindings/core/v8/script_controller.h"
#include "third_party/blink/renderer/bindings/core/v8/script_source_code.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"

View File

@ -378,4 +378,9 @@ patches = [
# https://bitbucket.org/chromiumembedded/cef/issues/2466
'name': 'linux_poll_2466',
},
{
# Fix crash attempting to store session storage to disk in incognito mode.
# https://bugs.chromium.org/p/chromium/issues/detail?id=859010
'name': 'dom_storage_859010',
},
]

View File

@ -1,29 +1,22 @@
diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h
index 18c9e514c3b5..e3730ce40046 100644
index 921df418789e..7ef9285744a2 100644
--- content/browser/renderer_host/browser_compositor_view_mac.h
+++ content/browser/renderer_host/browser_compositor_view_mac.h
@@ -58,6 +58,7 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
@@ -58,6 +58,8 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
// These will not return nullptr until Destroy is called.
DelegatedFrameHost* GetDelegatedFrameHost();
+ ui::Layer* GetRootLayer() { return root_layer_.get(); }
+ ui::Compositor* GetCompositor();
// Ensure that the currect compositor frame be cleared (even if it is
// potentially visible).
@@ -69,6 +70,7 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
// no valid frame is available.
const gfx::CALayerParams* GetLastCALayerParams() const;
+ ui::Compositor* GetCompositor();
gfx::AcceleratedWidget GetAcceleratedWidget();
void DidCreateNewRendererCompositorFrameSink(
viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink);
diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm
index 65f1326ef578..446e93703e7b 100644
index fce1e648b031..2b63551ed96e 100644
--- content/browser/renderer_host/browser_compositor_view_mac.mm
+++ content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -240,6 +240,12 @@ BrowserCompositorMac::~BrowserCompositorMac() {
g_spare_recyclable_compositors.Get().clear();
@@ -245,6 +245,12 @@ DelegatedFrameHost* BrowserCompositorMac::GetDelegatedFrameHost() {
return delegated_frame_host_.get();
}
+ui::Compositor* BrowserCompositorMac::GetCompositor() {
@ -32,6 +25,6 @@ index 65f1326ef578..446e93703e7b 100644
+ return nullptr;
+}
+
gfx::AcceleratedWidget BrowserCompositorMac::GetAcceleratedWidget() {
if (recyclable_compositor_) {
return recyclable_compositor_->accelerated_widget_mac()
void BrowserCompositorMac::ClearCompositorFrame() {
// Make sure that we no longer hold a compositor lock by un-suspending the
// compositor. This ensures that we are able to swap in a new blank frame to

View File

@ -1,8 +1,8 @@
diff --git content/browser/browser_plugin/browser_plugin_guest.cc content/browser/browser_plugin/browser_plugin_guest.cc
index 06b5f2da12bb..6dbe883dc237 100644
index 2cf5621ae33f..7a5d79ed09e4 100644
--- content/browser/browser_plugin/browser_plugin_guest.cc
+++ content/browser/browser_plugin/browser_plugin_guest.cc
@@ -313,8 +313,11 @@ void BrowserPluginGuest::InitInternal(
@@ -312,8 +312,11 @@ void BrowserPluginGuest::InitInternal(
static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
}
@ -15,7 +15,7 @@ index 06b5f2da12bb..6dbe883dc237 100644
// Once a BrowserPluginGuest has an embedder WebContents, it's considered to
// be attached.
@@ -789,10 +792,19 @@ void BrowserPluginGuest::OnWillAttachComplete(
@@ -787,10 +790,19 @@ void BrowserPluginGuest::OnWillAttachComplete(
static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
if (!web_contents()->GetRenderViewHost()->GetWidget()->GetView()) {
web_contents_view->CreateViewForWidget(
@ -266,7 +266,7 @@ index d05dd5421458..fa13775f0512 100644
// a BrowserPlugin even when we are using cross process frames for guests. It
// should be removed after resolving https://crbug.com/642826).
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
index 0c4649ffaa91..2fa0631063ed 100644
index 5adcb212aaaf..c899de6d9a80 100644
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
@@ -193,6 +193,8 @@ void MimeHandlerViewGuest::CreateWebContents(
@ -277,8 +277,8 @@ index 0c4649ffaa91..2fa0631063ed 100644
+ delegate_->OverrideWebContentsCreateParams(&params);
// TODO(erikchen): Fix ownership semantics for guest views.
// https://crbug.com/832879.
std::move(callback).Run(WebContents::Create(params).release());
@@ -228,6 +230,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const {
std::move(callback).Run(
@@ -232,6 +234,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const {
return true;
}

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
index f6fba56b8717..4b20d96517e0 100644
index 86fd23195194..3b694a7f3f39 100644
--- chrome/browser/BUILD.gn
+++ chrome/browser/BUILD.gn
@@ -8,6 +8,7 @@ import("//build/config/features.gni")
@ -10,7 +10,7 @@ index f6fba56b8717..4b20d96517e0 100644
import("//chrome/common/features.gni")
import("//components/feature_engagement/features.gni")
import("//components/feed/features.gni")
@@ -1618,6 +1619,7 @@ jumbo_split_static_library("browser") {
@@ -1640,6 +1641,7 @@ jumbo_split_static_library("browser") {
"//base:i18n",
"//base/allocator:buildflags",
"//cc",
@ -18,7 +18,7 @@ index f6fba56b8717..4b20d96517e0 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -1886,6 +1888,10 @@ jumbo_split_static_library("browser") {
@@ -1912,6 +1914,10 @@ jumbo_split_static_library("browser") {
]
}

View File

@ -70,10 +70,10 @@ index e8e76ce5b954..1dd338dd0142 100644
content::BrowserContext* GetBrowserContextRedirectedInIncognito(
content::BrowserContext* context);
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
index 359f6f767bf8..9d3ff4cd0845 100644
index 75ebdaadd4b1..e5ee10d7c0cf 100644
--- chrome/browser/profiles/profile_manager.cc
+++ chrome/browser/profiles/profile_manager.cc
@@ -382,7 +382,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
@@ -383,7 +383,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED,
content::NotificationService::AllSources());

View File

@ -1,5 +1,5 @@
diff --git chrome/common/chrome_content_client.cc chrome/common/chrome_content_client.cc
index c4c094b012f1..28c4a2567fb4 100644
index f8a16d124dec..40e3c9439ed8 100644
--- chrome/common/chrome_content_client.cc
+++ chrome/common/chrome_content_client.cc
@@ -94,7 +94,8 @@

View File

@ -1,5 +1,5 @@
diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc
index ef785207cd5b..bafbce4fdfd4 100644
index 03defa1ab778..73be8a2c8253 100644
--- content/browser/compositor/gpu_process_transport_factory.cc
+++ content/browser/compositor/gpu_process_transport_factory.cc
@@ -494,10 +494,20 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
@ -26,7 +26,7 @@ index ef785207cd5b..bafbce4fdfd4 100644
} else {
DCHECK(context_provider);
diff --git ui/compositor/compositor.h ui/compositor/compositor.h
index 7efccc23d777..f355c678027b 100644
index fccba71bf856..85e305a783b9 100644
--- ui/compositor/compositor.h
+++ ui/compositor/compositor.h
@@ -24,6 +24,7 @@
@ -37,7 +37,7 @@ index 7efccc23d777..f355c678027b 100644
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkMatrix44.h"
#include "ui/compositor/compositor_animation_observer.h"
@@ -191,6 +192,17 @@ class COMPOSITOR_EXPORT ContextFactory {
@@ -193,6 +194,17 @@ class COMPOSITOR_EXPORT ContextFactory {
virtual bool SyncTokensRequiredForDisplayCompositor() = 0;
};
@ -55,7 +55,7 @@ index 7efccc23d777..f355c678027b 100644
// Compositor object to take care of GPU painting.
// A Browser compositor object is responsible for generating the final
// displayable form of pixels comprising a single widget's contents. It draws an
@@ -231,6 +243,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
@@ -233,6 +245,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
// Schedules a redraw of the layer tree associated with this compositor.
void ScheduleDraw();

View File

@ -14,10 +14,10 @@ index 82eee2a72cc4..6e02d9fcce1c 100644
// The GetPlugins call causes the plugin list to be refreshed. Once that's
// done we can retry the GetPluginInfo call. We break out of this cycle
diff --git chrome/browser/plugins/chrome_plugin_service_filter.cc chrome/browser/plugins/chrome_plugin_service_filter.cc
index e47d5ea63e5a..f2d21e4cefe4 100644
index 9f0645f8ae20..16036f0bb26c 100644
--- chrome/browser/plugins/chrome_plugin_service_filter.cc
+++ chrome/browser/plugins/chrome_plugin_service_filter.cc
@@ -177,6 +177,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable(
@@ -178,6 +178,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable(
int render_frame_id,
const void* context,
const GURL& plugin_content_url,
@ -77,10 +77,10 @@ index d544c9ec13a3..b15c5b13d902 100644
}
diff --git content/browser/frame_host/navigation_handle_impl.cc content/browser/frame_host/navigation_handle_impl.cc
index b23698013a09..d60eb48c6efd 100644
index 201f23b9b422..4664c6b32c22 100644
--- content/browser/frame_host/navigation_handle_impl.cc
+++ content/browser/frame_host/navigation_handle_impl.cc
@@ -380,12 +380,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() {
@@ -381,12 +381,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() {
}
RenderFrameHostImpl* NavigationHandleImpl::GetRenderFrameHost() {
@ -94,10 +94,10 @@ index b23698013a09..d60eb48c6efd 100644
"WillFailRequest state should come before WillProcessResponse");
return render_frame_host_;
diff --git content/browser/frame_host/render_frame_host_impl.cc content/browser/frame_host/render_frame_host_impl.cc
index f9201541ac71..4b0ab7598429 100644
index 9085029dce74..5db015da0c6c 100644
--- content/browser/frame_host/render_frame_host_impl.cc
+++ content/browser/frame_host/render_frame_host_impl.cc
@@ -1606,6 +1606,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError(
@@ -1612,6 +1612,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError(
if (GetNavigationHandle()) {
GetNavigationHandle()->set_net_error_code(
static_cast<net::Error>(params.error_code));
@ -105,20 +105,7 @@ index f9201541ac71..4b0ab7598429 100644
}
frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params);
@@ -3629,9 +3630,9 @@ void RenderFrameHostImpl::CommitNavigation(
// however only do this for cross-document navigations, because the
// alternative would be redundant effort.
network::mojom::URLLoaderFactoryPtrInfo default_factory_info;
- StoragePartitionImpl* storage_partition =
- static_cast<StoragePartitionImpl*>(BrowserContext::GetStoragePartition(
- browser_context, GetSiteInstance()));
+ StoragePartition* storage_partition =
+ BrowserContext::GetStoragePartition(
+ browser_context, GetSiteInstance());
if (subresource_loader_params &&
subresource_loader_params->loader_factory_info.is_valid()) {
// If the caller has supplied a default URLLoaderFactory override (for
@@ -4351,8 +4352,8 @@ void RenderFrameHostImpl::CreateNetworkServiceDefaultFactoryAndObserve(
@@ -4381,8 +4382,8 @@ void RenderFrameHostImpl::CreateNetworkServiceDefaultFactoryAndObserve(
RenderFrameDevToolsAgentHost::WillCreateURLLoaderFactory(
this, false /* is_navigation */, false /* is_download */,
&default_factory_request);
@ -129,7 +116,7 @@ index f9201541ac71..4b0ab7598429 100644
if (g_create_network_factory_callback_for_test.Get().is_null()) {
storage_partition->GetNetworkContext()->CreateURLLoaderFactory(
std::move(default_factory_request), std::move(params));
@@ -4639,8 +4640,8 @@ void RenderFrameHostImpl::ConnectToPrefetchURLLoaderService(
@@ -4669,8 +4670,8 @@ void RenderFrameHostImpl::ConnectToPrefetchURLLoaderService(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(base::FeatureList::IsEnabled(network::features::kNetworkService));
auto* storage_partition =
@ -138,52 +125,13 @@ index f9201541ac71..4b0ab7598429 100644
+ BrowserContext::GetStoragePartition(
+ GetSiteInstance()->GetBrowserContext(), GetSiteInstance());
auto subresource_factories = CloneSubresourceFactories();
// Make sure that file: URL is available only when the origin of the last
// commited URL is for file:. This should be always true as far as
// Temporary for https://crbug.com/849929.
CHECK(subresource_factories);
diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc
index 91bf248a67a5..ede635e9ef44 100644
index e39784552c5a..f9f520211e48 100644
--- content/browser/frame_host/render_frame_message_filter.cc
+++ content/browser/frame_host/render_frame_message_filter.cc
@@ -588,6 +588,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id,
void RenderFrameMessageFilter::OnGetPlugins(
bool refresh,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
IPC::Message* reply_msg) {
// Don't refresh if the specified threshold has not been passed. Note that
@@ -609,18 +610,19 @@ void RenderFrameMessageFilter::OnGetPlugins(
PluginServiceImpl::GetInstance()->GetPlugins(
base::BindOnce(&RenderFrameMessageFilter::GetPluginsCallback, this,
- reply_msg, main_frame_origin));
+ reply_msg, is_main_frame, main_frame_origin));
}
void RenderFrameMessageFilter::GetPluginsCallback(
IPC::Message* reply_msg,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
const std::vector<WebPluginInfo>& all_plugins) {
// Filter the plugin list.
PluginServiceFilter* filter = PluginServiceImpl::GetInstance()->GetFilter();
std::vector<WebPluginInfo> plugins;
- int child_process_id = -1;
+ int child_process_id = render_process_id_;
int routing_id = MSG_ROUTING_NONE;
// In this loop, copy the WebPluginInfo (and do not use a reference) because
// the filter might mutate it.
@@ -629,7 +631,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
if (!filter ||
filter->IsPluginAvailable(child_process_id, routing_id,
resource_context_, main_frame_origin.GetURL(),
- main_frame_origin, &plugin)) {
+ is_main_frame, main_frame_origin, &plugin)) {
plugins.push_back(plugin);
}
}
@@ -641,6 +643,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
@@ -626,6 +626,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id,
void RenderFrameMessageFilter::OnGetPluginInfo(
int render_frame_id,
const GURL& url,
@ -191,7 +139,7 @@ index 91bf248a67a5..ede635e9ef44 100644
const url::Origin& main_frame_origin,
const std::string& mime_type,
bool* found,
@@ -649,8 +652,8 @@ void RenderFrameMessageFilter::OnGetPluginInfo(
@@ -634,8 +635,8 @@ void RenderFrameMessageFilter::OnGetPluginInfo(
bool allow_wildcard = true;
*found = plugin_service_->GetPluginInfo(
render_process_id_, render_frame_id, resource_context_, url,
@ -203,20 +151,11 @@ index 91bf248a67a5..ede635e9ef44 100644
void RenderFrameMessageFilter::OnOpenChannelToPepperPlugin(
diff --git content/browser/frame_host/render_frame_message_filter.h content/browser/frame_host/render_frame_message_filter.h
index 7f3ab224bd15..7fb3e94d8756 100644
index 5bd44e2d538d..11cd8b0f9237 100644
--- content/browser/frame_host/render_frame_message_filter.h
+++ content/browser/frame_host/render_frame_message_filter.h
@@ -142,13 +142,16 @@ class CONTENT_EXPORT RenderFrameMessageFilter
@@ -143,6 +143,7 @@ class CONTENT_EXPORT RenderFrameMessageFilter
#if BUILDFLAG(ENABLE_PLUGINS)
void OnGetPlugins(bool refresh,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
IPC::Message* reply_msg);
void GetPluginsCallback(IPC::Message* reply_msg,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
const std::vector<WebPluginInfo>& plugins);
void OnGetPluginInfo(int render_frame_id,
const GURL& url,
+ bool is_main_frame,
@ -224,10 +163,10 @@ index 7f3ab224bd15..7fb3e94d8756 100644
const std::string& mime_type,
bool* found,
diff --git content/browser/loader/mime_sniffing_resource_handler.cc content/browser/loader/mime_sniffing_resource_handler.cc
index b67153fefc82..91fcf3c5559b 100644
index 89e2c5351c45..616129b0bbfb 100644
--- content/browser/loader/mime_sniffing_resource_handler.cc
+++ content/browser/loader/mime_sniffing_resource_handler.cc
@@ -494,8 +494,8 @@ bool MimeSniffingResourceHandler::CheckForPluginHandler(
@@ -502,8 +502,8 @@ bool MimeSniffingResourceHandler::CheckForPluginHandler(
WebPluginInfo plugin;
bool has_plugin = plugin_service_->GetPluginInfo(
info->GetChildID(), info->GetRenderFrameID(), info->GetContext(),
@ -239,7 +178,7 @@ index b67153fefc82..91fcf3c5559b 100644
if (stale) {
// Refresh the plugins asynchronously.
diff --git content/browser/plugin_service_impl.cc content/browser/plugin_service_impl.cc
index dcdae19642b5..f1b3c8166ce9 100644
index e4e5a87af7e6..5d6f51c49829 100644
--- content/browser/plugin_service_impl.cc
+++ content/browser/plugin_service_impl.cc
@@ -286,6 +286,7 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id,
@ -272,22 +211,83 @@ index 4e11056a3dc9..973ad50975e1 100644
const url::Origin& main_frame_origin,
const std::string& mime_type,
bool allow_wildcard,
diff --git content/browser/renderer_host/plugin_registry_impl.cc content/browser/renderer_host/plugin_registry_impl.cc
index ec071f3b89c1..bfd71fbbe18d 100644
--- content/browser/renderer_host/plugin_registry_impl.cc
+++ content/browser/renderer_host/plugin_registry_impl.cc
@@ -24,6 +24,7 @@ void PluginRegistryImpl::Bind(blink::mojom::PluginRegistryRequest request) {
}
void PluginRegistryImpl::GetPlugins(bool refresh,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
GetPluginsCallback callback) {
auto* plugin_service = PluginServiceImpl::GetInstance();
@@ -45,17 +46,18 @@ void PluginRegistryImpl::GetPlugins(bool refresh,
plugin_service->GetPlugins(base::BindOnce(
&PluginRegistryImpl::GetPluginsComplete, weak_factory_.GetWeakPtr(),
- main_frame_origin, std::move(callback)));
+ is_main_frame, main_frame_origin, std::move(callback)));
}
void PluginRegistryImpl::GetPluginsComplete(
+ bool is_main_frame,
const url::Origin& main_frame_origin,
GetPluginsCallback callback,
const std::vector<WebPluginInfo>& all_plugins) {
PluginServiceFilter* filter = PluginServiceImpl::GetInstance()->GetFilter();
std::vector<blink::mojom::PluginInfoPtr> plugins;
- const int child_process_id = -1;
+ const int child_process_id = render_process_id_;
const int routing_id = MSG_ROUTING_NONE;
// In this loop, copy the WebPluginInfo (and do not use a reference) because
// the filter might mutate it.
@@ -64,7 +66,7 @@ void PluginRegistryImpl::GetPluginsComplete(
if (!filter ||
filter->IsPluginAvailable(child_process_id, routing_id,
resource_context_, main_frame_origin.GetURL(),
- main_frame_origin, &plugin)) {
+ is_main_frame, main_frame_origin, &plugin)) {
auto plugin_blink = blink::mojom::PluginInfo::New();
plugin_blink->name = plugin.name;
plugin_blink->description = plugin.desc;
diff --git content/browser/renderer_host/plugin_registry_impl.h content/browser/renderer_host/plugin_registry_impl.h
index 3009401dac6b..b4c5a9e2db50 100644
--- content/browser/renderer_host/plugin_registry_impl.h
+++ content/browser/renderer_host/plugin_registry_impl.h
@@ -24,17 +24,24 @@ class PluginRegistryImpl : public blink::mojom::PluginRegistry {
// blink::mojom::PluginRegistry
void GetPlugins(bool refresh,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
GetPluginsCallback callback) override;
+ void set_render_process_id(int render_process_id) {
+ render_process_id_ = render_process_id;
+ }
+
private:
- void GetPluginsComplete(const url::Origin& main_frame_origin,
+ void GetPluginsComplete(bool is_main_frame,
+ const url::Origin& main_frame_origin,
GetPluginsCallback callback,
const std::vector<WebPluginInfo>& all_plugins);
ResourceContext* const resource_context_;
mojo::BindingSet<PluginRegistry> bindings_;
base::TimeTicks last_plugin_refresh_time_;
+ int render_process_id_ = -1;
base::WeakPtrFactory<PluginRegistryImpl> weak_factory_;
};
diff --git content/common/frame_messages.h content/common/frame_messages.h
index 3b966ad75bde..b2d23f74d5c1 100644
index 0162c2dda0f8..a5e412d2ae9c 100644
--- content/common/frame_messages.h
+++ content/common/frame_messages.h
@@ -1363,8 +1363,9 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
// Used to get the list of plugins. |main_frame_origin| is used to handle
// exceptions for plugin content settings.
-IPC_SYNC_MESSAGE_CONTROL2_1(FrameHostMsg_GetPlugins,
+IPC_SYNC_MESSAGE_CONTROL3_1(FrameHostMsg_GetPlugins,
bool /* refresh*/,
+ bool /* is_main_frame */,
url::Origin /* main_frame_origin */,
std::vector<content::WebPluginInfo> /* plugins */)
@@ -1372,9 +1373,10 @@ IPC_SYNC_MESSAGE_CONTROL2_1(FrameHostMsg_GetPlugins,
@@ -1369,9 +1369,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
// type. If there is no matching plugin, |found| is false.
// |actual_mime_type| is the actual mime type supported by the
// found plugin.
@ -299,30 +299,6 @@ index 3b966ad75bde..b2d23f74d5c1 100644
url::Origin /* main_frame_origin */,
std::string /* mime_type */,
bool /* found */,
diff --git content/ppapi_plugin/ppapi_blink_platform_impl.cc content/ppapi_plugin/ppapi_blink_platform_impl.cc
index 5f6c08be7e96..2bc2d6659810 100644
--- content/ppapi_plugin/ppapi_blink_platform_impl.cc
+++ content/ppapi_plugin/ppapi_blink_platform_impl.cc
@@ -196,6 +196,7 @@ blink::WebThemeEngine* PpapiBlinkPlatformImpl::ThemeEngine() {
void PpapiBlinkPlatformImpl::GetPluginList(
bool refresh,
+ bool isMainFrame,
const blink::WebSecurityOrigin& mainFrameOrigin,
blink::WebPluginListBuilder* builder) {
NOTREACHED();
diff --git content/ppapi_plugin/ppapi_blink_platform_impl.h content/ppapi_plugin/ppapi_blink_platform_impl.h
index 5f245c7d85d3..a6546c33f6f4 100644
--- content/ppapi_plugin/ppapi_blink_platform_impl.h
+++ content/ppapi_plugin/ppapi_blink_platform_impl.h
@@ -38,6 +38,7 @@ class PpapiBlinkPlatformImpl : public BlinkPlatformImpl {
blink::WebString DefaultLocale() override;
blink::WebThemeEngine* ThemeEngine() override;
void GetPluginList(bool refresh,
+ bool isMainFrame,
const blink::WebSecurityOrigin& mainFrameOrigin,
blink::WebPluginListBuilder*) override;
blink::WebData GetDataResource(const char* name) override;
diff --git content/public/browser/plugin_service.h content/public/browser/plugin_service.h
index 27021d64244d..60f1ec1845d9 100644
--- content/public/browser/plugin_service.h
@ -373,12 +349,12 @@ index a2dc7a811e75..416918123564 100644
// started.
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
diff --git content/public/renderer/render_frame_observer.h content/public/renderer/render_frame_observer.h
index 74a031ad10c3..3b3f9e292f4b 100644
index d52332ffb915..465ae32696e4 100644
--- content/public/renderer/render_frame_observer.h
+++ content/public/renderer/render_frame_observer.h
@@ -123,6 +123,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
virtual void DidObserveNewCssPropertyUsage(int css_property,
bool is_animated) {}
@@ -146,6 +146,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
virtual void DidReceiveTransferSizeUpdate(int resource_id,
int received_data_length) {}
+ // Called when this frame gains focus.
+ virtual void FrameFocused() {}
@ -387,10 +363,10 @@ index 74a031ad10c3..3b3f9e292f4b 100644
virtual void FocusedNodeChanged(const blink::WebNode& node) {}
diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc
index 9f54a39d8f6f..bf060d707217 100644
index 309f4739a93e..757c2daa169c 100644
--- content/renderer/render_frame_impl.cc
+++ content/renderer/render_frame_impl.cc
@@ -3292,7 +3292,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
@@ -3369,7 +3369,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
std::string mime_type;
bool found = false;
Send(new FrameHostMsg_GetPluginInfo(
@ -400,7 +376,7 @@ index 9f54a39d8f6f..bf060d707217 100644
params.mime_type.Utf8(), &found, &info, &mime_type));
if (!found)
return nullptr;
@@ -3650,6 +3651,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) {
@@ -3734,6 +3735,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) {
void RenderFrameImpl::FrameFocused() {
Send(new FrameHostMsg_FrameFocused(routing_id_));
@ -410,10 +386,10 @@ index 9f54a39d8f6f..bf060d707217 100644
void RenderFrameImpl::WillCommitProvisionalLoad() {
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
index a6afde1429ec..f7787dd2a032 100644
index 578c20c0775b..5ccee1e18384 100644
--- content/renderer/render_thread_impl.cc
+++ content/renderer/render_thread_impl.cc
@@ -866,6 +866,8 @@ void RenderThreadImpl::Init(
@@ -865,6 +865,8 @@ void RenderThreadImpl::Init(
StartServiceManagerConnection();
@ -423,26 +399,10 @@ index a6afde1429ec..f7787dd2a032 100644
base::Bind(&RenderThreadImpl::OnRendererInterfaceRequest,
base::Unretained(this)));
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
index 17b392f4f7ad..855198cec08a 100644
index e3c8199020c6..662c9b7d02e8 100644
--- content/renderer/renderer_blink_platform_impl.cc
+++ content/renderer/renderer_blink_platform_impl.cc
@@ -784,12 +784,14 @@ RendererBlinkPlatformImpl::CreateMIDIAccessor(
void RendererBlinkPlatformImpl::GetPluginList(
bool refresh,
+ bool isMainFrame,
const blink::WebSecurityOrigin& mainFrameOrigin,
blink::WebPluginListBuilder* builder) {
#if BUILDFLAG(ENABLE_PLUGINS)
std::vector<WebPluginInfo> plugins;
RenderThread::Get()->Send(
- new FrameHostMsg_GetPlugins(refresh, mainFrameOrigin, &plugins));
+ new FrameHostMsg_GetPlugins(refresh, isMainFrame, mainFrameOrigin,
+ &plugins));
for (const WebPluginInfo& plugin : plugins) {
builder->AddPlugin(WebString::FromUTF16(plugin.name),
WebString::FromUTF16(plugin.desc),
@@ -1239,6 +1241,14 @@ void RendererBlinkPlatformImpl::RequestPurgeMemory() {
@@ -1121,6 +1121,14 @@ void RendererBlinkPlatformImpl::RequestPurgeMemory() {
base::MemoryCoordinatorClientRegistry::GetInstance()->PurgeMemory();
}
@ -458,18 +418,10 @@ index 17b392f4f7ad..855198cec08a 100644
if (!web_database_host_) {
web_database_host_ = blink::mojom::ThreadSafeWebDatabaseHostPtr::Create(
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
index 59747e5db8fa..e3cad79609c6 100644
index 7d3a3edeb724..2b3d8cc01a63 100644
--- content/renderer/renderer_blink_platform_impl.h
+++ content/renderer/renderer_blink_platform_impl.h
@@ -125,6 +125,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
bool IsLockedToSite() const override;
void GetPluginList(bool refresh,
+ bool isMainFrame,
const blink::WebSecurityOrigin& mainFrameOrigin,
blink::WebPluginListBuilder* builder) override;
blink::WebPublicSuffixList* PublicSuffixList() override;
@@ -239,6 +240,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -233,6 +233,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
mojo::ScopedDataPipeConsumerHandle handle) override;
void RequestPurgeMemory() override;
@ -527,27 +479,3 @@ index 84bed37848d9..1a66c0757437 100644
const url::Origin& main_frame_origin,
const std::string& mime_type,
bool allow_wildcard,
diff --git content/test/test_blink_web_unit_test_support.cc content/test/test_blink_web_unit_test_support.cc
index 72e440c2c083..6a88a8ca4fbc 100644
--- content/test/test_blink_web_unit_test_support.cc
+++ content/test/test_blink_web_unit_test_support.cc
@@ -336,6 +336,7 @@ blink::WebThread* TestBlinkWebUnitTestSupport::CurrentThread() {
void TestBlinkWebUnitTestSupport::GetPluginList(
bool refresh,
+ bool is_main_frame,
const blink::WebSecurityOrigin& mainFrameOrigin,
blink::WebPluginListBuilder* builder) {
builder->AddPlugin("pdf", "pdf", "pdf-files", SkColorSetRGB(38, 38, 38));
diff --git content/test/test_blink_web_unit_test_support.h content/test/test_blink_web_unit_test_support.h
index 3d0c7df795d9..dee79a34eb66 100644
--- content/test/test_blink_web_unit_test_support.h
+++ content/test/test_blink_web_unit_test_support.h
@@ -62,6 +62,7 @@ class TestBlinkWebUnitTestSupport : public BlinkPlatformImpl {
blink::WebThread* CurrentThread() override;
void GetPluginList(bool refresh,
+ bool is_main_frame,
const blink::WebSecurityOrigin& mainFrameOrigin,
blink::WebPluginListBuilder* builder) override;

View File

@ -1,17 +1,17 @@
diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc
index 0f81f0524014..b330e3902a8d 100644
index 4787f1495826..d81aaf51b6b0 100644
--- content/app/content_main_runner_impl.cc
+++ content/app/content_main_runner_impl.cc
@@ -604,7 +604,8 @@ int RunBrowserProcessMain(
@@ -592,7 +592,8 @@ int RunBrowserProcessMain(
const MainFunctionParams& main_function_params,
ContentMainDelegate* delegate,
std::unique_ptr<BrowserProcessSubThread> service_manager_thread) {
if (delegate) {
- int exit_code = delegate->RunProcess("", main_function_params);
+ int exit_code = delegate->RunProcess("", main_function_params,
+ std::move(service_manager_thread));
- int exit_code = delegate->RunProcess("", main_function_params);
+ int exit_code = delegate->RunProcess("", main_function_params,
+ std::move(service_manager_thread));
#if defined(OS_ANDROID)
// In Android's browser process, the negative exit code doesn't mean the
// default behavior should be used as the UI message loop is managed by
// In Android's browser process, the negative exit code doesn't mean the
// default behavior should be used as the UI message loop is managed by
diff --git content/browser/browser_main_runner_impl.h content/browser/browser_main_runner_impl.h
index adb084fe27c6..42a6fdc2d67f 100644
--- content/browser/browser_main_runner_impl.h

View File

@ -45,7 +45,7 @@ index bcf172e645a2..f879aa745adf 100644
// on the given |command_line|.
void SetCrashKeysFromCommandLine(const base::CommandLine& command_line);
diff --git chrome_elf/BUILD.gn chrome_elf/BUILD.gn
index e1207fd03292..4453785e72df 100644
index a47b2b61fbfa..83936ff6e265 100644
--- chrome_elf/BUILD.gn
+++ chrome_elf/BUILD.gn
@@ -7,6 +7,7 @@
@ -56,7 +56,7 @@ index e1207fd03292..4453785e72df 100644
import("//chrome/process_version_rc_template.gni")
import("//testing/test.gni")
@@ -196,9 +197,6 @@ static_library("blacklist") {
@@ -124,9 +125,6 @@ source_set("constants") {
static_library("crash") {
sources = [
@ -66,7 +66,7 @@ index e1207fd03292..4453785e72df 100644
"crash/crash_helper.cc",
"crash/crash_helper.h",
]
@@ -206,6 +204,7 @@ static_library("crash") {
@@ -134,6 +132,7 @@ static_library("crash") {
":hook_util",
"//base", # This needs to go. DEP of app, crash_keys, client.
"//base:base_static", # pe_image
@ -74,7 +74,7 @@ index e1207fd03292..4453785e72df 100644
"//chrome/install_static:install_static_util",
"//components/crash/content/app",
"//components/crash/core/common", # crash_keys
@@ -213,6 +212,17 @@ static_library("crash") {
@@ -141,6 +140,17 @@ static_library("crash") {
"//content/public/common:result_codes",
"//third_party/crashpad/crashpad/client", # DumpWithoutCrash
]
@ -91,7 +91,7 @@ index e1207fd03292..4453785e72df 100644
+ }
}
static_library("hook_util") {
source_set("dll_hash") {
diff --git chrome_elf/crash/crash_helper.cc chrome_elf/crash/crash_helper.cc
index fdc51ab22807..cb0a99dd190c 100644
--- chrome_elf/crash/crash_helper.cc
@ -241,7 +241,7 @@ index 9ee85554812c..7af55ddda8fe 100644
extern void InitCrashKeysForTesting();
diff --git components/crash/content/app/crash_reporter_client.cc components/crash/content/app/crash_reporter_client.cc
index 464fe2efc0db..dcc8d69bdd3a 100644
index f69c6c3ff26e..e0d402abd3fd 100644
--- components/crash/content/app/crash_reporter_client.cc
+++ components/crash/content/app/crash_reporter_client.cc
@@ -88,7 +88,7 @@ int CrashReporterClient::GetResultCodeRespawnFailed() {
@ -302,7 +302,7 @@ index 464fe2efc0db..dcc8d69bdd3a 100644
#if defined(OS_ANDROID)
int CrashReporterClient::GetAndroidMinidumpDescriptor() {
return 0;
@@ -175,9 +203,11 @@ bool CrashReporterClient::ShouldMonitorCrashHandlerExpensively() {
@@ -186,9 +214,11 @@ bool CrashReporterClient::ShouldMonitorCrashHandlerExpensively() {
return false;
}
@ -318,7 +318,7 @@ index 464fe2efc0db..dcc8d69bdd3a 100644
} // namespace crash_reporter
diff --git components/crash/content/app/crash_reporter_client.h components/crash/content/app/crash_reporter_client.h
index e6a09126bdb9..8052e323a5e3 100644
index 485c2c8bf638..7eb175c43b6c 100644
--- components/crash/content/app/crash_reporter_client.h
+++ components/crash/content/app/crash_reporter_client.h
@@ -5,7 +5,9 @@
@ -356,7 +356,7 @@ index e6a09126bdb9..8052e323a5e3 100644
#endif
// The location where minidump files should be written. Returns true if
@@ -181,6 +185,30 @@ class CrashReporterClient {
@@ -197,6 +201,30 @@ class CrashReporterClient {
// Returns true if breakpad should run in the given process type.
virtual bool EnableBreakpadForProcess(const std::string& process_type);

View File

@ -1,8 +1,8 @@
diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc
index c9187e774953..72dc4a43c3f0 100644
index eaf44246e9ec..8b1af37e2fd1 100644
--- content/browser/devtools/devtools_http_handler.cc
+++ content/browser/devtools/devtools_http_handler.cc
@@ -564,7 +564,7 @@ void DevToolsHttpHandler::OnJsonRequest(
@@ -567,7 +567,7 @@ void DevToolsHttpHandler::OnJsonRequest(
version.SetString("Protocol-Version",
DevToolsAgentHost::GetProtocolVersion());
version.SetString("WebKit-Version", GetWebKitVersion());

View File

@ -0,0 +1,15 @@
diff --git content/browser/dom_storage/dom_storage_context_wrapper.cc content/browser/dom_storage/dom_storage_context_wrapper.cc
index 242deb55fb27..d7fe71e5e0a6 100644
--- content/browser/dom_storage/dom_storage_context_wrapper.cc
+++ content/browser/dom_storage/dom_storage_context_wrapper.cc
@@ -153,7 +153,9 @@ DOMStorageContextWrapper::DOMStorageContextWrapper(
if (base::FeatureList::IsEnabled(features::kMojoSessionStorage)) {
mojo_session_state_ = new SessionStorageContextMojo(
- mojo_task_runner_, connector, local_partition_path,
+ mojo_task_runner_, connector,
+ profile_path.empty() ? base::nullopt
+ : base::make_optional(local_partition_path),
std::string(kSessionStorageDirectory));
}

View File

@ -27,10 +27,10 @@ index 53c7404ef1f9..ac33df7cfe0e 100644
auto* browser_context = web_contents->GetBrowserContext();
StreamsPrivateAPI* streams_private = GetStreamsPrivateAPI(browser_context);
diff --git content/browser/frame_host/render_frame_host_manager.cc content/browser/frame_host/render_frame_host_manager.cc
index f57d8ead39af..201b60891caf 100644
index 79f407b8cb20..fe4c65b5d0a5 100644
--- content/browser/frame_host/render_frame_host_manager.cc
+++ content/browser/frame_host/render_frame_host_manager.cc
@@ -917,10 +917,11 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation(
@@ -927,10 +927,11 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation(
// TODO(alexmos): This check should've been enforced earlier in the
// navigation, in chrome::Navigate(). Verify this, and then convert this to
// a CHECK and remove the fallback.
@ -46,7 +46,7 @@ index f57d8ead39af..201b60891caf 100644
return true;
}
@@ -1061,7 +1062,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigation(
@@ -1069,7 +1070,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigation(
// Double-check that the new SiteInstance is associated with the right
// BrowserContext.
@ -57,10 +57,10 @@ index f57d8ead39af..201b60891caf 100644
// If |new_instance| is a new SiteInstance for a subframe that requires a
// dedicated process, set its process reuse policy so that such subframes are
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
index 062add3424de..b2b4a46193df 100644
index 9ada95562d77..e0ebf0289097 100644
--- content/public/browser/content_browser_client.h
+++ content/public/browser/content_browser_client.h
@@ -376,6 +376,13 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -382,6 +382,13 @@ class CONTENT_EXPORT ContentBrowserClient {
// Returns true if error page should be isolated in its own process.
virtual bool ShouldIsolateErrorPage(bool in_main_frame);
@ -75,10 +75,10 @@ index 062add3424de..b2b4a46193df 100644
// current SiteInstance, if it does not yet have a site.
virtual bool ShouldAssignSiteForURL(const GURL& url);
diff --git extensions/browser/extension_host.cc extensions/browser/extension_host.cc
index 8017d648301b..a0dbd923c64d 100644
index b1bd45860305..5169b816f185 100644
--- extensions/browser/extension_host.cc
+++ extensions/browser/extension_host.cc
@@ -68,11 +68,12 @@ ExtensionHost::ExtensionHost(const Extension* extension,
@@ -67,11 +67,12 @@ ExtensionHost::ExtensionHost(const Extension* extension,
DCHECK(host_type == VIEW_TYPE_EXTENSION_BACKGROUND_PAGE ||
host_type == VIEW_TYPE_EXTENSION_DIALOG ||
host_type == VIEW_TYPE_EXTENSION_POPUP);
@ -95,7 +95,7 @@ index 8017d648301b..a0dbd923c64d 100644
render_view_host_ = host_contents_->GetRenderViewHost();
@@ -87,6 +88,48 @@ ExtensionHost::ExtensionHost(const Extension* extension,
@@ -86,6 +87,48 @@ ExtensionHost::ExtensionHost(const Extension* extension,
dispatcher()->set_delegate(this);
}
@ -219,10 +219,10 @@ index 9e8ebb1a4d59..b42e88b11f6a 100644
// once each time the extensions system is loaded per browser_context. The
// implementation may wish to use the BrowserContext to record the current
diff --git extensions/browser/process_manager.cc extensions/browser/process_manager.cc
index 73a77af25cfc..27d940d5b46c 100644
index 1f8c4ed09d60..933019a7a483 100644
--- extensions/browser/process_manager.cc
+++ extensions/browser/process_manager.cc
@@ -350,9 +350,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension,
@@ -353,9 +353,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension,
return true; // TODO(kalman): return false here? It might break things...
DVLOG(1) << "CreateBackgroundHost " << extension->id();

View File

@ -12,7 +12,7 @@ index 87fb8815433e..f19fba48f06c 100644
# https://crbug.com/474506.
"//clank/java/BUILD.gn",
diff --git BUILD.gn BUILD.gn
index db688ae72c3b..2f59b23ad90a 100644
index 62cf575ef492..f159433494c2 100644
--- BUILD.gn
+++ BUILD.gn
@@ -193,6 +193,7 @@ group("gn_all") {
@ -56,7 +56,7 @@ index 982fbe8d3f0d..e757be4688f1 100644
+ "studio path")
}
diff --git build/toolchain/win/BUILD.gn build/toolchain/win/BUILD.gn
index 4d9d1f45f870..c668f93a50f3 100644
index eb3e2b2b377d..a4bee6058da2 100644
--- build/toolchain/win/BUILD.gn
+++ build/toolchain/win/BUILD.gn
@@ -6,6 +6,7 @@ import("//build/config/clang/clang.gni")
@ -77,7 +77,7 @@ index 4d9d1f45f870..c668f93a50f3 100644
goma_prefix = ""
}
diff --git build/toolchain/win/setup_toolchain.py build/toolchain/win/setup_toolchain.py
index 2ee36e28f50d..7a08b9789226 100644
index 1ba5533c3efb..abfd55a2c703 100644
--- build/toolchain/win/setup_toolchain.py
+++ build/toolchain/win/setup_toolchain.py
@@ -134,25 +134,28 @@ def _LoadToolchainEnv(cpu, sdk_dir, target_store):

View File

@ -1,9 +1,9 @@
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
index 2d82ed5b4e23..4bf0e3a8fc94 100644
index 9bb0a52e61e0..a9b5f52b936c 100644
--- build/config/compiler/BUILD.gn
+++ build/config/compiler/BUILD.gn
@@ -152,7 +152,7 @@ declare_args() {
!(is_android && use_order_profiling) &&
!use_clang_coverage && !(is_android && use_order_profiling) &&
(use_lld ||
(use_gold &&
- ((!is_android && linux_use_bundled_binutils) || is_chromeos ||

View File

@ -1,5 +1,5 @@
diff --git base/message_loop/message_loop_current.h base/message_loop/message_loop_current.h
index c5016dcf20a2..cf1db622f8fb 100644
index 9e19a78aca10..47a54de56a74 100644
--- base/message_loop/message_loop_current.h
+++ base/message_loop/message_loop_current.h
@@ -120,6 +120,16 @@ class BASE_EXPORT MessageLoopCurrent {
@ -34,7 +34,7 @@ index c5016dcf20a2..cf1db622f8fb 100644
#if !defined(OS_NACL)
diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc
index 8e6f1f41def2..b07865ebae37 100644
index 2860539af17d..98680dda14dd 100644
--- base/message_loop/message_pump_win.cc
+++ base/message_loop/message_pump_win.cc
@@ -11,6 +11,7 @@

View File

@ -1,5 +1,5 @@
diff --git net/base/network_delegate.h net/base/network_delegate.h
index fdd61fecfc9b..b9590ca9c4fb 100644
index c28d0bb3b676..1acbb4c94495 100644
--- net/base/network_delegate.h
+++ net/base/network_delegate.h
@@ -17,6 +17,7 @@
@ -10,7 +10,7 @@ index fdd61fecfc9b..b9590ca9c4fb 100644
#include "net/proxy_resolution/proxy_retry_info.h"
class GURL;
@@ -123,6 +124,10 @@ class NET_EXPORT NetworkDelegate {
@@ -125,6 +126,10 @@ class NET_EXPORT NetworkDelegate {
bool CanUseReportingClient(const url::Origin& origin,
const GURL& endpoint) const;
@ -22,10 +22,10 @@ index fdd61fecfc9b..b9590ca9c4fb 100644
THREAD_CHECKER(thread_checker_);
diff --git net/url_request/url_request_job.cc net/url_request/url_request_job.cc
index dbe08e3e375f..11051c636d5a 100644
index 6344fa04593d..ee26c1d88363 100644
--- net/url_request/url_request_job.cc
+++ net/url_request/url_request_job.cc
@@ -460,6 +460,12 @@ void URLRequestJob::NotifyHeadersComplete() {
@@ -466,6 +466,12 @@ void URLRequestJob::NotifyHeadersComplete() {
DCHECK(!source_stream_);
source_stream_ = SetUpSourceStream();

View File

@ -58,10 +58,10 @@ index f61ff0d0564a..e6727c7b1cbc 100644
} // namespace certificate_transparency
diff --git net/http/transport_security_state.cc net/http/transport_security_state.cc
index 5177ef21fdfe..5a98b43c9512 100644
index cd6128c22924..5d614e50ec4e 100644
--- net/http/transport_security_state.cc
+++ net/http/transport_security_state.cc
@@ -1562,8 +1562,10 @@ void TransportSecurityState::ClearReportCachesForTesting() {
@@ -1309,8 +1309,10 @@ void TransportSecurityState::ClearReportCachesForTesting() {
sent_expect_ct_reports_cache_.Clear();
}

View File

@ -1,5 +1,5 @@
diff --git BUILD.gn BUILD.gn
index 132f3c28e..4726a808c 100644
index fb251fc9e..0e5ba046e 100644
--- BUILD.gn
+++ BUILD.gn
@@ -248,6 +248,10 @@ jumbo_static_library("pdfium") {
@ -14,7 +14,7 @@ index 132f3c28e..4726a808c 100644
jumbo_static_library("test_support") {
diff --git fpdfsdk/fpdf_view.cpp fpdfsdk/fpdf_view.cpp
index 0e76548ab..cb89a1a4c 100644
index 8aca6fb9f..db703ef24 100644
--- fpdfsdk/fpdf_view.cpp
+++ fpdfsdk/fpdf_view.cpp
@@ -38,6 +38,7 @@
@ -25,7 +25,7 @@ index 0e76548ab..cb89a1a4c 100644
#include "fxjs/ijs_runtime.h"
#include "public/fpdf_formfill.h"
#include "third_party/base/ptr_util.h"
@@ -198,6 +199,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_DestroyLibrary() {
@@ -194,6 +195,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_DestroyLibrary() {
CPDF_ModuleMgr::Destroy();
CFX_GEModule::Destroy();

View File

@ -35,10 +35,10 @@ index 78cbf5f3db86..9a4906a32336 100644
bool record_whole_document;
SavePreviousDocumentResources save_previous_document_resources;
diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc
index 2ac60a4826d1..e658a53dc76a 100644
index 950a68c86c38..3e95096693b6 100644
--- content/renderer/render_view_impl.cc
+++ content/renderer/render_view_impl.cc
@@ -1205,6 +1205,7 @@ void RenderViewImpl::ApplyWebPreferencesInternal(
@@ -1200,6 +1200,7 @@ void RenderViewImpl::ApplyWebPreferencesInternal(
blink::WebView* web_view,
CompositorDependencies* compositor_deps) {
ApplyWebPreferences(prefs, web_view);

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index 30a33ab1cb73..1cbb401d639e 100644
index 9a6bde79b2d9..3262d468f969 100644
--- chrome/browser/ui/BUILD.gn
+++ chrome/browser/ui/BUILD.gn
@@ -888,6 +888,7 @@ split_static_library("ui") {
@@ -890,6 +890,7 @@ split_static_library("ui") {
"//base:i18n",
"//base/allocator:buildflags",
"//cc/paint",
@ -253,7 +253,7 @@ index d85d26c7e79c..ecced6678eb5 100644
#endif // COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_
diff --git components/printing/renderer/print_render_frame_helper.cc components/printing/renderer/print_render_frame_helper.cc
index d1f6630b05c6..66a9e8a04627 100644
index 7bfc822296c2..04fb1dc64a7d 100644
--- components/printing/renderer/print_render_frame_helper.cc
+++ components/printing/renderer/print_render_frame_helper.cc
@@ -340,7 +340,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame,
@ -437,7 +437,7 @@ index d1f6630b05c6..66a9e8a04627 100644
PrintRenderFrameHelper::PrintPreviewContext::PrintPreviewContext()
: total_page_count_(0),
diff --git components/printing/renderer/print_render_frame_helper.h components/printing/renderer/print_render_frame_helper.h
index 46da03048dfb..c6b185b951fc 100644
index 8915d8c7caf0..26b67583bbf1 100644
--- components/printing/renderer/print_render_frame_helper.h
+++ components/printing/renderer/print_render_frame_helper.h
@@ -149,10 +149,8 @@ class PrintRenderFrameHelper

View File

@ -1,5 +1,5 @@
diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc
index 3cacc3fdac2d..694dfa1c3901 100644
index 4755361efbed..1fb50696deaa 100644
--- content/browser/renderer_host/render_widget_host_view_aura.cc
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -718,10 +718,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const {
@ -19,7 +19,7 @@ index 3cacc3fdac2d..694dfa1c3901 100644
}
void RenderWidgetHostViewAura::WindowTitleChanged() {
@@ -1917,6 +1919,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
@@ -1918,6 +1920,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
if (frame_sink_id_.is_valid())
window_->SetEmbedFrameSinkId(frame_sink_id_);

View File

@ -28,7 +28,7 @@ index 596cfaa01092..f341bca174d5 100644
origin, std::move(request)));
}
diff --git content/browser/blob_storage/chrome_blob_storage_context.cc content/browser/blob_storage/chrome_blob_storage_context.cc
index 17347dbfd102..193584187bd1 100644
index 0900dbb68986..57b991577178 100644
--- content/browser/blob_storage/chrome_blob_storage_context.cc
+++ content/browser/blob_storage/chrome_blob_storage_context.cc
@@ -87,6 +87,11 @@ class BlobHandleImpl : public BlobHandle {
@ -44,7 +44,7 @@ index 17347dbfd102..193584187bd1 100644
BrowserContext* context) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
diff --git content/browser/blob_storage/chrome_blob_storage_context.h content/browser/blob_storage/chrome_blob_storage_context.h
index 812a6a5cebe8..e6ee7ffbba79 100644
index 26cf1ebfdffc..f6de541d25d1 100644
--- content/browser/blob_storage/chrome_blob_storage_context.h
+++ content/browser/blob_storage/chrome_blob_storage_context.h
@@ -50,6 +50,8 @@ class CONTENT_EXPORT ChromeBlobStorageContext
@ -57,7 +57,7 @@ index 812a6a5cebe8..e6ee7ffbba79 100644
static ChromeBlobStorageContext* GetFor(
BrowserContext* browser_context);
diff --git content/browser/bluetooth/web_bluetooth_service_impl.cc content/browser/bluetooth/web_bluetooth_service_impl.cc
index cda94e43e866..84fde20fdce2 100644
index f061eca7c86b..0fc07c9c4eb8 100644
--- content/browser/bluetooth/web_bluetooth_service_impl.cc
+++ content/browser/bluetooth/web_bluetooth_service_impl.cc
@@ -1233,9 +1233,9 @@ url::Origin WebBluetoothServiceImpl::GetOrigin() {
@ -73,10 +73,10 @@ index cda94e43e866..84fde20fdce2 100644
partition->GetBluetoothAllowedDevicesMap();
return allowed_devices_map->GetOrCreateAllowedDevices(GetOrigin());
diff --git content/browser/browser_context.cc content/browser/browser_context.cc
index 569e77cdb061..a663e6f4d4bc 100644
index 6793401c6c72..4d7289299585 100644
--- content/browser/browser_context.cc
+++ content/browser/browser_context.cc
@@ -131,11 +131,18 @@ StoragePartition* GetStoragePartitionFromConfig(
@@ -150,11 +150,18 @@ StoragePartition* GetStoragePartitionFromConfig(
StoragePartitionImplMap* partition_map =
GetStoragePartitionMap(browser_context);
@ -98,7 +98,7 @@ index 569e77cdb061..a663e6f4d4bc 100644
}
void SaveSessionStateOnIOThread(
@@ -565,6 +572,11 @@ ServiceManagerConnection* BrowserContext::GetServiceManagerConnectionFor(
@@ -615,6 +622,11 @@ ServiceManagerConnection* BrowserContext::GetServiceManagerConnectionFor(
BrowserContext::BrowserContext()
: unique_id_(base::UnguessableToken::Create().ToString()) {}
@ -111,10 +111,10 @@ index 569e77cdb061..a663e6f4d4bc 100644
CHECK(GetUserData(kMojoWasInitialized))
<< "Attempting to destroy a BrowserContext that never called "
diff --git content/browser/devtools/protocol/network_handler.cc content/browser/devtools/protocol/network_handler.cc
index b9b4b2346364..be5ffdfc18be 100644
index 905fe910bebb..abf75841dd86 100644
--- content/browser/devtools/protocol/network_handler.cc
+++ content/browser/devtools/protocol/network_handler.cc
@@ -945,8 +945,7 @@ class BackgroundSyncRestorer {
@@ -927,8 +927,7 @@ class BackgroundSyncRestorer {
scoped_refptr<ServiceWorkerDevToolsAgentHost> service_worker_host =
static_cast<ServiceWorkerDevToolsAgentHost*>(host.get());
scoped_refptr<BackgroundSyncContext> sync_context =
@ -125,7 +125,7 @@ index b9b4b2346364..be5ffdfc18be 100644
BrowserThread::IO, FROM_HERE,
base::BindOnce(
diff --git content/browser/devtools/protocol/service_worker_handler.cc content/browser/devtools/protocol/service_worker_handler.cc
index 5449b409717a..b138a8ca7fa3 100644
index ed4a2e99d68b..a545f01d8efd 100644
--- content/browser/devtools/protocol/service_worker_handler.cc
+++ content/browser/devtools/protocol/service_worker_handler.cc
@@ -170,8 +170,7 @@ void ServiceWorkerHandler::SetRenderer(int process_host_id,
@ -161,10 +161,10 @@ index ec9ab86d0ca6..0fe5219f1e84 100644
base::WeakPtrFactory<ServiceWorkerHandler> weak_factory_;
diff --git content/browser/download/download_manager_impl.cc content/browser/download/download_manager_impl.cc
index 9a52db09db96..a7e8e9960aea 100644
index ba4abf130285..9bca602b6ec5 100644
--- content/browser/download/download_manager_impl.cc
+++ content/browser/download/download_manager_impl.cc
@@ -86,9 +86,9 @@
@@ -85,9 +85,9 @@
namespace content {
namespace {
@ -177,7 +177,7 @@ index 9a52db09db96..a7e8e9960aea 100644
DCHECK_CURRENTLY_ON(BrowserThread::UI);
SiteInstance* site_instance = nullptr;
@@ -98,8 +98,7 @@ StoragePartitionImpl* GetStoragePartition(BrowserContext* context,
@@ -97,8 +97,7 @@ StoragePartitionImpl* GetStoragePartition(BrowserContext* context,
if (render_frame_host_)
site_instance = render_frame_host_->GetSiteInstance();
}
@ -187,7 +187,7 @@ index 9a52db09db96..a7e8e9960aea 100644
}
bool CanRequestURLFromRenderer(int render_process_id, GURL url) {
@@ -265,7 +264,7 @@ base::FilePath GetTemporaryDownloadDirectory() {
@@ -264,7 +263,7 @@ base::FilePath GetTemporaryDownloadDirectory() {
#endif
scoped_refptr<download::DownloadURLLoaderFactoryGetter>
@ -196,7 +196,7 @@ index 9a52db09db96..a7e8e9960aea 100644
RenderFrameHost* rfh,
bool is_download) {
network::mojom::URLLoaderFactoryPtrInfo proxy_factory_ptr_info;
@@ -282,7 +281,7 @@ CreateDownloadURLLoaderFactoryGetter(StoragePartitionImpl* storage_partition,
@@ -281,7 +280,7 @@ CreateDownloadURLLoaderFactoryGetter(StoragePartitionImpl* storage_partition,
}
}
return base::MakeRefCounted<NetworkDownloadURLLoaderFactoryGetter>(
@ -205,7 +205,7 @@ index 9a52db09db96..a7e8e9960aea 100644
std::move(proxy_factory_ptr_info), std::move(proxy_factory_request));
}
@@ -1062,7 +1061,7 @@ void DownloadManagerImpl::InterceptNavigationOnChecksComplete(
@@ -1061,7 +1060,7 @@ void DownloadManagerImpl::InterceptNavigationOnChecksComplete(
tab_referrer_url = entry->GetReferrer().url;
}
}
@ -214,7 +214,7 @@ index 9a52db09db96..a7e8e9960aea 100644
GetStoragePartition(browser_context_, render_process_id, render_frame_id);
in_progress_manager_->InterceptDownloadFromNavigation(
std::move(resource_request), render_process_id, render_frame_id, site_url,
@@ -1112,10 +1111,8 @@ void DownloadManagerImpl::BeginResourceDownloadOnChecksComplete(
@@ -1107,10 +1106,8 @@ void DownloadManagerImpl::BeginResourceDownloadOnChecksComplete(
base::MakeRefCounted<FileDownloadURLLoaderFactoryGetter>(
params->url(), browser_context_->GetPath());
} else {
@ -228,10 +228,10 @@ index 9a52db09db96..a7e8e9960aea 100644
CreateDownloadURLLoaderFactoryGetter(storage_partition, rfh, true);
}
diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc
index db605075334b..8091ca84ab73 100644
index 41a7633f56ec..c40cc01512ef 100644
--- content/browser/loader/navigation_url_loader_impl.cc
+++ content/browser/loader/navigation_url_loader_impl.cc
@@ -986,7 +986,7 @@ class NavigationURLLoaderImpl::URLLoaderRequestController
@@ -987,7 +987,7 @@ class NavigationURLLoaderImpl::URLLoaderRequestController
// path does as well for navigations.
bool has_plugin = PluginService::GetInstance()->GetPluginInfo(
-1 /* render_process_id */, -1 /* render_frame_id */, resource_context_,
@ -240,7 +240,7 @@ index db605075334b..8091ca84ab73 100644
false /* allow_wildcard */, &stale, &plugin, nullptr);
if (stale) {
@@ -1319,7 +1319,7 @@ NavigationURLLoaderImpl::NavigationURLLoaderImpl(
@@ -1320,7 +1320,7 @@ NavigationURLLoaderImpl::NavigationURLLoaderImpl(
network::mojom::URLLoaderFactoryPtrInfo proxied_factory_info;
network::mojom::URLLoaderFactoryRequest proxied_factory_request;
@ -249,7 +249,7 @@ index db605075334b..8091ca84ab73 100644
if (frame_tree_node) {
// |frame_tree_node| may be null in some unit test environments.
GetContentClient()
@@ -1367,7 +1367,8 @@ NavigationURLLoaderImpl::NavigationURLLoaderImpl(
@@ -1368,7 +1368,8 @@ NavigationURLLoaderImpl::NavigationURLLoaderImpl(
DCHECK(!request_controller_);
request_controller_ = std::make_unique<URLLoaderRequestController>(
std::move(initial_interceptors), std::move(new_request), resource_context,
@ -276,10 +276,10 @@ index 6a6e31bdb070..dce0433e1775 100644
partition->GetPaymentAppContext();
diff --git content/browser/payments/payment_app_provider_impl.cc content/browser/payments/payment_app_provider_impl.cc
index 1c36dd8f388c..c294ba21ebdb 100644
index 245c0b764f90..8daa7e238fe1 100644
--- content/browser/payments/payment_app_provider_impl.cc
+++ content/browser/payments/payment_app_provider_impl.cc
@@ -368,10 +368,11 @@ void StartServiceWorkerForDispatch(BrowserContext* browser_context,
@@ -369,10 +369,11 @@ void StartServiceWorkerForDispatch(BrowserContext* browser_context,
ServiceWorkerStartCallback callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@ -294,7 +294,7 @@ index 1c36dd8f388c..c294ba21ebdb 100644
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
@@ -448,8 +449,8 @@ void PaymentAppProviderImpl::GetAllPaymentApps(
@@ -449,8 +450,8 @@ void PaymentAppProviderImpl::GetAllPaymentApps(
GetAllPaymentAppsCallback callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@ -306,7 +306,7 @@ index 1c36dd8f388c..c294ba21ebdb 100644
partition->GetPaymentAppContext();
diff --git content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_impl.cc
index 423cb81a09e2..324b01db8cbf 100644
index af9db4de12d0..f2552a8199e9 100644
--- content/browser/renderer_host/render_process_host_impl.cc
+++ content/browser/renderer_host/render_process_host_impl.cc
@@ -740,11 +740,10 @@ class DefaultSubframeProcessHostHolder : public base::SupportsUserData::Data,
@ -354,7 +354,7 @@ index 423cb81a09e2..324b01db8cbf 100644
bool is_for_guests_only)
: fast_shutdown_started_(false),
deleting_soon_(false),
@@ -1410,7 +1409,8 @@ RenderProcessHostImpl::RenderProcessHostImpl(
@@ -1410,10 +1409,12 @@ RenderProcessHostImpl::RenderProcessHostImpl(
indexed_db_factory_(new IndexedDBDispatcherHost(
id_,
storage_partition_impl_->GetURLRequestContext(),
@ -362,9 +362,14 @@ index 423cb81a09e2..324b01db8cbf 100644
+ static_cast<IndexedDBContextImpl*>(
+ storage_partition_impl_->GetIndexedDBContext()),
ChromeBlobStorageContext::GetFor(browser_context_))),
service_worker_dispatcher_host_(new ServiceWorkerDispatcherHost(
- storage_partition_impl_->GetServiceWorkerContext(),
+ static_cast<ServiceWorkerContextWrapper*>(
+ storage_partition_impl_->GetServiceWorkerContext()),
id_)),
channel_connected_(false),
sent_render_process_ready_(false),
@@ -1445,7 +1445,8 @@ RenderProcessHostImpl::RenderProcessHostImpl(
@@ -1448,7 +1449,8 @@ RenderProcessHostImpl::RenderProcessHostImpl(
}
push_messaging_manager_.reset(new PushMessagingManager(
@ -373,8 +378,8 @@ index 423cb81a09e2..324b01db8cbf 100644
+ storage_partition_impl_->GetServiceWorkerContext())));
AddObserver(indexed_db_factory_.get());
#if defined(OS_MACOSX)
@@ -1771,6 +1772,17 @@ void RenderProcessHostImpl::ResetChannelProxy() {
AddObserver(service_worker_dispatcher_host_.get());
@@ -1775,6 +1777,17 @@ void RenderProcessHostImpl::ResetChannelProxy() {
void RenderProcessHostImpl::CreateMessageFilters() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@ -392,7 +397,7 @@ index 423cb81a09e2..324b01db8cbf 100644
MediaInternals* media_internals = MediaInternals::GetInstance();
// Add BrowserPluginMessageFilter to ensure it gets the first stab at messages
// from guests.
@@ -1783,7 +1795,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
@@ -1787,7 +1800,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
base::MakeRefCounted<RenderMessageFilter>(
GetID(), GetBrowserContext(), request_context.get(),
widget_helper_.get(), media_internals,
@ -401,7 +406,7 @@ index 423cb81a09e2..324b01db8cbf 100644
AddFilter(render_message_filter.get());
render_frame_message_filter_ = new RenderFrameMessageFilter(
@@ -1810,10 +1822,10 @@ void RenderProcessHostImpl::CreateMessageFilters() {
@@ -1814,10 +1827,10 @@ void RenderProcessHostImpl::CreateMessageFilters() {
ChromeBlobStorageContext::GetFor(browser_context);
resource_message_filter_ = new ResourceMessageFilter(
@ -414,7 +419,7 @@ index 423cb81a09e2..324b01db8cbf 100644
storage_partition_impl_->GetPrefetchURLLoaderService(),
std::move(get_contexts_callback),
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
@@ -1822,8 +1834,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
@@ -1826,8 +1839,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
AddFilter(
new MidiHost(GetID(), BrowserMainLoop::GetInstance()->midi_service()));
@ -424,16 +429,7 @@ index 423cb81a09e2..324b01db8cbf 100644
peer_connection_tracker_host_ = new PeerConnectionTrackerHost(GetID());
AddFilter(peer_connection_tracker_host_.get());
@@ -1841,7 +1852,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
auto service_worker_filter =
base::MakeRefCounted<ServiceWorkerDispatcherHost>(
- storage_partition_impl_->GetServiceWorkerContext(), GetID());
+ service_worker_context, GetID());
AddFilter(service_worker_filter.get());
p2p_socket_dispatcher_host_ = new P2PSocketDispatcherHost(
@@ -1850,10 +1861,6 @@ void RenderProcessHostImpl::CreateMessageFilters() {
@@ -1849,10 +1861,6 @@ void RenderProcessHostImpl::CreateMessageFilters() {
AddFilter(new TraceMessageFilter(GetID()));
AddFilter(new ResolveProxyMsgHelper(request_context.get()));
@ -444,7 +440,7 @@ index 423cb81a09e2..324b01db8cbf 100644
}
void RenderProcessHostImpl::BindCacheStorage(
@@ -1865,7 +1872,8 @@ void RenderProcessHostImpl::BindCacheStorage(
@@ -1864,7 +1872,8 @@ void RenderProcessHostImpl::BindCacheStorage(
cache_storage_dispatcher_host_ =
base::MakeRefCounted<CacheStorageDispatcherHost>();
cache_storage_dispatcher_host_->Init(
@ -454,7 +450,7 @@ index 423cb81a09e2..324b01db8cbf 100644
}
// Send the binding to IO thread, because Cache Storage handles Mojo IPC on IO
// thread entirely.
@@ -2013,7 +2021,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
@@ -2016,7 +2025,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
registry->AddInterface(base::BindRepeating(
&AppCacheDispatcherHost::Create,
@ -464,11 +460,21 @@ index 423cb81a09e2..324b01db8cbf 100644
GetID()));
AddUIThreadInterface(registry.get(), base::Bind(&FieldTrialRecorder::Create));
@@ -2047,6 +2057,9 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
plugin_registry_.reset(
new PluginRegistryImpl(GetBrowserContext()->GetResourceContext()));
}
+ // Needed for proper routing of IsPluginAvailable callbacks.
+ DCHECK_GE(GetID(), 0);
+ plugin_registry_->set_render_process_id(GetID());
registry->AddInterface(base::BindRepeating(
&PluginRegistryImpl::Bind, base::Unretained(plugin_registry_.get())));
#endif
diff --git content/browser/renderer_host/render_process_host_impl.h content/browser/renderer_host/render_process_host_impl.h
index c4bc2f4b6a11..826db9885c6a 100644
index 982ae3e1d73e..cb33109b8e83 100644
--- content/browser/renderer_host/render_process_host_impl.h
+++ content/browser/renderer_host/render_process_host_impl.h
@@ -89,7 +89,6 @@ class ResourceMessageFilter;
@@ -91,7 +91,6 @@ class ServiceWorkerDispatcherHost;
class SiteInstance;
class SiteInstanceImpl;
class StoragePartition;
@ -476,7 +482,7 @@ index c4bc2f4b6a11..826db9885c6a 100644
struct ChildProcessTerminationInfo;
typedef base::Thread* (*RendererMainThreadFactoryFunction)(
@@ -132,7 +131,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
@@ -134,7 +133,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
// null.
static RenderProcessHost* CreateRenderProcessHost(
BrowserContext* browser_context,
@ -485,7 +491,7 @@ index c4bc2f4b6a11..826db9885c6a 100644
SiteInstance* site_instance,
bool is_for_guests_only);
@@ -444,7 +443,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
@@ -446,7 +445,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
// Use CreateRenderProcessHost() instead of calling this constructor
// directly.
RenderProcessHostImpl(BrowserContext* browser_context,
@ -508,7 +514,7 @@ index c4bc2f4b6a11..826db9885c6a 100644
// The observers watching our lifetime.
base::ObserverList<RenderProcessHostObserver> observers_;
diff --git content/browser/renderer_interface_binders.cc content/browser/renderer_interface_binders.cc
index ad1e6306dc26..f5b894c64850 100644
index 896f1b27ded7..b8d7d423e555 100644
--- content/browser/renderer_interface_binders.cc
+++ content/browser/renderer_interface_binders.cc
@@ -139,7 +139,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() {
@ -520,7 +526,7 @@ index ad1e6306dc26..f5b894c64850 100644
->GetPaymentAppContext()
->CreatePaymentManager(std::move(request));
}));
@@ -159,16 +159,17 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() {
@@ -159,15 +159,16 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() {
parameterized_binder_registry_.AddInterface(base::BindRepeating(
[](blink::mojom::LockManagerRequest request, RenderProcessHost* host,
const url::Origin& origin) {
@ -534,14 +540,12 @@ index ad1e6306dc26..f5b894c64850 100644
RenderProcessHost* host, const url::Origin& origin) {
- static_cast<StoragePartitionImpl*>(host->GetStoragePartition())
- ->GetPlatformNotificationContext()
- ->CreateService(host->GetID(), origin, std::move(request));
+ static_cast<PlatformNotificationContextImpl*>(
+ host->GetStoragePartition()
+ ->GetPlatformNotificationContext())
+ ->CreateService(host->GetID(), origin, std::move(request));
+ host->GetStoragePartition()
+ ->GetPlatformNotificationContext())
->CreateService(origin, std::move(request));
}));
parameterized_binder_registry_.AddInterface(
base::BindRepeating(&BackgroundFetchServiceImpl::Create));
@@ -179,7 +180,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() {
parameterized_binder_registry_.AddInterface(base::BindRepeating(
[](blink::mojom::CookieStoreRequest request, RenderProcessHost* host,
@ -552,11 +556,11 @@ index ad1e6306dc26..f5b894c64850 100644
->CreateService(std::move(request), origin);
}));
diff --git content/browser/shared_worker/shared_worker_connector_impl.cc content/browser/shared_worker/shared_worker_connector_impl.cc
index 4b08ffd8b662..a09bdc7cb892 100644
index 2fe70f50171f..98244cd5ddf8 100644
--- content/browser/shared_worker/shared_worker_connector_impl.cc
+++ content/browser/shared_worker/shared_worker_connector_impl.cc
@@ -41,8 +41,8 @@ void SharedWorkerConnectorImpl::Connect(
return;
@@ -52,8 +52,8 @@ void SharedWorkerConnectorImpl::Connect(
host->GetBrowserContext(), std::move(blob_url_token));
}
SharedWorkerServiceImpl* service =
- static_cast<StoragePartitionImpl*>(host->GetStoragePartition())
@ -565,12 +569,12 @@ index 4b08ffd8b662..a09bdc7cb892 100644
+ ->GetSharedWorkerService());
service->ConnectToWorker(process_id_, frame_id_, std::move(info),
std::move(client), creation_context_type,
blink::MessagePortChannel(std::move(message_port)));
blink::MessagePortChannel(std::move(message_port)),
diff --git content/browser/shared_worker/shared_worker_service_impl.cc content/browser/shared_worker/shared_worker_service_impl.cc
index 469c8b3aa8d9..d1f7eb1f9571 100644
index b78e52de343e..1aa055691d80 100644
--- content/browser/shared_worker/shared_worker_service_impl.cc
+++ content/browser/shared_worker/shared_worker_service_impl.cc
@@ -293,8 +293,8 @@ void SharedWorkerServiceImpl::CreateWorker(
@@ -309,8 +309,8 @@ void SharedWorkerServiceImpl::CreateWorker(
BrowserThread::IO, FROM_HERE,
base::BindOnce(
&CreateScriptLoaderOnIO,
@ -580,12 +584,12 @@ index 469c8b3aa8d9..d1f7eb1f9571 100644
+ ->url_loader_factory_getter()),
std::move(factory_bundle_for_browser),
std::move(factory_bundle_for_renderer), service_worker_context_,
process_id,
blob_url_loader_factory ? blob_url_loader_factory->Clone()
diff --git content/browser/storage_partition_impl.h content/browser/storage_partition_impl.h
index 06cca44a1517..378193727006 100644
index 18c46a2e40e2..fb86e45d4198 100644
--- content/browser/storage_partition_impl.h
+++ content/browser/storage_partition_impl.h
@@ -96,7 +96,7 @@ class CONTENT_EXPORT StoragePartitionImpl
@@ -94,7 +94,7 @@ class CONTENT_EXPORT StoragePartitionImpl
storage::FileSystemContext* GetFileSystemContext() override;
storage::DatabaseTracker* GetDatabaseTracker() override;
DOMStorageContextWrapper* GetDOMStorageContext() override;
@ -594,7 +598,7 @@ index 06cca44a1517..378193727006 100644
IndexedDBContextImpl* GetIndexedDBContext() override;
CacheStorageContextImpl* GetCacheStorageContext() override;
ServiceWorkerContextWrapper* GetServiceWorkerContext() override;
@@ -135,15 +135,15 @@ class CONTENT_EXPORT StoragePartitionImpl
@@ -133,14 +133,14 @@ class CONTENT_EXPORT StoragePartitionImpl
void FlushNetworkInterfaceForTesting() override;
void WaitForDeletionTasksForTesting() override;
@ -603,7 +607,6 @@ index 06cca44a1517..378193727006 100644
- PaymentAppContextImpl* GetPaymentAppContext();
- BroadcastChannelProvider* GetBroadcastChannelProvider();
- BluetoothAllowedDevicesMap* GetBluetoothAllowedDevicesMap();
- BlobURLLoaderFactory* GetBlobURLLoaderFactory();
- BlobRegistryWrapper* GetBlobRegistry();
- PrefetchURLLoaderService* GetPrefetchURLLoaderService();
- CookieStoreContext* GetCookieStoreContext();
@ -612,14 +615,13 @@ index 06cca44a1517..378193727006 100644
+ PaymentAppContextImpl* GetPaymentAppContext() override;
+ BroadcastChannelProvider* GetBroadcastChannelProvider() override;
+ BluetoothAllowedDevicesMap* GetBluetoothAllowedDevicesMap() override;
+ BlobURLLoaderFactory* GetBlobURLLoaderFactory() override;
+ BlobRegistryWrapper* GetBlobRegistry() override;
+ PrefetchURLLoaderService* GetPrefetchURLLoaderService() override;
+ CookieStoreContext* GetCookieStoreContext() override;
// blink::mojom::StoragePartitionService interface.
void OpenLocalStorage(const url::Origin& origin,
@@ -152,18 +152,19 @@ class CONTENT_EXPORT StoragePartitionImpl
@@ -149,18 +149,19 @@ class CONTENT_EXPORT StoragePartitionImpl
const std::string& namespace_id,
blink::mojom::SessionStorageNamespaceRequest request) override;
@ -643,7 +645,7 @@ index 06cca44a1517..378193727006 100644
auto& bindings_for_testing() { return bindings_; }
@@ -174,10 +175,11 @@ class CONTENT_EXPORT StoragePartitionImpl
@@ -171,10 +172,11 @@ class CONTENT_EXPORT StoragePartitionImpl
// one must use the "chrome-guest://blahblah" site URL to ensure that the
// service worker stays in this StoragePartition. This is an empty GURL if
// this StoragePartition is not for guests.
@ -686,7 +688,7 @@ index 075ae3e7431e..57fb5fd2c4a8 100644
void InitializeOnIOThread();
diff --git content/browser/webui/web_ui_url_loader_factory.cc content/browser/webui/web_ui_url_loader_factory.cc
index 0b8ff3fcc618..730ea693d521 100644
index 653e22e0ee58..7b38a3ebd626 100644
--- content/browser/webui/web_ui_url_loader_factory.cc
+++ content/browser/webui/web_ui_url_loader_factory.cc
@@ -19,13 +19,13 @@
@ -704,7 +706,7 @@ index 0b8ff3fcc618..730ea693d521 100644
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/url_constants.h"
@@ -312,9 +312,8 @@ class WebUIURLLoaderFactory : public network::mojom::URLLoaderFactory,
@@ -313,9 +313,8 @@ class WebUIURLLoaderFactory : public network::mojom::URLLoaderFactory,
const std::string& scheme() const { return scheme_; }
private:
@ -717,10 +719,10 @@ index 0b8ff3fcc618..730ea693d521 100644
RenderFrameHost* render_frame_host_;
diff --git content/public/browser/browser_context.h content/public/browser/browser_context.h
index b5cad2b73640..da041c3faf19 100644
index faf278e97fe0..4cf94f032385 100644
--- content/public/browser/browser_context.h
+++ content/public/browser/browser_context.h
@@ -199,6 +199,8 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
@@ -208,6 +208,8 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
BrowserContext();
@ -729,7 +731,7 @@ index b5cad2b73640..da041c3faf19 100644
~BrowserContext() override;
// Shuts down the storage partitions associated to this browser context.
@@ -287,6 +289,14 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
@@ -296,6 +298,14 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
const base::FilePath& partition_path,
bool in_memory) = 0;
@ -745,7 +747,7 @@ index b5cad2b73640..da041c3faf19 100644
std::map<std::string, service_manager::EmbeddedServiceInfo>;
diff --git content/public/browser/storage_partition.h content/public/browser/storage_partition.h
index 28e2c251a117..e8c6105fdeee 100644
index 28e2c251a117..1fa41e0eecbd 100644
--- content/public/browser/storage_partition.h
+++ content/public/browser/storage_partition.h
@@ -14,8 +14,10 @@
@ -796,7 +798,7 @@ index 28e2c251a117..e8c6105fdeee 100644
virtual IndexedDBContext* GetIndexedDBContext() = 0;
virtual ServiceWorkerContext* GetServiceWorkerContext() = 0;
virtual SharedWorkerService* GetSharedWorkerService() = 0;
@@ -224,6 +243,27 @@ class CONTENT_EXPORT StoragePartition {
@@ -224,6 +243,26 @@ class CONTENT_EXPORT StoragePartition {
// Wait until all deletions tasks are finished. For test use only.
virtual void WaitForDeletionTasksForTesting() = 0;
@ -805,7 +807,6 @@ index 28e2c251a117..e8c6105fdeee 100644
+ virtual PaymentAppContextImpl* GetPaymentAppContext() = 0;
+ virtual BroadcastChannelProvider* GetBroadcastChannelProvider() = 0;
+ virtual BluetoothAllowedDevicesMap* GetBluetoothAllowedDevicesMap() = 0;
+ virtual BlobURLLoaderFactory* GetBlobURLLoaderFactory() = 0;
+ virtual BlobRegistryWrapper* GetBlobRegistry() = 0;
+ virtual PrefetchURLLoaderService* GetPrefetchURLLoaderService() = 0;
+ virtual CookieStoreContext* GetCookieStoreContext() = 0;

View File

@ -295,10 +295,10 @@ index 1d35afeda78f..333f9c0f778d 100644
std::unique_ptr<SelectionController> selection_controller_;
diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc
index cb9ff25e88a5..6dbd8472cea2 100644
index 7db3c69b1a3b..3c5a4106629d 100644
--- ui/views/controls/menu/menu_controller.cc
+++ ui/views/controls/menu/menu_controller.cc
@@ -2417,8 +2417,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem(
@@ -2451,8 +2451,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem(
void MenuController::OpenSubmenuChangeSelectionIfCan() {
MenuItemView* item = pending_state_.item;
@ -313,7 +313,7 @@ index cb9ff25e88a5..6dbd8472cea2 100644
MenuItemView* to_select = NULL;
if (item->GetSubmenu()->GetMenuItemCount() > 0)
to_select = FindInitialSelectableMenuItem(item, INCREMENT_SELECTION_DOWN);
@@ -2433,8 +2438,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
@@ -2467,8 +2472,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
void MenuController::CloseSubmenu() {
MenuItemView* item = state_.item;
DCHECK(item);
@ -373,10 +373,10 @@ index 4dea63f9f286..ef50b710c5af 100644
virtual int GetMaxWidthForMenu(MenuItemView* menu);
diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc
index f058ad626438..70df455a7c5d 100644
index 4b45b29b387b..39304c5c708c 100644
--- ui/views/controls/menu/menu_item_view.cc
+++ ui/views/controls/menu/menu_item_view.cc
@@ -905,7 +905,12 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
@@ -906,7 +906,12 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
// only need the background when we want it to look different, as when we're
// selected.
ui::NativeTheme* native_theme = GetNativeTheme();
@ -390,7 +390,7 @@ index f058ad626438..70df455a7c5d 100644
gfx::Rect item_bounds(0, 0, width(), height());
if (type_ == ACTIONABLE_SUBMENU) {
if (submenu_area_of_actionable_submenu_selected_) {
@@ -1024,6 +1029,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) {
@@ -1025,6 +1030,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) {
SkColor MenuItemView::GetTextColor(bool minor,
bool render_selection,
bool emphasized) const {
@ -512,7 +512,7 @@ index 0ac493c3c6a0..741769e90eb0 100644
void WillHideMenu(MenuItemView* menu) override;
void OnMenuClosed(MenuItemView* menu) override;
diff --git ui/views/controls/menu/menu_scroll_view_container.cc ui/views/controls/menu/menu_scroll_view_container.cc
index abcc8e28e7e5..574d46d03505 100644
index 16a1bef6715e..867a643ec1d3 100644
--- ui/views/controls/menu/menu_scroll_view_container.cc
+++ ui/views/controls/menu/menu_scroll_view_container.cc
@@ -183,6 +183,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view)

View File

@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
index 6e0db4cb107e..1cdb23dd3ae8 100644
index 0c4dc1f8e51d..04aff67cd9fe 100644
--- content/browser/renderer_host/render_widget_host_view_base.cc
+++ content/browser/renderer_host/render_widget_host_view_base.cc
@@ -446,6 +446,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() const {
@@ -449,6 +449,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() const {
return screen_info.device_scale_factor;
}
@ -18,7 +18,7 @@ index 6e0db4cb107e..1cdb23dd3ae8 100644
return renderer_frame_number_;
}
diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h
index ff771b902dce..5495543fab1a 100644
index 3e867a8bf130..27fb12375d15 100644
--- content/browser/renderer_host/render_widget_host_view_base.h
+++ content/browser/renderer_host/render_widget_host_view_base.h
@@ -84,6 +84,7 @@ class CursorManager;
@ -48,7 +48,7 @@ index ff771b902dce..5495543fab1a 100644
TouchSelectionControllerClientManager*
GetTouchSelectionControllerClientManager() override;
@@ -456,6 +462,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
@@ -458,6 +464,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
// helps to position the full screen widget on the correct monitor.
virtual void InitAsFullscreen(RenderWidgetHostView* reference_host_view) = 0;
@ -61,7 +61,7 @@ index ff771b902dce..5495543fab1a 100644
// Sets the cursor for this view to the one associated with the specified
// cursor_type.
virtual void UpdateCursor(const WebCursor& cursor) = 0;
@@ -660,6 +672,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
@@ -655,6 +667,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
bool use_viz_hit_test_ = false;
@ -135,7 +135,7 @@ index f772f64d656e..7d13f9f81b6c 100644
return host ? host->GetAcceleratedWidget() : NULL;
}
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index 7e422e82abe3..423d04d7226f 100644
index 429e3401d1e2..eaa995e03e70 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -87,6 +87,7 @@ DesktopWindowTreeHostWin::DesktopWindowTreeHostWin(
@ -160,7 +160,7 @@ index 7e422e82abe3..423d04d7226f 100644
remove_standard_frame_ = params.remove_standard_frame;
has_non_client_view_ = Widget::RequiresNonClientView(params.type);
@@ -865,11 +870,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
@@ -869,11 +874,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
}
void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) {
@ -179,10 +179,10 @@ index 7e422e82abe3..423d04d7226f 100644
bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) {
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.h ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
index 327e4fb5df8d..625d1f2cb50c 100644
index 1eb03f110884..c3319648f00a 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
@@ -283,6 +283,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
@@ -284,6 +284,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
// True if the window should have the frame removed.
bool remove_standard_frame_;
@ -194,7 +194,7 @@ index 327e4fb5df8d..625d1f2cb50c 100644
// a reference.
corewm::TooltipWin* tooltip_;
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
index cbfbfcbdcdb7..e7f0280bb4e7 100644
index 347384b9063f..aaeb62918b11 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
@@ -146,6 +146,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
@ -241,7 +241,7 @@ index cbfbfcbdcdb7..e7f0280bb4e7 100644
return ToDIPRect(bounds_in_pixels_);
}
@@ -1261,6 +1268,8 @@ void DesktopWindowTreeHostX11::SetBoundsInPixels(
@@ -1273,6 +1280,8 @@ void DesktopWindowTreeHostX11::SetBoundsInPixels(
}
gfx::Point DesktopWindowTreeHostX11::GetLocationOnScreenInPixels() const {
@ -250,7 +250,7 @@ index cbfbfcbdcdb7..e7f0280bb4e7 100644
return bounds_in_pixels_.origin();
}
@@ -1405,7 +1414,6 @@ void DesktopWindowTreeHostX11::InitX11Window(
@@ -1417,7 +1426,6 @@ void DesktopWindowTreeHostX11::InitX11Window(
::Atom window_type;
switch (params.type) {
case Widget::InitParams::TYPE_MENU:
@ -258,7 +258,7 @@ index cbfbfcbdcdb7..e7f0280bb4e7 100644
window_type = gfx::GetAtom("_NET_WM_WINDOW_TYPE_MENU");
break;
case Widget::InitParams::TYPE_TOOLTIP:
@@ -1461,9 +1469,15 @@ void DesktopWindowTreeHostX11::InitX11Window(
@@ -1473,9 +1481,15 @@ void DesktopWindowTreeHostX11::InitX11Window(
attribute_mask |= CWBorderPixel;
swa.border_pixel = 0;
@ -275,7 +275,7 @@ index cbfbfcbdcdb7..e7f0280bb4e7 100644
bounds_in_pixels_.y(), bounds_in_pixels_.width(),
bounds_in_pixels_.height(),
0, // border width
@@ -2061,6 +2075,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
@@ -2073,6 +2087,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
}
break;
}
@ -287,7 +287,7 @@ index cbfbfcbdcdb7..e7f0280bb4e7 100644
case x11::FocusOut:
OnFocusEvent(xev->type == x11::FocusIn, event->xfocus.mode,
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
index f424728b9679..319ec6834262 100644
index 5b115b64065c..27e2d090a2b0 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
@@ -91,6 +91,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
@ -303,7 +303,7 @@ index f424728b9679..319ec6834262 100644
protected:
// Overridden from DesktopWindowTreeHost:
void Init(const Widget::InitParams& params) override;
@@ -314,6 +320,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
@@ -315,6 +321,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
// The bounds of |xwindow_|.
gfx::Rect bounds_in_pixels_;
@ -313,7 +313,7 @@ index f424728b9679..319ec6834262 100644
// Whenever the bounds are set, we keep the previous set of bounds around so
// we can have a better chance of getting the real
// |restored_bounds_in_pixels_|. Window managers tend to send a Configure
@@ -354,6 +363,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
@@ -355,6 +364,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
// Whether we used an ARGB visual for our window.
bool use_argb_visual_;
@ -324,7 +324,7 @@ index f424728b9679..319ec6834262 100644
DesktopDragDropClientAuraX11* drag_drop_client_;
std::unique_ptr<ui::EventHandler> x11_non_client_event_filter_;
@@ -442,6 +455,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
@@ -443,6 +456,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
uint32_t modal_dialog_counter_;
@ -335,7 +335,7 @@ index f424728b9679..319ec6834262 100644
base::WeakPtrFactory<DesktopWindowTreeHostX11> weak_factory_;
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
index bf4b1d07f7fe..5702e031d6ce 100644
index adb90b9def4e..ae21334ae654 100644
--- ui/views/widget/widget.cc
+++ ui/views/widget/widget.cc
@@ -132,6 +132,7 @@ Widget::InitParams::InitParams(Type type)
@ -369,7 +369,7 @@ index bf4b1d07f7fe..5702e031d6ce 100644
}
// This must come after SetContentsView() or it might not be able to find
// the correct NativeTheme (on Linux). See http://crbug.com/384492
@@ -1097,10 +1103,16 @@ void Widget::OnNativeWidgetDestroyed() {
@@ -1103,10 +1109,16 @@ void Widget::OnNativeWidgetDestroyed() {
}
gfx::Size Widget::GetMinimumSize() const {
@ -387,7 +387,7 @@ index bf4b1d07f7fe..5702e031d6ce 100644
}
diff --git ui/views/widget/widget.h ui/views/widget/widget.h
index bc3b94fa4f3b..e80f9674ccac 100644
index 461097ab814e..7c199a5ed30c 100644
--- ui/views/widget/widget.h
+++ ui/views/widget/widget.h
@@ -252,6 +252,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,

View File

@ -1,8 +1,8 @@
diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc
index c586ac23d506..608e99a2eeab 100644
index cf6b608b2918..e4bbfca9c1a3 100644
--- content/browser/web_contents/web_contents_impl.cc
+++ content/browser/web_contents/web_contents_impl.cc
@@ -1915,21 +1915,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -2006,21 +2006,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
std::string unique_name;
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
@ -45,7 +45,7 @@ index c586ac23d506..608e99a2eeab 100644
CHECK(render_view_host_delegate_view_);
CHECK(view_.get());
@@ -2605,6 +2614,15 @@ void WebContentsImpl::CreateNewWindow(
@@ -2703,6 +2712,15 @@ void WebContentsImpl::CreateNewWindow(
create_params.renderer_initiated_creation =
main_frame_route_id != MSG_ROUTING_NONE;
@ -61,7 +61,7 @@ index c586ac23d506..608e99a2eeab 100644
std::unique_ptr<WebContents> new_contents;
if (!is_guest) {
create_params.context = view_->GetNativeView();
@@ -2635,7 +2653,7 @@ void WebContentsImpl::CreateNewWindow(
@@ -2733,7 +2751,7 @@ void WebContentsImpl::CreateNewWindow(
// TODO(brettw): It seems bogus that we have to call this function on the
// newly created object and give it one of its own member variables.
new_view->CreateViewForWidget(
@ -70,7 +70,7 @@ index c586ac23d506..608e99a2eeab 100644
}
// Save the created window associated with the route so we can show it
// later.
@@ -5951,7 +5969,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() {
@@ -6063,7 +6081,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() {
void WebContentsImpl::CreateRenderWidgetHostViewForRenderManager(
RenderViewHost* render_view_host) {
RenderWidgetHostViewBase* rwh_view =
@ -95,10 +95,10 @@ index df508da0aef2..f6f4bf42b108 100644
WebContents::CreateParams::CreateParams(const CreateParams& other) = default;
diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h
index edd94aab382e..9343feb8c3c4 100644
index d6945dc2f810..51564cbc9b2a 100644
--- content/public/browser/web_contents.h
+++ content/public/browser/web_contents.h
@@ -75,9 +75,11 @@ class BrowserPluginGuestDelegate;
@@ -76,9 +76,11 @@ class BrowserPluginGuestDelegate;
class InterstitialPage;
class RenderFrameHost;
class RenderViewHost;
@ -110,19 +110,19 @@ index edd94aab382e..9343feb8c3c4 100644
struct CustomContextMenuContext;
struct DropData;
struct MHTMLGenerationParams;
@@ -216,6 +218,10 @@ class WebContents : public PageNavigator,
@@ -218,6 +220,10 @@ class WebContents : public PageNavigator,
// Sandboxing flags set on the new WebContents.
blink::WebSandboxFlags starting_sandbox_flags;
+
+ // Optionally specify the view and delegate view.
+ content::WebContentsView* view;
+ content::RenderViewHostDelegateView* delegate_view;
};
// Creates a new WebContents.
+
// Value used to set the last time the WebContents was made active, this is
// the value that'll be returned by GetLastActiveTime(). If this is left
// default initialized then the value is not passed on to the WebContents
diff --git content/public/browser/web_contents_delegate.h content/public/browser/web_contents_delegate.h
index 414e3423091d..062f5d0167e8 100644
index fd745277f942..27d5fa9c7b41 100644
--- content/public/browser/web_contents_delegate.h
+++ content/public/browser/web_contents_delegate.h
@@ -47,10 +47,12 @@ class ColorChooser;

View File

@ -1,16 +1,19 @@
diff --git third_party/blink/public/mojom/plugins/plugin_registry.mojom third_party/blink/public/mojom/plugins/plugin_registry.mojom
index 92e9cb865204..4628c56882b4 100644
--- third_party/blink/public/mojom/plugins/plugin_registry.mojom
+++ third_party/blink/public/mojom/plugins/plugin_registry.mojom
@@ -34,5 +34,5 @@ interface PluginRegistry {
//
// TODO(crbug.com/850278): We shouldn't rely on the renderer to tell us the main frame origin.
[Sync]
- GetPlugins(bool refresh, url.mojom.Origin main_frame_origin) => (array<PluginInfo> plugins);
+ GetPlugins(bool refresh, bool is_main_frame, url.mojom.Origin main_frame_origin) => (array<PluginInfo> plugins);
};
diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h
index 1607d2617d3e..476a5147ab84 100644
index 26025241357b..c6709eb782f4 100644
--- third_party/blink/public/platform/platform.h
+++ third_party/blink/public/platform/platform.h
@@ -374,6 +374,7 @@ class BLINK_PLATFORM_EXPORT Platform {
// satisfy this call. mainFrameOrigin is used by the browser process to
// filter plugins from the plugin list based on content settings.
virtual void GetPluginList(bool refresh,
+ bool is_main_frame,
const WebSecurityOrigin& main_frame_origin,
WebPluginListBuilder*) {}
@@ -718,6 +719,11 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -702,6 +702,11 @@ class BLINK_PLATFORM_EXPORT Platform {
// runs during Chromium's build step).
virtual bool IsTakingV8ContextSnapshot() { return false; }
@ -62,7 +65,7 @@ index c3d5777b9fab..a1388f5afe0d 100644
void WebDevToolsAgentImpl::Session::SendProtocolResponse(int session_id,
diff --git third_party/blink/renderer/core/frame/local_frame.cc third_party/blink/renderer/core/frame/local_frame.cc
index ccc77a631977..74923148f3e2 100644
index 718e6e16c913..4eb63f8bc124 100644
--- third_party/blink/renderer/core/frame/local_frame.cc
+++ third_party/blink/renderer/core/frame/local_frame.cc
@@ -1242,7 +1242,7 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() {
@ -75,10 +78,10 @@ index ccc77a631977..74923148f3e2 100644
}
diff --git third_party/blink/renderer/core/page/page.cc third_party/blink/renderer/core/page/page.cc
index a7a90df7f73a..f890d1a61626 100644
index d8d4e93ed565..b418f3bc9362 100644
--- third_party/blink/renderer/core/page/page.cc
+++ third_party/blink/renderer/core/page/page.cc
@@ -158,7 +158,8 @@ Page::Page(PageClients& page_clients)
@@ -160,7 +160,8 @@ Page::Page(PageClients& page_clients)
overscroll_controller_(
OverscrollController::Create(GetVisualViewport(), GetChromeClient())),
main_frame_(nullptr),
@ -88,7 +91,7 @@ index a7a90df7f73a..f890d1a61626 100644
use_counter_(page_clients.chrome_client &&
page_clients.chrome_client->IsSVGImageChromeClient()
? UseCounter::kSVGImageContext
@@ -323,21 +324,40 @@ void Page::InitialStyleChanged() {
@@ -325,21 +326,40 @@ void Page::InitialStyleChanged() {
}
}
@ -138,7 +141,7 @@ index a7a90df7f73a..f890d1a61626 100644
page->NotifyPluginsChanged();
}
}
@@ -711,7 +731,8 @@ void Page::Trace(blink::Visitor* visitor) {
@@ -713,7 +733,8 @@ void Page::Trace(blink::Visitor* visitor) {
visitor->Trace(visual_viewport_);
visitor->Trace(overscroll_controller_);
visitor->Trace(main_frame_);
@ -149,7 +152,7 @@ index a7a90df7f73a..f890d1a61626 100644
visitor->Trace(use_counter_);
visitor->Trace(plugins_changed_observers_);
diff --git third_party/blink/renderer/core/page/page.h third_party/blink/renderer/core/page/page.h
index 68ea2ac5efd4..8661fa0ebe1c 100644
index 5adaf6dd7a51..fb698931f154 100644
--- third_party/blink/renderer/core/page/page.h
+++ third_party/blink/renderer/core/page/page.h
@@ -138,7 +138,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized<Page>,
@ -173,15 +176,16 @@ index 68ea2ac5efd4..8661fa0ebe1c 100644
Member<ValidationMessageClient> validation_message_client_;
diff --git third_party/blink/renderer/platform/plugins/plugin_data.cc third_party/blink/renderer/platform/plugins/plugin_data.cc
index a06a41fda418..b786f8cafe2c 100644
index 0ae2fafa2498..1ed863662584 100644
--- third_party/blink/renderer/platform/plugins/plugin_data.cc
+++ third_party/blink/renderer/platform/plugins/plugin_data.cc
@@ -84,15 +84,16 @@ void PluginData::Trace(blink::Visitor* visitor) {
void PluginData::RefreshBrowserSidePluginCache() {
PluginListBuilder builder(nullptr);
Platform::Current()->GetPluginList(
- true, WebSecurityOrigin::CreateUniqueOpaque(), &builder);
+ true, true, WebSecurityOrigin::CreateUniqueOpaque(), &builder);
@@ -88,10 +88,12 @@ void PluginData::RefreshBrowserSidePluginCache() {
Platform::Current()->GetInterfaceProvider()->GetInterface(
mojo::MakeRequest(&registry));
Vector<mojom::blink::PluginInfoPtr> plugins;
- registry->GetPlugins(true, SecurityOrigin::CreateUniqueOpaque(), &plugins);
+ registry->GetPlugins(true, true, SecurityOrigin::CreateUniqueOpaque(),
+ &plugins);
}
-void PluginData::UpdatePluginList(const SecurityOrigin* main_frame_origin) {
@ -189,13 +193,16 @@ index a06a41fda418..b786f8cafe2c 100644
+ const SecurityOrigin* main_frame_origin) {
ResetPluginData();
main_frame_origin_ = main_frame_origin;
PluginListBuilder builder(&plugins_);
Platform::Current()->GetPluginList(
- false, WebSecurityOrigin(main_frame_origin_), &builder);
+ false, is_main_frame, WebSecurityOrigin(main_frame_origin_), &builder);
for (PluginInfo* plugin_info : plugins_) {
for (MimeClassInfo* mime_class_info : plugin_info->mimes_)
@@ -99,7 +101,7 @@ void PluginData::UpdatePluginList(const SecurityOrigin* main_frame_origin) {
Platform::Current()->GetInterfaceProvider()->GetInterface(
mojo::MakeRequest(&registry));
Vector<mojom::blink::PluginInfoPtr> plugins;
- registry->GetPlugins(false, main_frame_origin_, &plugins);
+ registry->GetPlugins(false, is_main_frame, main_frame_origin_, &plugins);
for (const auto& plugin : plugins) {
auto* plugin_info =
new PluginInfo(plugin->name, FilePathToWebString(plugin->filename),
diff --git third_party/blink/renderer/platform/plugins/plugin_data.h third_party/blink/renderer/platform/plugins/plugin_data.h
index f1a78d3e0d5f..f6403f5ac018 100644
--- third_party/blink/renderer/platform/plugins/plugin_data.h

View File

@ -1,8 +1,8 @@
diff --git third_party/blink/public/web/web_view.h third_party/blink/public/web/web_view.h
index bf85495790f5..83d0f5eadf43 100644
index f4cbe0e0e245..eaabea055764 100644
--- third_party/blink/public/web/web_view.h
+++ third_party/blink/public/web/web_view.h
@@ -358,6 +358,7 @@ class WebView : protected WebWidget {
@@ -352,6 +352,7 @@ class WebView : protected WebWidget {
// Sets whether select popup menus should be rendered by the browser.
BLINK_EXPORT static void SetUseExternalPopupMenus(bool);
@ -10,7 +10,7 @@ index bf85495790f5..83d0f5eadf43 100644
// Hides any popup (suggestions, selects...) that might be showing.
virtual void HidePopups() = 0;
@@ -388,6 +389,8 @@ class WebView : protected WebWidget {
@@ -382,6 +383,8 @@ class WebView : protected WebWidget {
unsigned inactive_background_color,
unsigned inactive_foreground_color) = 0;
@ -20,10 +20,10 @@ index bf85495790f5..83d0f5eadf43 100644
// Call these methods before and after running a nested, modal event loop
diff --git third_party/blink/renderer/core/exported/web_view_impl.cc third_party/blink/renderer/core/exported/web_view_impl.cc
index 066b937a6700..290596dceb21 100644
index 60a3df6ea8c1..f513909e9993 100644
--- third_party/blink/renderer/core/exported/web_view_impl.cc
+++ third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -246,8 +246,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
@@ -244,8 +244,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
g_should_use_external_popup_menus = use_external_popup_menus;
}
@ -39,7 +39,7 @@ index 066b937a6700..290596dceb21 100644
}
namespace {
@@ -338,6 +343,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client,
@@ -336,6 +341,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client,
enable_fake_page_scale_animation_for_testing_(false),
fake_page_scale_animation_page_scale_factor_(0),
fake_page_scale_animation_use_anchor_(false),
@ -48,7 +48,7 @@ index 066b937a6700..290596dceb21 100644
suppress_next_keypress_event_(false),
ime_accept_events_(true),
diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h
index 3a9f0243cbee..1b402bd2b79f 100644
index b2cd387e5d32..406a9d2119b6 100644
--- third_party/blink/renderer/core/exported/web_view_impl.h
+++ third_party/blink/renderer/core/exported/web_view_impl.h
@@ -105,7 +105,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@ -61,7 +61,7 @@ index 3a9f0243cbee..1b402bd2b79f 100644
// WebWidget methods:
void Close() override;
@@ -250,7 +251,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -248,7 +249,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
HitTestResult CoreHitTestResultAt(const WebPoint&);
void InvalidateRect(const IntRect&);
@ -80,10 +80,10 @@ index 3a9f0243cbee..1b402bd2b79f 100644
TransformationMatrix device_emulation_transform_;
diff --git third_party/blink/renderer/core/page/chrome_client_impl.cc third_party/blink/renderer/core/page/chrome_client_impl.cc
index d1d042242009..d2a78831921c 100644
index b46bc592ebfb..b7a95ed26456 100644
--- third_party/blink/renderer/core/page/chrome_client_impl.cc
+++ third_party/blink/renderer/core/page/chrome_client_impl.cc
@@ -774,7 +774,7 @@ bool ChromeClientImpl::HasOpenedPopup() const {
@@ -779,7 +779,7 @@ bool ChromeClientImpl::HasOpenedPopup() const {
PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
HTMLSelectElement& select) {
NotifyPopupOpeningObservers();

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc
index f68368e79f85..654b7b9312e6 100644
index 91bd4c2aeae2..129d92a32c50 100644
--- chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc
+++ chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc
@@ -18,6 +18,7 @@
@ -10,7 +10,7 @@ index f68368e79f85..654b7b9312e6 100644
#include "chrome/common/pref_names.h"
#include "components/browser_sync/profile_sync_service.h"
#include "components/prefs/pref_service.h"
@@ -225,6 +226,10 @@ void ChromeInternalLogSource::Fetch(SysLogsSourceCallback callback) {
@@ -224,6 +225,10 @@ void ChromeInternalLogSource::Fetch(SysLogsSourceCallback callback) {
}
void ChromeInternalLogSource::PopulateSyncLogs(SystemLogsResponse* response) {
@ -21,7 +21,7 @@ index f68368e79f85..654b7b9312e6 100644
// We are only interested in sync logs for the primary user profile.
Profile* profile = ProfileManager::GetPrimaryUserProfile();
if (!profile ||
@@ -269,6 +274,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs(
@@ -268,6 +273,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs(
if (!profile)
return;
@ -60,7 +60,7 @@ index 6dd7385d105f..1b8635f7569f 100644
render_process_host->GetBrowserContext();
extensions::ExtensionRegistry* extension_registry =
diff --git chrome/browser/ui/webui/net_internals/net_internals_ui.cc chrome/browser/ui/webui/net_internals/net_internals_ui.cc
index 230edefeca1d..c60e20a28dc9 100644
index 34960e3e6543..bffb63938274 100644
--- chrome/browser/ui/webui/net_internals/net_internals_ui.cc
+++ chrome/browser/ui/webui/net_internals/net_internals_ui.cc
@@ -529,41 +529,31 @@ void NetInternalsMessageHandler::OnClearBrowserCache(

View File

@ -1,8 +1,8 @@
diff --git chrome/app/generated_resources.grd chrome/app/generated_resources.grd
index d732faf1ef16..67befd96e1b9 100644
index 9f5a70d0c553..2b4e583c30ca 100644
--- chrome/app/generated_resources.grd
+++ chrome/app/generated_resources.grd
@@ -4595,7 +4595,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
@@ -4474,7 +4474,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
</message>
</if>
<message name="IDS_PLUGIN_BLOCKED_BY_POLICY" desc="The placeholder text for a plugin blocked by enterprise policy.">