Update to Chromium version 95.0.4638.0 (#920003)

Known issues:
- Windows ARM64 builds are currently failing due to
  https://crbug.com/1242884#c31
This commit is contained in:
Marshall Greenblatt 2021-09-20 12:06:23 +03:00
parent 0a10fd4506
commit 5782fdca16
88 changed files with 597 additions and 645 deletions

View File

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

View File

@ -356,6 +356,11 @@ storage::SpecialStoragePolicy* AlloyBrowserContext::GetSpecialStoragePolicy() {
return nullptr;
}
content::PlatformNotificationService*
AlloyBrowserContext::GetPlatformNotificationService() {
return nullptr;
}
content::PushMessagingService* AlloyBrowserContext::GetPushMessagingService() {
return nullptr;
}

View File

@ -67,6 +67,8 @@ class AlloyBrowserContext : public ChromeProfileAlloy,
content::DownloadManagerDelegate* GetDownloadManagerDelegate() override;
content::BrowserPluginGuestManager* GetGuestManager() override;
storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override;
content::PlatformNotificationService* GetPlatformNotificationService()
override;
content::PushMessagingService* GetPushMessagingService() override;
content::StorageNotificationService* GetStorageNotificationService() override;
content::SSLHostStateDelegate* GetSSLHostStateDelegate() override;

View File

@ -118,12 +118,14 @@
#include "mojo/public/cpp/bindings/self_owned_associated_receiver.h"
#include "net/base/auth.h"
#include "net/ssl/ssl_cert_request_info.h"
#include "net/ssl/ssl_private_key.h"
#include "ppapi/host/ppapi_host.h"
#include "sandbox/policy/switches.h"
#include "services/network/public/cpp/network_switches.h"
#include "services/proxy_resolver/public/mojom/proxy_resolver.mojom.h"
#include "services/service_manager/public/mojom/connector.mojom.h"
#include "storage/browser/quota/quota_settings.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
#include "third_party/blink/public/common/web_preferences/web_preferences.h"
#include "third_party/blink/public/mojom/prerender/prerender.mojom.h"
#include "third_party/blink/public/web/web_window_features.h"
@ -1357,6 +1359,10 @@ std::string AlloyContentBrowserClient::GetUserAgent() {
return embedder_support::GetUserAgent();
}
std::string AlloyContentBrowserClient::GetReducedUserAgent() {
return embedder_support::GetReducedUserAgent();
}
blink::UserAgentMetadata AlloyContentBrowserClient::GetUserAgentMetadata() {
blink::UserAgentMetadata metadata;
@ -1385,7 +1391,7 @@ AlloyContentBrowserClient::GetPluginMimeTypesWithExternalHandlers(
bool AlloyContentBrowserClient::ArePersistentMediaDeviceIDsAllowed(
content::BrowserContext* browser_context,
const GURL& url,
const GURL& site_for_cookies,
const net::SiteForCookies& site_for_cookies,
const absl::optional<url::Origin>& top_frame_origin) {
// Persistent MediaDevice IDs are allowed if cookies are allowed.
return CookieSettingsFactory::GetForProfile(

View File

@ -208,13 +208,14 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
std::string GetProduct() override;
std::string GetChromeProduct() override;
std::string GetUserAgent() override;
std::string GetReducedUserAgent() override;
blink::UserAgentMetadata GetUserAgentMetadata() override;
base::flat_set<std::string> GetPluginMimeTypesWithExternalHandlers(
content::BrowserContext* browser_context) override;
bool ArePersistentMediaDeviceIDsAllowed(
content::BrowserContext* browser_context,
const GURL& scope,
const GURL& site_for_cookies,
const net::SiteForCookies& site_for_cookies,
const absl::optional<url::Origin>& top_frame_origin) override;
bool ShouldAllowPluginCreation(
const url::Origin& embedder_origin,

View File

@ -396,3 +396,9 @@ ChromeBrowserProcessAlloy::serial_policy_allowed_ports() {
NOTREACHED();
return nullptr;
}
breadcrumbs::BreadcrumbPersistentStorageManager*
ChromeBrowserProcessAlloy::GetBreadcrumbPersistentStorageManager() {
NOTREACHED();
return nullptr;
}

View File

@ -99,6 +99,8 @@ class ChromeBrowserProcessAlloy : public BrowserProcess {
override;
BuildState* GetBuildState() override;
SerialPolicyAllowedPorts* serial_policy_allowed_ports() override;
breadcrumbs::BreadcrumbPersistentStorageManager*
GetBreadcrumbPersistentStorageManager() override;
private:
bool initialized_;

View File

@ -171,7 +171,7 @@ void ChromeProfileAlloy::SetCreationTimeForTesting(base::Time creation_time) {
NOTREACHED();
}
void ChromeProfileAlloy::RecordMainFrameNavigation() {
void ChromeProfileAlloy::RecordPrimaryMainFrameNavigation() {
NOTREACHED();
}

View File

@ -48,7 +48,7 @@ class ChromeProfileAlloy : public Profile {
ExitType GetLastSessionExitType() const override;
base::Time GetCreationTime() const override;
void SetCreationTimeForTesting(base::Time creation_time) override;
void RecordMainFrameNavigation() override;
void RecordPrimaryMainFrameNavigation() override;
bool IsSignedIn() override;
private:

View File

@ -8,9 +8,11 @@
#include <stddef.h>
#include <limits>
#include <utility>
#include "content/public/browser/browser_thread.h"
#include "extensions/browser/api/storage/backend_task_runner.h"
#include "extensions/browser/api/storage/value_store_util.h"
#include "extensions/browser/api/storage/weak_unlimited_settings_storage.h"
#include "extensions/browser/value_store/value_store_factory.h"
#include "extensions/common/api/storage.h"
@ -37,8 +39,8 @@ SettingsStorageQuotaEnforcer::Limits GetLocalQuotaLimits() {
} // namespace
SyncValueStoreCache::SyncValueStoreCache(
const scoped_refptr<ValueStoreFactory>& factory)
: storage_factory_(factory), quota_(GetLocalQuotaLimits()) {
scoped_refptr<value_store::ValueStoreFactory> factory)
: storage_factory_(std::move(factory)), quota_(GetLocalQuotaLimits()) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
}
@ -51,7 +53,7 @@ void SyncValueStoreCache::RunWithValueStoreForExtension(
scoped_refptr<const Extension> extension) {
DCHECK(IsOnBackendSequence());
ValueStore* storage = GetStorage(extension.get());
value_store::ValueStore* storage = GetStorage(extension.get());
// A neat way to implement unlimited storage; if the extension has the
// unlimited storage permission, force through all calls to Set().
@ -67,29 +69,34 @@ void SyncValueStoreCache::RunWithValueStoreForExtension(
void SyncValueStoreCache::DeleteStorageSoon(const std::string& extension_id) {
DCHECK(IsOnBackendSequence());
storage_map_.erase(extension_id);
storage_factory_->DeleteSettings(settings_namespace::SYNC,
ValueStoreFactory::ModelType::APP,
extension_id);
storage_factory_->DeleteSettings(settings_namespace::SYNC,
ValueStoreFactory::ModelType::EXTENSION,
extension_id);
value_store_util::DeleteValueStore(settings_namespace::SYNC,
value_store_util::ModelType::APP,
extension_id, storage_factory_);
value_store_util::DeleteValueStore(settings_namespace::SYNC,
value_store_util::ModelType::EXTENSION,
extension_id, storage_factory_);
}
ValueStore* SyncValueStoreCache::GetStorage(const Extension* extension) {
StorageMap::iterator iter = storage_map_.find(extension->id());
value_store::ValueStore* SyncValueStoreCache::GetStorage(
const Extension* extension) {
auto iter = storage_map_.find(extension->id());
if (iter != storage_map_.end())
return iter->second.get();
ValueStoreFactory::ModelType model_type =
extension->is_app() ? ValueStoreFactory::ModelType::APP
: ValueStoreFactory::ModelType::EXTENSION;
std::unique_ptr<ValueStore> store = storage_factory_->CreateSettingsStore(
settings_namespace::SYNC, model_type, extension->id());
value_store_util::ModelType model_type =
extension->is_app() ? value_store_util::ModelType::APP
: value_store_util::ModelType::EXTENSION;
std::unique_ptr<value_store::ValueStore> store =
value_store_util::CreateSettingsStore(settings_namespace::LOCAL,
model_type, extension->id(),
storage_factory_);
std::unique_ptr<SettingsStorageQuotaEnforcer> storage(
new SettingsStorageQuotaEnforcer(quota_, std::move(store)));
DCHECK(storage.get());
ValueStore* storage_ptr = storage.get();
value_store::ValueStore* storage_ptr = storage.get();
storage_map_[extension->id()] = std::move(storage);
return storage_ptr;
}

View File

@ -14,10 +14,11 @@
#include "extensions/browser/api/storage/settings_storage_quota_enforcer.h"
#include "extensions/browser/api/storage/value_store_cache.h"
namespace extensions {
namespace value_store {
class ValueStoreFactory;
}
namespace extensions {
namespace cef {
// Based on LocalValueStoreCache
@ -25,7 +26,8 @@ namespace cef {
// another for extensions. Each backend takes care of persistence.
class SyncValueStoreCache : public ValueStoreCache {
public:
explicit SyncValueStoreCache(const scoped_refptr<ValueStoreFactory>& factory);
explicit SyncValueStoreCache(
scoped_refptr<value_store::ValueStoreFactory> factory);
~SyncValueStoreCache() override;
// ValueStoreCache implementation:
@ -35,12 +37,13 @@ class SyncValueStoreCache : public ValueStoreCache {
void DeleteStorageSoon(const std::string& extension_id) override;
private:
using StorageMap = std::map<std::string, std::unique_ptr<ValueStore>>;
using StorageMap =
std::map<std::string, std::unique_ptr<value_store::ValueStore>>;
ValueStore* GetStorage(const Extension* extension);
value_store::ValueStore* GetStorage(const Extension* extension);
// The Factory to use for creating new ValueStores.
const scoped_refptr<ValueStoreFactory> storage_factory_;
const scoped_refptr<value_store::ValueStoreFactory> storage_factory_;
// Quota limits (see SettingsStorageQuotaEnforcer).
const SettingsStorageQuotaEnforcer::Limits quota_;
@ -50,6 +53,7 @@ class SyncValueStoreCache : public ValueStoreCache {
DISALLOW_COPY_AND_ASSIGN(SyncValueStoreCache);
};
} // namespace cef
} // namespace extensions

View File

@ -78,7 +78,7 @@ TabsCreateFunction::TabsCreateFunction() : cef_details_(this) {}
ExtensionFunction::ResponseAction TabsCreateFunction::Run() {
std::unique_ptr<tabs::Create::Params> params(
tabs::Create::Params::Create(*args_));
tabs::Create::Params::Create(args()));
EXTENSION_FUNCTION_VALIDATE(params.get());
CefExtensionFunctionDetails::OpenTabParams options;
@ -119,7 +119,7 @@ content::WebContents* BaseAPIFunction::GetWebContents(int tab_id) {
ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
std::unique_ptr<tabs::Update::Params> params(
tabs::Update::Params::Create(*args_));
tabs::Update::Params::Create(args()));
EXTENSION_FUNCTION_VALIDATE(params.get());
tab_id_ = params->tab_id ? *params->tab_id : -1;
@ -256,11 +256,10 @@ ExecuteCodeFunction::InitResult ExecuteCodeInTabFunction::Init() {
if (init_result_)
return init_result_.value();
const auto list_view = args_->GetList();
if (list_view.size() < 2)
if (args().size() < 2)
return set_init_result(VALIDATION_FAILURE);
const auto& tab_id_value = list_view[0];
const auto& tab_id_value = args()[0];
// |tab_id| is optional so it's ok if it's not there.
int tab_id = -1;
if (tab_id_value.is_int()) {
@ -272,7 +271,7 @@ ExecuteCodeFunction::InitResult ExecuteCodeInTabFunction::Init() {
}
// |details| are not optional.
const base::Value& details_value = list_view[1];
const base::Value& details_value = args()[1];
if (!details_value.is_dict())
return set_init_result(VALIDATION_FAILURE);
std::unique_ptr<InjectDetails> details(new InjectDetails());
@ -414,7 +413,7 @@ bool TabsRemoveCSSFunction::ShouldRemoveCSS() const {
ExtensionFunction::ResponseAction TabsSetZoomFunction::Run() {
std::unique_ptr<tabs::SetZoom::Params> params(
tabs::SetZoom::Params::Create(*args_));
tabs::SetZoom::Params::Create(args()));
EXTENSION_FUNCTION_VALIDATE(params);
int tab_id = params->tab_id ? *params->tab_id : -1;
@ -444,7 +443,7 @@ ExtensionFunction::ResponseAction TabsSetZoomFunction::Run() {
ExtensionFunction::ResponseAction TabsGetZoomFunction::Run() {
std::unique_ptr<tabs::GetZoom::Params> params(
tabs::GetZoom::Params::Create(*args_));
tabs::GetZoom::Params::Create(args()));
EXTENSION_FUNCTION_VALIDATE(params);
int tab_id = params->tab_id ? *params->tab_id : -1;
@ -463,7 +462,7 @@ ExtensionFunction::ResponseAction TabsSetZoomSettingsFunction::Run() {
using api::tabs::ZoomSettings;
std::unique_ptr<tabs::SetZoomSettings::Params> params(
tabs::SetZoomSettings::Params::Create(*args_));
tabs::SetZoomSettings::Params::Create(args()));
EXTENSION_FUNCTION_VALIDATE(params);
int tab_id = params->tab_id ? *params->tab_id : -1;
@ -512,7 +511,7 @@ ExtensionFunction::ResponseAction TabsSetZoomSettingsFunction::Run() {
ExtensionFunction::ResponseAction TabsGetZoomSettingsFunction::Run() {
std::unique_ptr<tabs::GetZoomSettings::Params> params(
tabs::GetZoomSettings::Params::Create(*args_));
tabs::GetZoomSettings::Params::Create(args()));
EXTENSION_FUNCTION_VALIDATE(params);
int tab_id = params->tab_id ? *params->tab_id : -1;

View File

@ -420,7 +420,8 @@ StateStore* CefExtensionSystem::rules_store() {
return rules_store_.get();
}
scoped_refptr<ValueStoreFactory> CefExtensionSystem::store_factory() {
scoped_refptr<value_store::ValueStoreFactory>
CefExtensionSystem::store_factory() {
return store_factory_;
}
@ -518,18 +519,19 @@ CefExtensionSystem::ComponentExtensionInfo::ComponentExtensionInfo(
}
void CefExtensionSystem::InitPrefs() {
store_factory_ = new CefValueStoreFactory(browser_context_->GetPath());
store_factory_ =
new value_store::CefValueStoreFactory(browser_context_->GetPath());
Profile* profile = Profile::FromBrowserContext(browser_context_);
// Two state stores. The latter, which contains declarative rules, must be
// loaded immediately so that the rules are ready before we issue network
// requests.
state_store_.reset(new StateStore(
profile, store_factory_, ValueStoreFrontend::BackendType::STATE, true));
state_store_ = std::make_unique<StateStore>(
profile, store_factory_, StateStore::BackendType::STATE, true);
rules_store_.reset(new StateStore(
profile, store_factory_, ValueStoreFrontend::BackendType::RULES, false));
rules_store_ = std::make_unique<StateStore>(
profile, store_factory_, StateStore::BackendType::RULES, false);
}
// Implementation based on ComponentLoader::CreateExtension.

View File

@ -90,7 +90,7 @@ class CefExtensionSystem : public ExtensionSystem {
UserScriptManager* user_script_manager() override;
StateStore* state_store() override;
StateStore* rules_store() override;
scoped_refptr<ValueStoreFactory> store_factory() override;
scoped_refptr<value_store::ValueStoreFactory> store_factory() override;
InfoMap* info_map() override;
QuotaService* quota_service() override;
AppSorting* app_sorting() override;
@ -176,7 +176,7 @@ class CefExtensionSystem : public ExtensionSystem {
std::unique_ptr<StateStore> state_store_;
std::unique_ptr<StateStore> rules_store_;
scoped_refptr<ValueStoreFactory> store_factory_;
scoped_refptr<value_store::ValueStoreFactory> store_factory_;
// Signaled when the extension system has completed its startup tasks.
base::OneShotEvent ready_;

View File

@ -65,7 +65,7 @@ void CefExtensionsAPIClient::AttachWebContentsHelpers(
void CefExtensionsAPIClient::AddAdditionalValueStoreCaches(
content::BrowserContext* context,
const scoped_refptr<ValueStoreFactory>& factory,
const scoped_refptr<value_store::ValueStoreFactory>& factory,
const scoped_refptr<base::ObserverListThreadSafe<SettingsObserver>>&
observers,
std::map<settings_namespace::Namespace, ValueStoreCache*>* caches) {

View File

@ -7,6 +7,7 @@
#define CEF_LIBCEF_BROWSER_EXTENSIONS_EXTENSIONS_API_CLIENT_H_
#include "extensions/browser/api/extensions_api_client.h"
#include "extensions/browser/value_store/value_store_factory.h"
namespace extensions {
@ -31,7 +32,7 @@ class CefExtensionsAPIClient : public ExtensionsAPIClient {
// to |caches|. By default adds nothing.
void AddAdditionalValueStoreCaches(
content::BrowserContext* context,
const scoped_refptr<ValueStoreFactory>& factory,
const scoped_refptr<value_store::ValueStoreFactory>& factory,
const scoped_refptr<base::ObserverListThreadSafe<SettingsObserver>>&
observers,
std::map<settings_namespace::Namespace, ValueStoreCache*>* caches)

View File

@ -5,12 +5,14 @@
#include "libcef/browser/extensions/value_store/cef_value_store.h"
#include <memory>
#include <ostream>
#include <utility>
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/notreached.h"
namespace value_store {
namespace {
const char kGenericErrorMessage[] = "CefValueStore configured to error";
@ -23,9 +25,8 @@ ValueStore::Status CreateStatusCopy(const ValueStore::Status& status) {
} // namespace
CefValueStore::CefValueStore() : read_count_(0), write_count_(0) {}
CefValueStore::~CefValueStore() {}
CefValueStore::CefValueStore() = default;
CefValueStore::~CefValueStore() = default;
void CefValueStore::set_status_code(StatusCode status_code) {
status_ = ValueStore::Status(status_code, kGenericErrorMessage);
@ -33,19 +34,19 @@ void CefValueStore::set_status_code(StatusCode status_code) {
size_t CefValueStore::GetBytesInUse(const std::string& key) {
// Let SettingsStorageQuotaEnforcer implement this.
NOTREACHED();
NOTREACHED() << "Not implemented";
return 0;
}
size_t CefValueStore::GetBytesInUse(const std::vector<std::string>& keys) {
// Let SettingsStorageQuotaEnforcer implement this.
NOTREACHED();
NOTREACHED() << "Not implemented";
return 0;
}
size_t CefValueStore::GetBytesInUse() {
// Let SettingsStorageQuotaEnforcer implement this.
NOTREACHED();
NOTREACHED() << "Not implemented";
return 0;
}
@ -80,7 +81,7 @@ ValueStore::WriteResult CefValueStore::Set(WriteOptions options,
const std::string& key,
const base::Value& value) {
base::DictionaryValue settings;
settings.SetWithoutPathExpansion(key, value.CreateDeepCopy());
settings.SetKey(key, value.Clone());
return Set(options, settings);
}
@ -134,4 +135,6 @@ ValueStore::WriteResult CefValueStore::Clear() {
keys.push_back(it.key());
}
return Remove(keys);
}
}
} // namespace value_store

View File

@ -15,25 +15,29 @@
#include "base/macros.h"
#include "extensions/browser/value_store/value_store.h"
// Implementation Based on TestingValueStore
// ValueStore with an in-memory storage but the ability to
// optionally fail all operations.
namespace value_store {
// Implementation Based on TestingValueStore.
// ValueStore with an in-memory storage but the ability to optionally fail all
// operations.
class CefValueStore : public ValueStore {
public:
CefValueStore();
~CefValueStore() override;
CefValueStore(const CefValueStore&) = delete;
CefValueStore& operator=(const CefValueStore&) = delete;
// Sets the error code for requests. If OK, errors won't be thrown.
// Defaults to OK.
void set_status_code(StatusCode status_code);
// Accessors for the number of reads/writes done by this value store. Each
// Get* operation (except for the BytesInUse ones) counts as one read, and
// each Set*/Remove/Clear operation counts as one write. This is useful in
// tests seeking to assert that some number of reads/writes to their
// underlying value store have (or have not) happened.
int read_count() const { return read_count_; }
int write_count() const { return write_count_; }
// Sets the error code for requests. If OK, errors won't be thrown.
// Defaults to OK.
void set_status_code(StatusCode status_code);
int read_count() { return read_count_; }
int write_count() { return write_count_; }
// ValueStore implementation.
size_t GetBytesInUse(const std::string& key) override;
@ -53,11 +57,11 @@ class CefValueStore : public ValueStore {
private:
base::DictionaryValue storage_;
int read_count_;
int write_count_;
int read_count_ = 0;
int write_count_ = 0;
ValueStore::Status status_;
DISALLOW_COPY_AND_ASSIGN(CefValueStore);
};
} // namespace value_store
#endif // CEF_LIBCEF_BROWSER_EXTENSIONS_VALUE_STORE_CEF_VALUE_STORE_H_

View File

@ -5,9 +5,11 @@
#include "libcef/browser/extensions/value_store/cef_value_store_factory.h"
#include "libcef/browser/extensions/value_store/cef_value_store.h"
#include "base/containers/contains.h"
#include "base/memory/ptr_util.h"
#include "extensions/browser/value_store/leveldb_value_store.h"
#include "libcef/browser/extensions/value_store/cef_value_store.h"
namespace {
@ -15,177 +17,58 @@ const char kUMAClientName[] = "Cef";
} // namespace
namespace extensions {
using SettingsNamespace = settings_namespace::Namespace;
CefValueStoreFactory::StorageHelper::StorageHelper() = default;
CefValueStoreFactory::StorageHelper::~StorageHelper() = default;
std::set<ExtensionId> CefValueStoreFactory::StorageHelper::GetKnownExtensionIDs(
ModelType model_type) const {
std::set<ExtensionId> ids;
switch (model_type) {
case ValueStoreFactory::ModelType::APP:
for (const auto& key : app_stores_)
ids.insert(key.first);
break;
case ValueStoreFactory::ModelType::EXTENSION:
for (const auto& key : extension_stores_)
ids.insert(key.first);
break;
}
return ids;
}
void CefValueStoreFactory::StorageHelper::Reset() {
app_stores_.clear();
extension_stores_.clear();
}
ValueStore* CefValueStoreFactory::StorageHelper::AddValueStore(
const ExtensionId& extension_id,
ValueStore* value_store,
ModelType model_type) {
if (model_type == ValueStoreFactory::ModelType::APP) {
DCHECK(app_stores_.find(extension_id) == app_stores_.end());
app_stores_[extension_id] = value_store;
} else {
DCHECK(extension_stores_.find(extension_id) == extension_stores_.end());
extension_stores_[extension_id] = value_store;
}
return value_store;
}
void CefValueStoreFactory::StorageHelper::DeleteSettings(
const ExtensionId& extension_id,
ModelType model_type) {
switch (model_type) {
case ValueStoreFactory::ModelType::APP:
app_stores_.erase(extension_id);
break;
case ValueStoreFactory::ModelType::EXTENSION:
extension_stores_.erase(extension_id);
break;
}
}
bool CefValueStoreFactory::StorageHelper::HasSettings(
const ExtensionId& extension_id,
ModelType model_type) const {
switch (model_type) {
case ValueStoreFactory::ModelType::APP:
return app_stores_.find(extension_id) != app_stores_.end();
case ValueStoreFactory::ModelType::EXTENSION:
return extension_stores_.find(extension_id) != extension_stores_.end();
}
NOTREACHED();
return false;
}
ValueStore* CefValueStoreFactory::StorageHelper::GetExisting(
const ExtensionId& extension_id) const {
auto it = app_stores_.find(extension_id);
if (it != app_stores_.end())
return it->second;
it = extension_stores_.find(extension_id);
if (it != extension_stores_.end())
return it->second;
return nullptr;
}
namespace value_store {
CefValueStoreFactory::CefValueStoreFactory() = default;
CefValueStoreFactory::CefValueStoreFactory(const base::FilePath& db_path)
: db_path_(db_path) {}
CefValueStoreFactory::~CefValueStoreFactory() {}
CefValueStoreFactory::~CefValueStoreFactory() = default;
std::unique_ptr<ValueStore> CefValueStoreFactory::CreateRulesStore() {
if (db_path_.empty())
last_created_store_ = new CefValueStore();
else
last_created_store_ = new LeveldbValueStore(kUMAClientName, db_path_);
return base::WrapUnique(last_created_store_);
}
std::unique_ptr<ValueStore> CefValueStoreFactory::CreateStateStore() {
return CreateRulesStore();
}
CefValueStoreFactory::StorageHelper& CefValueStoreFactory::GetStorageHelper(
SettingsNamespace settings_namespace) {
switch (settings_namespace) {
case settings_namespace::LOCAL:
return local_helper_;
case settings_namespace::SYNC:
return sync_helper_;
case settings_namespace::MANAGED:
return managed_helper_;
case settings_namespace::INVALID:
break;
}
NOTREACHED();
return local_helper_;
}
std::unique_ptr<ValueStore> CefValueStoreFactory::CreateSettingsStore(
SettingsNamespace settings_namespace,
ModelType model_type,
const ExtensionId& extension_id) {
std::unique_ptr<ValueStore> settings_store(CreateRulesStore());
// Note: This factory is purposely keeping the raw pointers to each ValueStore
// created. Tests using CefValueStoreFactory must be careful to keep
// those ValueStore's alive for the duration of their test.
GetStorageHelper(settings_namespace)
.AddValueStore(extension_id, settings_store.get(), model_type);
return settings_store;
std::unique_ptr<ValueStore> CefValueStoreFactory::CreateValueStore(
const base::FilePath& directory,
const std::string& uma_client_name) {
std::unique_ptr<ValueStore> value_store(CreateStore());
// This factory is purposely keeping the raw pointers to each ValueStore
// created. Cefs using CefValueStoreFactory must be careful to keep
// those ValueStore's alive for the duration of their test.
value_store_map_[directory] = value_store.get();
return value_store;
}
ValueStore* CefValueStoreFactory::LastCreatedStore() const {
return last_created_store_;
}
void CefValueStoreFactory::DeleteSettings(SettingsNamespace settings_namespace,
ModelType model_type,
const ExtensionId& extension_id) {
GetStorageHelper(settings_namespace).DeleteSettings(extension_id, model_type);
void CefValueStoreFactory::DeleteValueStore(const base::FilePath& directory) {
value_store_map_.erase(directory);
}
bool CefValueStoreFactory::HasSettings(SettingsNamespace settings_namespace,
ModelType model_type,
const ExtensionId& extension_id) {
return GetStorageHelper(settings_namespace)
.HasSettings(extension_id, model_type);
}
std::set<ExtensionId> CefValueStoreFactory::GetKnownExtensionIDs(
SettingsNamespace settings_namespace,
ModelType model_type) const {
return const_cast<CefValueStoreFactory*>(this)
->GetStorageHelper(settings_namespace)
.GetKnownExtensionIDs(model_type);
bool CefValueStoreFactory::HasValueStore(const base::FilePath& directory) {
return base::Contains(value_store_map_, directory);
}
ValueStore* CefValueStoreFactory::GetExisting(
const ExtensionId& extension_id) const {
ValueStore* existing_store = local_helper_.GetExisting(extension_id);
if (existing_store)
return existing_store;
existing_store = sync_helper_.GetExisting(extension_id);
if (existing_store)
return existing_store;
existing_store = managed_helper_.GetExisting(extension_id);
DCHECK(existing_store != nullptr);
return existing_store;
const base::FilePath& directory) const {
auto it = value_store_map_.find(directory);
DCHECK(it != value_store_map_.end());
return it->second;
}
void CefValueStoreFactory::Reset() {
last_created_store_ = nullptr;
local_helper_.Reset();
sync_helper_.Reset();
managed_helper_.Reset();
value_store_map_.clear();
}
} // namespace extensions
std::unique_ptr<ValueStore> CefValueStoreFactory::CreateStore() {
std::unique_ptr<ValueStore> store;
if (db_path_.empty())
store = std::make_unique<CefValueStore>();
else
store = std::make_unique<LeveldbValueStore>(kUMAClientName, db_path_);
last_created_store_ = store.get();
return store;
}
} // namespace value_store

View File

@ -8,90 +8,54 @@
#include <map>
#include <memory>
#include <set>
#include "base/files/file_path.h"
#include "extensions/browser/value_store/value_store_factory.h"
#include "extensions/common/extension_id.h"
namespace value_store {
class ValueStore;
namespace extensions {
// Will either open a database on disk (if path provided) returning a
// |LeveldbValueStore|. Otherwise a new |CefValueStore| instance will be
// returned.
// Based on TestValueStoreFactory. Will either open a database on disk (if path
// provided) returning a |LeveldbValueStore|. Otherwise a new |CefingValueStore|
// instance will be returned.
class CefValueStoreFactory : public ValueStoreFactory {
public:
CefValueStoreFactory();
explicit CefValueStoreFactory(const base::FilePath& db_path);
CefValueStoreFactory(const CefValueStoreFactory&) = delete;
CefValueStoreFactory& operator=(const CefValueStoreFactory&) = delete;
// ValueStoreFactory
std::unique_ptr<ValueStore> CreateRulesStore() override;
std::unique_ptr<ValueStore> CreateStateStore() override;
std::unique_ptr<ValueStore> CreateSettingsStore(
settings_namespace::Namespace settings_namespace,
ModelType model_type,
const ExtensionId& extension_id) override;
void DeleteSettings(settings_namespace::Namespace settings_namespace,
ModelType model_type,
const ExtensionId& extension_id) override;
bool HasSettings(settings_namespace::Namespace settings_namespace,
ModelType model_type,
const ExtensionId& extension_id) override;
std::set<ExtensionId> GetKnownExtensionIDs(
settings_namespace::Namespace settings_namespace,
ModelType model_type) const override;
std::unique_ptr<ValueStore> CreateValueStore(
const base::FilePath& directory,
const std::string& uma_client_name) override;
void DeleteValueStore(const base::FilePath& directory) override;
bool HasValueStore(const base::FilePath& directory) override;
// Return the last created |ValueStore|. Use with caution as this may return
// a dangling pointer since the creator now owns the ValueStore which can be
// deleted at any time.
ValueStore* LastCreatedStore() const;
// Return a previously created |ValueStore| for an extension.
ValueStore* GetExisting(const ExtensionId& extension_id) const;
// Return the previously created |ValueStore| in the given directory.
ValueStore* GetExisting(const base::FilePath& directory) const;
// Reset this class (as if just created).
void Reset();
private:
// Manages a collection of |ValueStore|'s created for an app/extension.
// One of these exists for each setting type.
class StorageHelper {
public:
StorageHelper();
~StorageHelper();
std::set<ExtensionId> GetKnownExtensionIDs(ModelType model_type) const;
ValueStore* AddValueStore(const ExtensionId& extension_id,
ValueStore* value_store,
ModelType model_type);
void DeleteSettings(const ExtensionId& extension_id, ModelType model_type);
bool HasSettings(const ExtensionId& extension_id,
ModelType model_type) const;
void Reset();
ValueStore* GetExisting(const ExtensionId& extension_id) const;
private:
std::map<ExtensionId, ValueStore*> app_stores_;
std::map<ExtensionId, ValueStore*> extension_stores_;
DISALLOW_COPY_AND_ASSIGN(StorageHelper);
};
StorageHelper& GetStorageHelper(
settings_namespace::Namespace settings_namespace);
~CefValueStoreFactory() override;
std::unique_ptr<ValueStore> CreateStore();
base::FilePath db_path_;
ValueStore* last_created_store_ = nullptr;
// None of these value stores are owned by this factory, so care must be
// taken when calling GetExisting.
StorageHelper local_helper_;
StorageHelper sync_helper_;
StorageHelper managed_helper_;
DISALLOW_COPY_AND_ASSIGN(CefValueStoreFactory);
// A mapping from directories to their ValueStore. None of these value
// stores are owned by this factory, so care must be taken when calling
// GetExisting.
std::map<base::FilePath, ValueStore*> value_store_map_;
};
} // namespace extensions
} // namespace value_store
#endif // CEF_LIBCEF_BROWSER_EXTENSIONS_VALUE_STORE_CEF_VALUE_STORE_FACTORY_H_

View File

@ -205,8 +205,9 @@ gfx::Point CefBrowserPlatformDelegateNativeLinux::GetScreenPoint(
const gfx::Rect& bounds_in_screen = window_x11_->GetBoundsInScreen();
return gfx::Point(bounds_in_screen.x() + view.x(),
bounds_in_screen.y() + view.y());
#endif // defined(USE_X11)
#else // !defined(USE_X11)
return gfx::Point();
#endif
}
void CefBrowserPlatformDelegateNativeLinux::ViewText(const std::string& text) {

View File

@ -357,7 +357,7 @@ bool CefBrowserPlatformDelegateNativeWin::HandleKeyboardEvent(
// Any unhandled keyboard/character messages are sent to DefWindowProc so that
// shortcut keys work correctly.
if (event.os_event) {
const MSG& msg = event.os_event->native_event();
const auto& msg = event.os_event->native_event();
return !DefWindowProc(msg.hwnd, msg.message, msg.wParam, msg.lParam);
} else {
MSG msg = {};
@ -402,7 +402,8 @@ CefEventHandle CefBrowserPlatformDelegateNativeWin::GetEventHandle(
const content::NativeWebKeyboardEvent& event) const {
if (!event.os_event)
return NULL;
return const_cast<CefEventHandle>(&event.os_event->native_event());
return ChromeToWindowsType(
const_cast<CHROME_MSG*>(&event.os_event->native_event()));
}
std::unique_ptr<CefFileDialogRunner>

View File

@ -69,7 +69,7 @@ bool CefMenuRunnerMac::RunContextMenu(
NSTimeInterval eventTime = [currentEvent timestamp];
NSEvent* clickEvent = [NSEvent mouseEventWithType:NSRightMouseDown
location:position
modifierFlags:NSRightMouseDownMask
modifierFlags:0
timestamp:eventTime
windowNumber:[window windowNumber]
context:nil

View File

@ -572,7 +572,8 @@ void CefRenderWidgetHostViewOSR::ResetFallbackToFirstNavigationSurface() {
void CefRenderWidgetHostViewOSR::InitAsPopup(
content::RenderWidgetHostView* parent_host_view,
const gfx::Rect& pos) {
const gfx::Rect& bounds,
const gfx::Rect& anchor_rect) {
DCHECK_EQ(parent_host_view_, parent_host_view);
DCHECK(browser_impl_);
@ -591,8 +592,8 @@ void CefRenderWidgetHostViewOSR::InitAsPopup(
CefRect view_rect;
handler->GetViewRect(browser_impl_.get(), view_rect);
gfx::Rect client_pos(pos.x() - view_rect.x, pos.y() - view_rect.y,
pos.width(), pos.height());
gfx::Rect client_pos(bounds.x() - view_rect.x, bounds.y() - view_rect.y,
bounds.width(), bounds.height());
popup_position_ = client_pos;

View File

@ -145,7 +145,8 @@ class CefRenderWidgetHostViewOSR
// RenderWidgetHostViewBase implementation.
void ResetFallbackToFirstNavigationSurface() override;
void InitAsPopup(content::RenderWidgetHostView* parent_host_view,
const gfx::Rect& pos) override;
const gfx::Rect& bounds,
const gfx::Rect& anchor_rect) override;
void UpdateCursor(const content::WebCursor& cursor) override;
void SetIsLoading(bool is_loading) override;
void RenderProcessGone() override;

View File

@ -143,7 +143,8 @@ void SetChromePrefs(Profile* profile, blink::web_pref::WebPreferences& web) {
// Extension preferences.
// Should match ChromeContentBrowserClientExtensionsPart::OverrideWebkitPrefs.
void SetExtensionPrefs(content::RenderViewHost* rvh,
void SetExtensionPrefs(content::WebContents* web_contents,
content::RenderViewHost* rvh,
blink::web_pref::WebPreferences& web) {
if (!extensions::ExtensionsEnabled())
return;
@ -161,7 +162,8 @@ void SetExtensionPrefs(content::RenderViewHost* rvh,
// correct scheme. Without this check, chrome-guest:// schemes used by webview
// tags as well as hosts that happen to match the id of an installed extension
// would get the wrong preferences.
const GURL& site_url = rvh->GetMainFrame()->GetSiteInstance()->GetSiteURL();
const GURL& site_url =
web_contents->GetMainFrame()->GetSiteInstance()->GetSiteURL();
if (!site_url.SchemeIs(extensions::kExtensionScheme))
return;
@ -410,11 +412,13 @@ void PopulateWebPreferences(content::RenderViewHost* rvh,
break;
}
auto web_contents = content::WebContents::FromRenderViewHost(rvh);
UpdatePreferredColorScheme(
&web, rvh->GetMainFrame()->GetSiteInstance()->GetSiteURL(), native_theme);
&web, web_contents->GetMainFrame()->GetSiteInstance()->GetSiteURL(),
native_theme);
// Set preferences based on the extension.
SetExtensionPrefs(rvh, web);
SetExtensionPrefs(web_contents, rvh, web);
if (browser) {
// Set preferences based on CefBrowserSettings.

View File

@ -55,11 +55,15 @@ bool CefSSLHostStateDelegate::DidHostRunInsecureContent(
return false;
}
void CefSSLHostStateDelegate::AllowHttpForHost(const std::string& host) {
void CefSSLHostStateDelegate::AllowHttpForHost(
const std::string& host,
content::WebContents* web_content) {
// Intentional no-op.
}
bool CefSSLHostStateDelegate::IsHttpAllowedForHost(const std::string& host) {
bool CefSSLHostStateDelegate::IsHttpAllowedForHost(
const std::string& host,
content::WebContents* web_content) {
// Intentional no-op. Return value does not matter as HTTPS-Only Mode is not
// enabled.
return false;

View File

@ -64,8 +64,10 @@ class CefSSLHostStateDelegate : public content::SSLHostStateDelegate {
bool DidHostRunInsecureContent(const std::string& host,
int child_id,
InsecureContentType content_type) override;
void AllowHttpForHost(const std::string& host) override;
bool IsHttpAllowedForHost(const std::string& host) override;
void AllowHttpForHost(const std::string& host,
content::WebContents* web_content) override;
bool IsHttpAllowedForHost(const std::string& host,
content::WebContents* web_content) override;
void RevokeUserAllowExceptions(const std::string& host) override;
bool HasAllowException(const std::string& host,
content::WebContents* web_contents) override;

View File

@ -359,7 +359,7 @@ void AlloyMainDelegate::PreSandboxStartup() {
chrome::DIR_USER_DATA);
InitializeResourceBundle();
MaybeInitializeGDI();
MaybePatchGdiGetFontData();
}
void AlloyMainDelegate::SandboxInitialized(const std::string& process_type) {
@ -512,7 +512,7 @@ void AlloyMainDelegate::InitializeResourceBundle() {
if (base::PathExists(resources_pak_file)) {
resource_bundle.AddDataPackFromPath(resources_pak_file,
ui::SCALE_FACTOR_NONE);
ui::kScaleFactorNone);
} else {
LOG(ERROR) << "Could not load resources.pak";
}
@ -520,19 +520,19 @@ void AlloyMainDelegate::InitializeResourceBundle() {
// Always load the 1x data pack first as the 2x data pack contains both 1x
// and 2x images. The 1x data pack only has 1x images, thus passes in an
// accurate scale factor to gfx::ImageSkia::AddRepresentation.
if (resource_util::IsScaleFactorSupported(ui::SCALE_FACTOR_100P)) {
if (resource_util::IsScaleFactorSupported(ui::k100Percent)) {
if (base::PathExists(chrome_100_percent_pak_file)) {
resource_bundle.AddDataPackFromPath(chrome_100_percent_pak_file,
ui::SCALE_FACTOR_100P);
ui::k100Percent);
} else {
LOG(ERROR) << "Could not load chrome_100_percent.pak";
}
}
if (resource_util::IsScaleFactorSupported(ui::SCALE_FACTOR_200P)) {
if (resource_util::IsScaleFactorSupported(ui::k200Percent)) {
if (base::PathExists(chrome_200_percent_pak_file)) {
resource_bundle.AddDataPackFromPath(chrome_200_percent_pak_file,
ui::SCALE_FACTOR_200P);
ui::k200Percent);
} else {
LOG(ERROR) << "Could not load chrome_200_percent.pak";
}

View File

@ -11,7 +11,6 @@
#include "base/containers/contains.h"
#include "content/public/common/url_constants.h"
#include "extensions/common/constants.h"
#include "net/net_buildflags.h"
#include "url/url_constants.h"
#include "url/url_util.h"
@ -56,22 +55,19 @@ void AddInternalSchemes(content::ContentClient::Schemes* schemes) {
bool IsInternalHandledScheme(const std::string& scheme) {
static const char* schemes[] = {
url::kAboutScheme,
url::kBlobScheme,
content::kChromeDevToolsScheme,
content::kChromeUIScheme,
url::kDataScheme,
extensions::kExtensionScheme,
url::kFileScheme,
url::kFileSystemScheme,
#if !BUILDFLAG(DISABLE_FTP_SUPPORT)
url::kFtpScheme,
#endif
url::kHttpScheme,
url::kHttpsScheme,
url::kJavaScriptScheme,
url::kWsScheme,
url::kWssScheme,
url::kAboutScheme,
url::kBlobScheme,
content::kChromeDevToolsScheme,
content::kChromeUIScheme,
url::kDataScheme,
extensions::kExtensionScheme,
url::kFileScheme,
url::kFileSystemScheme,
url::kHttpScheme,
url::kHttpsScheme,
url::kJavaScriptScheme,
url::kWsScheme,
url::kWssScheme,
};
for (size_t i = 0; i < sizeof(schemes) / sizeof(schemes[0]); ++i) {

View File

@ -50,7 +50,7 @@ bool CefResourceBundleDelegate::GetRawDataResource(
if (handler.get()) {
void* data = nullptr;
size_t data_size = 0;
if (scale_factor != ui::SCALE_FACTOR_NONE) {
if (scale_factor != ui::kScaleFactorNone) {
if (handler->GetDataResourceForScale(
resource_id, static_cast<cef_scale_factor_t>(scale_factor),
data, data_size)) {

View File

@ -8,7 +8,7 @@
#include "include/cef_base.h"
#include "ui/base/resource/scale_factor.h"
#include "ui/base/resource/resource_scale_factor.h"
namespace base {
class CommandLine;

View File

@ -1107,7 +1107,7 @@ CefRefPtr<CefListValue> CefListValueImpl::Copy() {
bool CefListValueImpl::SetSize(size_t size) {
CEF_VALUE_VERIFY_RETURN(true, false);
size_t current_size = const_value().GetSize();
size_t current_size = const_value().GetList().size();
if (size < current_size) {
// Clean up any values above the requested size.
for (size_t i = current_size - 1; i >= size; --i)
@ -1121,7 +1121,7 @@ bool CefListValueImpl::SetSize(size_t size) {
size_t CefListValueImpl::GetSize() {
CEF_VALUE_VERIFY_RETURN(false, 0);
return const_value().GetSize();
return const_value().GetList().size();
}
bool CefListValueImpl::Clear() {

View File

@ -30,7 +30,6 @@ class CefExtensionsRendererClient;
class Dispatcher;
class DispatcherDelegate;
class ExtensionsClient;
class ExtensionsGuestViewContainerDispatcher;
class ExtensionsRendererClient;
class ResourceRequestPolicy;
} // namespace extensions

View File

@ -12,6 +12,7 @@
#include "chrome/common/url_constants.h"
#include "chrome/renderer/extensions/extension_process_policy.h"
#include "chrome/renderer/extensions/resource_request_policy.h"
#include "components/guest_view/renderer/guest_view_container_dispatcher.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/content_switches.h"
#include "content/public/renderer/render_frame.h"
@ -22,7 +23,6 @@
#include "extensions/renderer/dispatcher.h"
#include "extensions/renderer/extension_frame_helper.h"
#include "extensions/renderer/extensions_render_frame_observer.h"
#include "extensions/renderer/guest_view/extensions_guest_view_container_dispatcher.h"
#include "extensions/renderer/renderer_extension_registry.h"
#include "extensions/renderer/script_context.h"
#include "third_party/blink/public/web/web_document.h"
@ -82,13 +82,14 @@ bool CefExtensionsRendererClient::ExtensionAPIEnabledForServiceWorkerScript(
void CefExtensionsRendererClient::RenderThreadStarted() {
content::RenderThread* thread = content::RenderThread::Get();
extension_dispatcher_.reset(new extensions::Dispatcher(
std::make_unique<extensions::CefExtensionsDispatcherDelegate>()));
extension_dispatcher_ = std::make_unique<extensions::Dispatcher>(
std::make_unique<extensions::CefExtensionsDispatcherDelegate>());
extension_dispatcher_->OnRenderThreadStarted(thread);
resource_request_policy_.reset(
new extensions::ResourceRequestPolicy(extension_dispatcher_.get()));
guest_view_container_dispatcher_.reset(
new extensions::ExtensionsGuestViewContainerDispatcher());
resource_request_policy_ =
std::make_unique<extensions::ResourceRequestPolicy>(
extension_dispatcher_.get());
guest_view_container_dispatcher_ =
std::make_unique<guest_view::GuestViewContainerDispatcher>();
thread->AddObserver(extension_dispatcher_.get());
thread->AddObserver(guest_view_container_dispatcher_.get());

View File

@ -32,6 +32,10 @@ class RenderFrame;
struct WebPluginInfo;
} // namespace content
namespace guest_view {
class GuestViewContainerDispatcher;
}
namespace url {
class Origin;
}
@ -40,7 +44,6 @@ namespace extensions {
class Dispatcher;
class DispatcherDelegate;
class ExtensionsGuestViewContainerDispatcher;
class ResourceRequestPolicy;
class CefExtensionsRendererClient : public ExtensionsRendererClient {
@ -79,7 +82,7 @@ class CefExtensionsRendererClient : public ExtensionsRendererClient {
private:
std::unique_ptr<extensions::Dispatcher> extension_dispatcher_;
std::unique_ptr<extensions::ExtensionsGuestViewContainerDispatcher>
std::unique_ptr<guest_view::GuestViewContainerDispatcher>
guest_view_container_dispatcher_;
std::unique_ptr<extensions::ResourceRequestPolicy> resource_request_policy_;

View File

@ -215,11 +215,9 @@ class CefMessageRouterBrowserSideImpl : public CefMessageRouterBrowserSide {
} else if (browser.get()) {
return static_cast<int>(
browser_query_info_map_.size(browser->GetIdentifier()));
} else {
return static_cast<int>(browser_query_info_map_.size());
}
return 0;
return static_cast<int>(browser_query_info_map_.size());
}
void OnBeforeClose(CefRefPtr<CefBrowser> browser) override {
@ -755,11 +753,9 @@ class CefMessageRouterRendererSideImpl : public CefMessageRouterRendererSide {
} else if (browser.get()) {
return static_cast<int>(
browser_request_info_map_.size(browser->GetIdentifier()));
} else {
return static_cast<int>(browser_request_info_map_.size());
}
return 0;
return static_cast<int>(browser_request_info_map_.size());
}
void OnContextCreated(CefRefPtr<CefBrowser> browser,

View File

@ -545,5 +545,10 @@ patches = [
# Linux: Fix ATK assertion error when generating ARM build config.
# https://bugs.chromium.org/p/chromium/issues/detail?id=1123214
'name': 'linux_atk_1123214',
},
{
# Linux: Fix missing re2 dependency for third_party/maldoca.
# https://chromium-review.googlesource.com/c/chromium/src/+/3128781
'name': 'linux_maldoca_3128781',
}
]

View File

@ -1,5 +1,5 @@
diff --git base/BUILD.gn base/BUILD.gn
index bafc85477602d..7672916319fa9 100644
index 336ce46f03ad2..c23082ba356a2 100644
--- base/BUILD.gn
+++ base/BUILD.gn
@@ -34,6 +34,7 @@ import("//build/config/ui.gni")
@ -10,7 +10,7 @@ index bafc85477602d..7672916319fa9 100644
import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni")
import("//third_party/icu/config.gni")
@@ -1745,7 +1746,11 @@ component("base") {
@@ -1767,7 +1768,11 @@ component("base") {
"hash/md5_constexpr_internal.h",
"hash/sha1.h",
]
@ -23,7 +23,7 @@ index bafc85477602d..7672916319fa9 100644
sources += [
"hash/md5_nacl.cc",
"hash/md5_nacl.h",
@@ -1993,6 +1998,12 @@ component("base") {
@@ -2014,6 +2019,12 @@ component("base") {
defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ]
}

View File

@ -1,8 +1,8 @@
diff --git content/browser/child_process_security_policy_impl.cc content/browser/child_process_security_policy_impl.cc
index 8b338161af4bc..e0c4e36f9f140 100644
index 5daa087a01e80..316ec852394a4 100644
--- content/browser/child_process_security_policy_impl.cc
+++ content/browser/child_process_security_policy_impl.cc
@@ -1734,6 +1734,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForOrigin(
@@ -1738,6 +1738,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForOrigin(
// DeclarativeApiTest.PersistRules.
if (actual_process_lock.matches_scheme(url::kDataScheme))
return true;
@ -20,10 +20,10 @@ index 8b338161af4bc..e0c4e36f9f140 100644
// TODO(wjmaclean): We should update the ProcessLock comparison API
diff --git content/browser/renderer_host/navigation_request.cc content/browser/renderer_host/navigation_request.cc
index b4d827ec6b9ca..5168da29c5d4d 100644
index f1136b6502573..654397a5a9f76 100644
--- content/browser/renderer_host/navigation_request.cc
+++ content/browser/renderer_host/navigation_request.cc
@@ -5686,6 +5686,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryWithoutFinalFrameHost(
@@ -5803,6 +5803,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryWithoutFinalFrameHost(
network::mojom::WebSandboxFlags sandbox_flags) {
// Calculate an approximation of the origin. The sandbox/csp are ignored.
url::Origin origin = GetOriginForURLLoaderFactoryUnchecked(this);
@ -36,7 +36,7 @@ index b4d827ec6b9ca..5168da29c5d4d 100644
// Apply sandbox flags.
// See https://html.spec.whatwg.org/#sandboxed-origin-browsing-context-flag
@@ -5719,6 +5725,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryWithFinalFrameHost() {
@@ -5836,6 +5842,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryWithFinalFrameHost() {
if (IsSameDocument() || IsPageActivation())
return GetRenderFrameHost()->GetLastCommittedOrigin();

View File

@ -1,8 +1,8 @@
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
index d7073ad38f0bf..1e00da32ead45 100644
index 219a2be0e1a1f..aeec295e68de5 100644
--- build/config/compiler/BUILD.gn
+++ build/config/compiler/BUILD.gn
@@ -1863,8 +1863,6 @@ config("thin_archive") {
@@ -1906,8 +1906,6 @@ config("thin_archive") {
# confuses lldb.
if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
arflags = [ "-T" ]

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
index f0fee1d39ff72..bc9b22974d52c 100644
index a2045328ec276..cf90eda945d20 100644
--- chrome/browser/BUILD.gn
+++ chrome/browser/BUILD.gn
@@ -13,6 +13,7 @@ import("//build/config/features.gni")
@ -10,15 +10,15 @@ index f0fee1d39ff72..bc9b22974d52c 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/browser/downgrade/buildflags.gni")
import("//chrome/common/features.gni")
@@ -1904,6 +1905,7 @@ static_library("browser") {
"//build:chromeos_buildflags",
@@ -1921,6 +1922,7 @@ static_library("browser") {
"//build:os_buildflags",
"//build/config/compiler:compiler_buildflags",
"//cc",
+ "//cef/libcef/features",
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -2485,6 +2487,10 @@ static_library("browser") {
@@ -2512,6 +2514,10 @@ static_library("browser") {
]
}

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/browser_process.h chrome/browser/browser_process.h
index a7657cb6e5d5e..d6c6f3225fcb6 100644
index 6732a55a88d30..d8e4dd5da576d 100644
--- chrome/browser/browser_process.h
+++ chrome/browser/browser_process.h
@@ -198,9 +198,9 @@ class BrowserProcess {
@@ -202,9 +202,9 @@ class BrowserProcess {
virtual DownloadStatusUpdater* download_status_updater() = 0;
virtual DownloadRequestLimiter* download_request_limiter() = 0;
@ -14,10 +14,10 @@ index a7657cb6e5d5e..d6c6f3225fcb6 100644
std::unique_ptr<BackgroundModeManager> manager) = 0;
#endif
diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc
index 18620c247548a..bbe2db2355d1e 100644
index e4ae583861fb6..57f5d6efc9221 100644
--- chrome/browser/browser_process_impl.cc
+++ chrome/browser/browser_process_impl.cc
@@ -981,18 +981,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
@@ -998,18 +998,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
return download_request_limiter_.get();
}
@ -38,10 +38,10 @@ index 18620c247548a..bbe2db2355d1e 100644
std::unique_ptr<BackgroundModeManager> manager) {
background_mode_manager_ = std::move(manager);
diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h
index 2bb0b1ec912b0..2235c7b56a456 100644
index 80311eff04c56..29c1e8cec24c9 100644
--- chrome/browser/browser_process_impl.h
+++ chrome/browser/browser_process_impl.h
@@ -174,8 +174,8 @@ class BrowserProcessImpl : public BrowserProcess,
@@ -180,8 +180,8 @@ class BrowserProcessImpl : public BrowserProcess,
void SetApplicationLocale(const std::string& actual_locale) override;
DownloadStatusUpdater* download_status_updater() override;
DownloadRequestLimiter* download_request_limiter() override;

View File

@ -13,10 +13,10 @@ index ba0c5c3fc0446..b4df9af95ecd1 100644
return false;
}
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
index b6a5989bbee66..10c942ddc793c 100644
index 2beb437bedf1d..21b15b48b4a3e 100644
--- chrome/browser/ui/browser.cc
+++ chrome/browser/ui/browser.cc
@@ -262,6 +262,20 @@
@@ -265,6 +265,20 @@
#include "components/captive_portal/content/captive_portal_tab_helper.h"
#endif
@ -37,7 +37,7 @@ index b6a5989bbee66..10c942ddc793c 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/extension_browser_window_helper.h"
#endif
@@ -496,6 +510,13 @@ Browser::Browser(const CreateParams& params)
@@ -500,6 +514,13 @@ Browser::Browser(const CreateParams& params)
tab_strip_model_->AddObserver(this);
@ -51,7 +51,7 @@ index b6a5989bbee66..10c942ddc793c 100644
location_bar_model_ = std::make_unique<LocationBarModelImpl>(
location_bar_model_delegate_.get(), content::kMaxURLDisplayChars);
@@ -1326,6 +1347,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
@@ -1330,6 +1351,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
if (exclusive_access_manager_->HandleUserKeyEvent(event))
return content::KeyboardEventProcessingResult::HANDLED;
@ -66,7 +66,7 @@ index b6a5989bbee66..10c942ddc793c 100644
return window()->PreHandleKeyboardEvent(event);
}
@@ -1333,8 +1362,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
@@ -1337,8 +1366,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
const NativeWebKeyboardEvent& event) {
DevToolsWindow* devtools_window =
DevToolsWindow::GetInstanceForInspectedWebContents(source);
@ -87,7 +87,7 @@ index b6a5989bbee66..10c942ddc793c 100644
}
bool Browser::TabsNeedBeforeUnloadFired() {
@@ -1559,6 +1598,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source,
@@ -1563,6 +1602,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source,
return window->OpenURLFromTab(source, params);
}
@ -102,7 +102,7 @@ index b6a5989bbee66..10c942ddc793c 100644
NavigateParams nav_params(this, params.url, params.transition);
nav_params.FillNavigateParamsFromOpenURLParams(params);
nav_params.source_contents = source;
@@ -1658,6 +1705,15 @@ void Browser::AddNewContents(WebContents* source,
@@ -1662,6 +1709,15 @@ void Browser::AddNewContents(WebContents* source,
source, disposition);
}
@ -118,7 +118,7 @@ index b6a5989bbee66..10c942ddc793c 100644
chrome::AddWebContents(this, source, std::move(new_contents), target_url,
disposition, initial_rect);
}
@@ -1676,6 +1732,8 @@ void Browser::LoadingStateChanged(WebContents* source,
@@ -1680,6 +1736,8 @@ void Browser::LoadingStateChanged(WebContents* source,
bool to_different_document) {
ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD);
UpdateWindowForLoadingStateChanged(source, to_different_document);
@ -127,7 +127,7 @@ index b6a5989bbee66..10c942ddc793c 100644
}
void Browser::CloseContents(WebContents* source) {
@@ -1703,6 +1761,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
@@ -1707,6 +1765,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
}
void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
@ -136,7 +136,7 @@ index b6a5989bbee66..10c942ddc793c 100644
if (!GetStatusBubble())
return;
@@ -1710,6 +1770,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
@@ -1714,6 +1774,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
GetStatusBubble()->SetURL(url);
}
@ -154,7 +154,7 @@ index b6a5989bbee66..10c942ddc793c 100644
void Browser::ContentsMouseEvent(WebContents* source,
bool motion,
bool exited) {
@@ -1826,6 +1897,10 @@ void Browser::WebContentsCreated(WebContents* source_contents,
@@ -1830,6 +1901,10 @@ void Browser::WebContentsCreated(WebContents* source_contents,
// Make the tab show up in the task manager.
task_manager::WebContentsTags::CreateForTabContents(new_contents);
@ -165,7 +165,7 @@ index b6a5989bbee66..10c942ddc793c 100644
}
void Browser::PortalWebContentsCreated(WebContents* portal_web_contents) {
@@ -1862,6 +1937,8 @@ void Browser::RendererResponsive(
@@ -1866,6 +1941,8 @@ void Browser::RendererResponsive(
void Browser::DidNavigatePrimaryMainFramePostCommit(WebContents* web_contents) {
if (web_contents == tab_strip_model_->GetActiveWebContents())
UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE);
@ -174,7 +174,7 @@ index b6a5989bbee66..10c942ddc793c 100644
}
content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager(
@@ -1901,11 +1978,15 @@ void Browser::EnterFullscreenModeForTab(
@@ -1905,11 +1982,15 @@ void Browser::EnterFullscreenModeForTab(
const blink::mojom::FullscreenOptions& options) {
exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab(
requesting_frame, options.display_id);
@ -190,7 +190,7 @@ index b6a5989bbee66..10c942ddc793c 100644
}
bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) {
@@ -2750,6 +2831,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
@@ -2754,6 +2835,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
content_translate_driver->RemoveTranslationObserver(this);
BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this);
}
@ -200,7 +200,7 @@ index b6a5989bbee66..10c942ddc793c 100644
void Browser::TabDetachedAtImpl(content::WebContents* contents,
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
index 17c3233034d0e..4052f9c8dfc68 100644
index 7649c59dde3f5..a3b719f5c673a 100644
--- chrome/browser/ui/browser.h
+++ chrome/browser/ui/browser.h
@@ -21,6 +21,7 @@
@ -222,7 +222,7 @@ index 17c3233034d0e..4052f9c8dfc68 100644
#if defined(OS_ANDROID)
#error This file should only be included on desktop.
#endif
@@ -285,6 +290,11 @@ class Browser : public TabStripModelObserver,
@@ -291,6 +296,11 @@ class Browser : public TabStripModelObserver,
// maximizable.
bool can_maximize = true;
@ -234,7 +234,7 @@ index 17c3233034d0e..4052f9c8dfc68 100644
private:
friend class Browser;
friend class WindowSizerChromeOSTest;
@@ -349,6 +359,13 @@ class Browser : public TabStripModelObserver,
@@ -355,6 +365,13 @@ class Browser : public TabStripModelObserver,
return creation_source_ == CreationSource::kSessionRestore;
}
@ -248,7 +248,7 @@ index 17c3233034d0e..4052f9c8dfc68 100644
// Accessors ////////////////////////////////////////////////////////////////
const CreateParams& create_params() const { return create_params_; }
@@ -419,6 +436,12 @@ class Browser : public TabStripModelObserver,
@@ -428,6 +445,12 @@ class Browser : public TabStripModelObserver,
base::WeakPtr<Browser> AsWeakPtr();
@ -261,7 +261,7 @@ index 17c3233034d0e..4052f9c8dfc68 100644
// Get the FindBarController for this browser, creating it if it does not
// yet exist.
FindBarController* GetFindBarController();
@@ -784,6 +807,11 @@ class Browser : public TabStripModelObserver,
@@ -793,6 +816,11 @@ class Browser : public TabStripModelObserver,
void SetContentsBounds(content::WebContents* source,
const gfx::Rect& bounds) override;
void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
@ -273,7 +273,7 @@ index 17c3233034d0e..4052f9c8dfc68 100644
void ContentsMouseEvent(content::WebContents* source,
bool motion,
bool exited) override;
@@ -1172,6 +1200,8 @@ class Browser : public TabStripModelObserver,
@@ -1186,6 +1214,8 @@ class Browser : public TabStripModelObserver,
const std::string initial_workspace_;
bool initial_visible_on_all_workspaces_state_;
@ -282,7 +282,7 @@ index 17c3233034d0e..4052f9c8dfc68 100644
CreationSource creation_source_ = CreationSource::kUnknown;
UnloadController unload_controller_;
@@ -1229,6 +1259,10 @@ class Browser : public TabStripModelObserver,
@@ -1243,6 +1273,10 @@ class Browser : public TabStripModelObserver,
extension_browser_window_helper_;
#endif
@ -294,10 +294,10 @@ index 17c3233034d0e..4052f9c8dfc68 100644
// The following factory is used for chrome update coalescing.
diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc
index a4af0836da1aa..bdf26e401d563 100644
index b304e3ebb6bb1..e171cc7b747ca 100644
--- chrome/browser/ui/browser_navigator.cc
+++ chrome/browser/ui/browser_navigator.cc
@@ -456,6 +456,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
@@ -455,6 +455,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
std::unique_ptr<WebContents> target_contents =
WebContents::Create(create_params);

View File

@ -54,7 +54,7 @@ index 173582c7c4904..bbf57904b6de9 100644
#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
SupervisedUserSettingsService* supervised_service =
diff --git components/content_settings/renderer/content_settings_agent_impl.cc components/content_settings/renderer/content_settings_agent_impl.cc
index e410df38c0b44..3d5701b9918ac 100644
index 274b468f69a93..70dae07f3b883 100644
--- components/content_settings/renderer/content_settings_agent_impl.cc
+++ components/content_settings/renderer/content_settings_agent_impl.cc
@@ -170,7 +170,7 @@ ContentSetting GetContentSettingFromRulesImpl(

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/renderer_context_menu/render_view_context_menu.cc chrome/browser/renderer_context_menu/render_view_context_menu.cc
index 9e358b1cde224..67ccd6ca0c50d 100644
index 9729ece5b3ffe..6a31b31567f24 100644
--- chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -279,6 +279,13 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
@@ -280,6 +280,13 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
return callback.get();
}
@ -16,7 +16,7 @@ index 9e358b1cde224..67ccd6ca0c50d 100644
enum class UmaEnumIdLookupType {
GeneralEnumId,
ContextSpecificEnumId,
@@ -490,6 +497,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
@@ -491,6 +498,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
if (ContextMenuMatcher::IsExtensionsCustomCommandId(id))
return 1;
@ -27,10 +27,10 @@ index 9e358b1cde224..67ccd6ca0c50d 100644
id = CollapseCommandsForUMA(id);
const auto& map = GetIdcToUmaMap(type);
auto it = map.find(id);
@@ -666,6 +677,14 @@ RenderViewContextMenu::RenderViewContextMenu(
system_app_type_ = GetBrowser() && GetBrowser()->app_controller()
? GetBrowser()->app_controller()->system_app_type()
: absl::nullopt;
@@ -667,6 +678,14 @@ RenderViewContextMenu::RenderViewContextMenu(
system_app_ = GetBrowser() && GetBrowser()->app_controller()
? GetBrowser()->app_controller()->system_app()
: nullptr;
+
+ auto* cb = GetMenuCreatedCallback();
+ if (!cb->is_null()) {
@ -42,7 +42,7 @@ index 9e358b1cde224..67ccd6ca0c50d 100644
}
RenderViewContextMenu::~RenderViewContextMenu() = default;
@@ -1032,6 +1051,12 @@ void RenderViewContextMenu::InitMenu() {
@@ -1033,6 +1052,12 @@ void RenderViewContextMenu::InitMenu() {
// menu, meaning that each menu item added/removed in this function will cause
// it to visibly jump on the screen (see b/173569669).
AppendQuickAnswersItems();
@ -55,7 +55,7 @@ index 9e358b1cde224..67ccd6ca0c50d 100644
}
Profile* RenderViewContextMenu::GetProfile() const {
@@ -2816,6 +2841,12 @@ void RenderViewContextMenu::RegisterMenuShownCallbackForTesting(
@@ -2819,6 +2844,12 @@ void RenderViewContextMenu::RegisterMenuShownCallbackForTesting(
*GetMenuShownCallback() = std::move(cb);
}
@ -69,10 +69,10 @@ index 9e358b1cde224..67ccd6ca0c50d 100644
RenderViewContextMenu::GetHandlersForLinkUrl() {
ProtocolHandlerRegistry::ProtocolHandlerList handlers =
diff --git chrome/browser/renderer_context_menu/render_view_context_menu.h chrome/browser/renderer_context_menu/render_view_context_menu.h
index fbcde566b8c90..261b1b3e05dfc 100644
index 524cff207c179..801def29a8636 100644
--- chrome/browser/renderer_context_menu/render_view_context_menu.h
+++ chrome/browser/renderer_context_menu/render_view_context_menu.h
@@ -106,6 +106,12 @@ class RenderViewContextMenu : public RenderViewContextMenuBase,
@@ -109,6 +109,12 @@ class RenderViewContextMenu : public RenderViewContextMenuBase,
static void RegisterMenuShownCallbackForTesting(
base::OnceCallback<void(RenderViewContextMenu*)> cb);
@ -85,7 +85,7 @@ index fbcde566b8c90..261b1b3e05dfc 100644
protected:
Profile* GetProfile() const;
@@ -304,6 +310,9 @@ class RenderViewContextMenu : public RenderViewContextMenuBase,
@@ -307,6 +313,9 @@ class RenderViewContextMenu : public RenderViewContextMenuBase,
// built.
bool is_protocol_submenu_valid_ = false;

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index bab9ce1d4662e..afefbe5f25ce2 100644
index e5811d45bd4b6..4f532d65e963f 100644
--- chrome/browser/ui/BUILD.gn
+++ chrome/browser/ui/BUILD.gn
@@ -11,6 +11,7 @@ import("//build/config/features.gni")
@ -10,7 +10,7 @@ index bab9ce1d4662e..afefbe5f25ce2 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/common/features.gni")
import("//chromeos/assistant/assistant.gni")
@@ -346,6 +347,10 @@ static_library("ui") {
@@ -347,6 +348,10 @@ static_library("ui") {
"//build/config/compiler:wexit_time_destructors",
]
@ -21,7 +21,7 @@ index bab9ce1d4662e..afefbe5f25ce2 100644
# Since browser and browser_ui actually depend on each other,
# we must omit the dependency from browser_ui to browser.
# However, this means browser_ui and browser should more or less
@@ -368,6 +373,7 @@ static_library("ui") {
@@ -369,6 +374,7 @@ static_library("ui") {
"//build:branding_buildflags",
"//build:chromeos_buildflags",
"//cc/paint",
@ -29,27 +29,27 @@ index bab9ce1d4662e..afefbe5f25ce2 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -4947,6 +4953,7 @@ static_library("ui") {
@@ -4984,6 +4990,7 @@ static_library("ui") {
if (enable_basic_printing) {
deps += [
"//components/printing/browser",
+ "//components/printing/common:mojo_interfaces",
"//printing",
]
if (use_cups) {
}
diff --git chrome/browser/ui/webui/net_export_ui.cc chrome/browser/ui/webui/net_export_ui.cc
index fcd1f66b3a7a4..70ded321f5498 100644
index 096f4ca97179d..d2c731625b9d6 100644
--- chrome/browser/ui/webui/net_export_ui.cc
+++ chrome/browser/ui/webui/net_export_ui.cc
@@ -21,6 +21,7 @@
#include "base/strings/string_util.h"
@@ -22,6 +22,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "build/build_config.h"
+#include "cef/libcef/features/runtime.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/download/download_prefs.h"
#include "chrome/browser/net/net_export_helper.h"
@@ -44,6 +45,10 @@
@@ -45,6 +46,10 @@
#include "net/log/net_log_capture_mode.h"
#include "ui/shell_dialogs/select_file_dialog.h"
@ -60,7 +60,7 @@ index fcd1f66b3a7a4..70ded321f5498 100644
#if defined(OS_ANDROID)
#include "chrome/browser/android/intent_helper.h"
#endif
@@ -137,6 +142,13 @@ class NetExportMessageHandler
@@ -138,6 +143,13 @@ class NetExportMessageHandler
// NetLog file.
void ShowSelectFileDialog(const base::FilePath& default_path);
@ -74,7 +74,7 @@ index fcd1f66b3a7a4..70ded321f5498 100644
// Cached pointer to SystemNetworkContextManager's NetExportFileWriter.
net_log::NetExportFileWriter* file_writer_;
@@ -232,6 +244,13 @@ void NetExportMessageHandler::OnStartNetLog(const base::ListValue* list) {
@@ -233,6 +245,13 @@ void NetExportMessageHandler::OnStartNetLog(const base::ListValue* list) {
if (UsingMobileUI()) {
StartNetLog(base::FilePath());
} else {
@ -88,7 +88,7 @@ index fcd1f66b3a7a4..70ded321f5498 100644
base::FilePath initial_dir = last_save_dir.Pointer()->empty() ?
DownloadPrefs::FromBrowserContext(
web_ui()->GetWebContents()->GetBrowserContext())->DownloadPath() :
@@ -248,6 +267,7 @@ void NetExportMessageHandler::OnStopNetLog(const base::ListValue* list) {
@@ -249,6 +268,7 @@ void NetExportMessageHandler::OnStopNetLog(const base::ListValue* list) {
std::unique_ptr<base::DictionaryValue> ui_thread_polled_data(
new base::DictionaryValue());
@ -96,7 +96,7 @@ index fcd1f66b3a7a4..70ded321f5498 100644
Profile* profile = Profile::FromWebUI(web_ui());
SetIfNotNull(ui_thread_polled_data.get(), "prerenderInfo",
chrome_browser_net::GetPrerenderInfo(profile));
@@ -257,6 +277,7 @@ void NetExportMessageHandler::OnStopNetLog(const base::ListValue* list) {
@@ -258,6 +278,7 @@ void NetExportMessageHandler::OnStopNetLog(const base::ListValue* list) {
SetIfNotNull(ui_thread_polled_data.get(), "serviceProviders",
chrome_browser_net::GetWindowsServiceProviders());
#endif
@ -104,7 +104,7 @@ index fcd1f66b3a7a4..70ded321f5498 100644
file_writer_->StopNetLog(std::move(ui_thread_polled_data));
}
@@ -373,6 +394,38 @@ void NetExportMessageHandler::ShowSelectFileDialog(
@@ -374,6 +395,38 @@ void NetExportMessageHandler::ShowSelectFileDialog(
&file_type_info, 0, base::FilePath::StringType(), owning_window, nullptr);
}

View File

@ -29,7 +29,7 @@ index 8a93e597977b0..4d0faa950a2af 100644
chrome::RecordDialogCreation(
diff --git chrome/browser/ui/views/profiles/profile_menu_view_base.cc chrome/browser/ui/views/profiles/profile_menu_view_base.cc
index 5b5baee89fc2f..26dc4a9591bf9 100644
index 8dffbd45f0e38..1e162823bd817 100644
--- chrome/browser/ui/views/profiles/profile_menu_view_base.cc
+++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc
@@ -511,7 +511,9 @@ void ProfileMenuViewBase::ShowBubble(profiles::BubbleViewMode view_mode,

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/profiles/off_the_record_profile_impl.cc chrome/browser/profiles/off_the_record_profile_impl.cc
index baef951fe2535..a72b08b21c606 100644
index 4e76c7a55ac03..a4614a9d2cecb 100644
--- chrome/browser/profiles/off_the_record_profile_impl.cc
+++ chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -628,7 +628,9 @@ std::unique_ptr<Profile> Profile::CreateOffTheRecordProfile(
@@ -636,7 +636,9 @@ std::unique_ptr<Profile> Profile::CreateOffTheRecordProfile(
#endif
if (!profile)
profile = std::make_unique<OffTheRecordProfileImpl>(parent, otr_profile_id);
@ -14,7 +14,7 @@ index baef951fe2535..a72b08b21c606 100644
}
diff --git chrome/browser/profiles/profile.cc chrome/browser/profiles/profile.cc
index 403c59f81857a..d73fb2d6fa88b 100644
index 5d6cb6f377f81..8c4b53d2f7cc3 100644
--- chrome/browser/profiles/profile.cc
+++ chrome/browser/profiles/profile.cc
@@ -86,6 +86,7 @@ base::LazyInstance<std::set<content::BrowserContext*>>::Leaky
@ -52,7 +52,7 @@ index 403c59f81857a..d73fb2d6fa88b 100644
Profile::OTRProfileID Profile::OTRProfileID::CreateUniqueForDevTools() {
return CreateUnique(kDevToolsOTRProfileIDPrefix);
diff --git chrome/browser/profiles/profile.h chrome/browser/profiles/profile.h
index 4d0cc18bd6a85..76adcbd9b7fcc 100644
index bf7fc55a91e20..d6209550b6567 100644
--- chrome/browser/profiles/profile.h
+++ chrome/browser/profiles/profile.h
@@ -112,6 +112,10 @@ class Profile : public content::BrowserContext {
@ -68,7 +68,7 @@ index 4d0cc18bd6a85..76adcbd9b7fcc 100644
@@ -514,6 +518,8 @@ class Profile : public content::BrowserContext {
virtual void RecordMainFrameNavigation() = 0;
virtual void RecordPrimaryMainFrameNavigation() = 0;
+ void NotifyOffTheRecordProfileCreated(Profile* off_the_record);
+
@ -85,10 +85,10 @@ index 4d0cc18bd6a85..76adcbd9b7fcc 100644
virtual bool IsSignedIn() = 0;
diff --git chrome/browser/profiles/profile_impl.cc chrome/browser/profiles/profile_impl.cc
index 677206fe6701d..50248ef60f428 100644
index 56ce2f16cdd12..82e8d76090ce1 100644
--- chrome/browser/profiles/profile_impl.cc
+++ chrome/browser/profiles/profile_impl.cc
@@ -973,7 +973,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
@@ -1026,7 +1026,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
otr_profiles_[otr_profile_id] = std::move(otr_profile);
@ -100,7 +100,7 @@ index 677206fe6701d..50248ef60f428 100644
return raw_otr_profile;
}
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
index 04aab51e9b179..532e719058f4b 100644
index b6c4eee4c9d1a..c8158ff856167 100644
--- chrome/browser/profiles/profile_manager.cc
+++ chrome/browser/profiles/profile_manager.cc
@@ -495,7 +495,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
@ -113,7 +113,7 @@ index 04aab51e9b179..532e719058f4b 100644
}
diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h
index 915a95e287c58..0424e8bdd7d84 100644
index c4d9b563a2bc1..13de953c75ad2 100644
--- chrome/browser/profiles/profile_manager.h
+++ chrome/browser/profiles/profile_manager.h
@@ -119,7 +119,7 @@ class ProfileManager : public Profile::Delegate {
@ -135,7 +135,7 @@ index 915a95e287c58..0424e8bdd7d84 100644
// Returns the directory where the first created profile is stored,
// relative to the user data directory currently in use.
diff --git chrome/browser/profiles/renderer_updater.cc chrome/browser/profiles/renderer_updater.cc
index 0757d75a24b28..bd916bdaf820f 100644
index 96b9b82ffe61d..31d23c7ca954f 100644
--- chrome/browser/profiles/renderer_updater.cc
+++ chrome/browser/profiles/renderer_updater.cc
@@ -8,6 +8,7 @@

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn
index ff31c91fc6f0c..3125b3eaeeae8 100644
index abc27a26195d8..67124b5eccf50 100644
--- chrome/browser/safe_browsing/BUILD.gn
+++ chrome/browser/safe_browsing/BUILD.gn
@@ -27,6 +27,7 @@ static_library("safe_browsing") {

View File

@ -186,10 +186,10 @@ index 8c2547056ec26..2ab3252dca708 100644
// that the X-Frame-Options protection mechanism is set to either DENY or
// SAMEORIGIN.
diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc
index fc4ae8abac329..73083d8ba64d6 100644
index 5f0ce2bee4f26..39e29185a11e1 100644
--- chrome/renderer/chrome_content_renderer_client.cc
+++ chrome/renderer/chrome_content_renderer_client.cc
@@ -931,6 +931,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -942,6 +942,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
if ((status == chrome::mojom::PluginStatus::kUnauthorized ||
status == chrome::mojom::PluginStatus::kBlocked) &&
@ -197,7 +197,7 @@ index fc4ae8abac329..73083d8ba64d6 100644
content_settings_agent_delegate->IsPluginTemporarilyAllowed(
identifier)) {
status = chrome::mojom::PluginStatus::kAllowed;
@@ -1134,7 +1135,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1150,7 +1151,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
plugin_auth_host.BindNewEndpointAndPassReceiver());
plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier);
@ -207,7 +207,7 @@ index fc4ae8abac329..73083d8ba64d6 100644
break;
}
case chrome::mojom::PluginStatus::kBlocked: {
@@ -1143,7 +1145,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1159,7 +1161,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
placeholder->AllowLoading();
RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked"));
@ -217,7 +217,7 @@ index fc4ae8abac329..73083d8ba64d6 100644
break;
}
case chrome::mojom::PluginStatus::kBlockedByPolicy: {
@@ -1153,7 +1156,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1169,7 +1172,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
group_name));
RenderThread::Get()->RecordAction(
UserMetricsAction("Plugin_BlockedByPolicy"));
@ -227,7 +227,7 @@ index fc4ae8abac329..73083d8ba64d6 100644
break;
}
case chrome::mojom::PluginStatus::kBlockedNoLoading: {
@@ -1161,7 +1165,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1177,7 +1181,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
IDR_BLOCKED_PLUGIN_HTML,
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING,
group_name));

View File

@ -1,5 +1,5 @@
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
index dd997e3ccdb03..c9076e263b403 100644
index fdbff76b66227..d8b6453dffcac 100644
--- chrome/renderer/BUILD.gn
+++ chrome/renderer/BUILD.gn
@@ -5,6 +5,7 @@

View File

@ -1,5 +1,5 @@
diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc
index 73d78a39dacfe..53e0a980ec8a4 100644
index f12e393e0f9bb..51f4898fc25d5 100644
--- chrome/app/chrome_main_delegate.cc
+++ chrome/app/chrome_main_delegate.cc
@@ -29,6 +29,7 @@
@ -60,7 +60,7 @@ index 73d78a39dacfe..53e0a980ec8a4 100644
+ } // !cef::IsChromeRuntimeEnabled()
#if BUILDFLAG(ENABLE_PDF)
MaybeInitializeGDI();
MaybePatchGdiGetFontData();
@@ -1266,6 +1275,7 @@ void ChromeMainDelegate::ZygoteForked() {
SetUpProfilingShutdownHandler();
}
@ -78,7 +78,7 @@ index 73d78a39dacfe..53e0a980ec8a4 100644
#endif // defined(OS_LINUX) || defined(OS_CHROMEOS)
diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc
index e07aca88fdf9e..9aa092498c861 100644
index 3f433969229eb..560f1e830a4e7 100644
--- chrome/browser/chrome_browser_main.cc
+++ chrome/browser/chrome_browser_main.cc
@@ -50,6 +50,7 @@
@ -89,7 +89,7 @@ index e07aca88fdf9e..9aa092498c861 100644
#include "chrome/browser/about_flags.h"
#include "chrome/browser/active_use_util.h"
#include "chrome/browser/after_startup_task_utils.h"
@@ -910,8 +911,10 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
@@ -911,8 +912,10 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
#if !defined(OS_ANDROID)
// Create the RunLoop for MainMessageLoopRun() to use, and pass a copy of
// its QuitClosure to the BrowserProcessImpl to call when it is time to exit.
@ -101,7 +101,7 @@ index e07aca88fdf9e..9aa092498c861 100644
// These members must be initialized before returning from this function.
// Android doesn't use StartupBrowserCreator.
@@ -1663,11 +1666,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1686,11 +1689,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// This step is costly and is already measured in
// Startup.StartupBrowserCreator_Start.
// See the comment above for an explanation of |process_command_line|.
@ -156,7 +156,7 @@ index 95d1ebc190910..13cdfa52db108 100644
+#endif
}
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
index 69b31dd94edae..e5931622edb3c 100644
index 93a402f34c0da..92d30ea06b5f1 100644
--- chrome/browser/chrome_content_browser_client.cc
+++ chrome/browser/chrome_content_browser_client.cc
@@ -28,6 +28,7 @@
@ -167,7 +167,7 @@ index 69b31dd94edae..e5931622edb3c 100644
#include "chrome/browser/accessibility/accessibility_labels_service.h"
#include "chrome/browser/accessibility/accessibility_labels_service_factory.h"
#include "chrome/browser/after_startup_task_utils.h"
@@ -3475,9 +3476,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
@@ -3500,9 +3501,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
&search::HandleNewTabURLReverseRewrite);
#endif // defined(OS_ANDROID)
@ -180,7 +180,7 @@ index 69b31dd94edae..e5931622edb3c 100644
base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc
index 8fadd3a4d4ebe..2fad4e8704410 100644
index ce875b5837a36..2ee3cf28b2e6f 100644
--- chrome/browser/prefs/browser_prefs.cc
+++ chrome/browser/prefs/browser_prefs.cc
@@ -10,6 +10,7 @@
@ -202,7 +202,7 @@ index 8fadd3a4d4ebe..2fad4e8704410 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/accessibility/animation_policy_prefs.h"
#include "chrome/browser/apps/platform_apps/shortcut_manager.h"
@@ -1147,6 +1152,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
@@ -1177,6 +1182,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
SessionDataService::RegisterProfilePrefs(registry);
#endif

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/ui/browser_command_controller.cc chrome/browser/ui/browser_command_controller.cc
index 9188154824c4..d01f610a6413 100644
index 93f3e51084cbe..8103ae19de912 100644
--- chrome/browser/ui/browser_command_controller.cc
+++ chrome/browser/ui/browser_command_controller.cc
@@ -351,8 +351,10 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
@ -14,7 +14,7 @@ index 9188154824c4..d01f610a6413 100644
// No commands are enabled if there is not yet any selected tab.
// TODO(pkasting): It seems like we should not need this, because either
@@ -962,11 +964,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
@@ -965,11 +967,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
// BrowserCommandController, private:
bool BrowserCommandController::IsShowingMainUI() {
@ -31,10 +31,10 @@ index 9188154824c4..d01f610a6413 100644
void BrowserCommandController::InitCommandState() {
diff --git chrome/browser/ui/views/frame/browser_frame.cc chrome/browser/ui/views/frame/browser_frame.cc
index 2c4624fb0cd0..57c087dcbaae 100644
index 79a2b7358eade..976332c2564d2 100644
--- chrome/browser/ui/views/frame/browser_frame.cc
+++ chrome/browser/ui/views/frame/browser_frame.cc
@@ -69,15 +69,23 @@ bool IsUsingGtkTheme(Profile* profile) {
@@ -72,15 +72,23 @@ bool IsUsingGtkTheme(Profile* profile) {
////////////////////////////////////////////////////////////////////////////////
// BrowserFrame, public:
@ -60,7 +60,7 @@ index 2c4624fb0cd0..57c087dcbaae 100644
}
BrowserFrame::~BrowserFrame() {}
@@ -137,6 +145,12 @@ gfx::Rect BrowserFrame::GetBoundsForTabStripRegion(
@@ -140,6 +148,12 @@ gfx::Rect BrowserFrame::GetBoundsForTabStripRegion(
}
int BrowserFrame::GetTopInset() const {
@ -73,7 +73,7 @@ index 2c4624fb0cd0..57c087dcbaae 100644
return browser_frame_view_->GetTopInset(false);
}
@@ -171,15 +185,21 @@ void BrowserFrame::GetWindowPlacement(gfx::Rect* bounds,
@@ -174,15 +188,21 @@ void BrowserFrame::GetWindowPlacement(gfx::Rect* bounds,
content::KeyboardEventProcessingResult BrowserFrame::PreHandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) {
@ -95,7 +95,7 @@ index 2c4624fb0cd0..57c087dcbaae 100644
browser_frame_view_->OnBrowserViewInitViewsComplete();
}
@@ -348,7 +368,8 @@ void BrowserFrame::SelectNativeTheme() {
@@ -353,7 +373,8 @@ void BrowserFrame::SelectNativeTheme() {
// Select between regular, dark and GTK theme.
ui::NativeTheme* native_theme = ui::NativeTheme::GetInstanceForNativeUi();
@ -106,7 +106,7 @@ index 2c4624fb0cd0..57c087dcbaae 100644
// or not we always use the dark ui instance.
if (base::FeatureList::IsEnabled(
diff --git chrome/browser/ui/views/frame/browser_frame.h chrome/browser/ui/views/frame/browser_frame.h
index 0ce7abdeb7d9..8197a6bb7da9 100644
index e06cd6c3d83db..1f7da7cf79979 100644
--- chrome/browser/ui/views/frame/browser_frame.h
+++ chrome/browser/ui/views/frame/browser_frame.h
@@ -54,7 +54,9 @@ enum class TabDragKind {
@ -120,10 +120,10 @@ index 0ce7abdeb7d9..8197a6bb7da9 100644
// Initialize the frame (creates the underlying native window).
diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc
index f0b0bd645a3c..ae1449aa9986 100644
index 84044530181a8..737c41a0d01a5 100644
--- chrome/browser/ui/views/frame/browser_view.cc
+++ chrome/browser/ui/views/frame/browser_view.cc
@@ -274,11 +274,10 @@ using content::WebContents;
@@ -281,11 +281,10 @@ using content::WebContents;
using views::ColumnSet;
using web_modal::WebContentsModalDialogHost;
@ -138,7 +138,7 @@ index f0b0bd645a3c..ae1449aa9986 100644
#if BUILDFLAG(IS_CHROMEOS_ASH)
// UMA histograms that record animation smoothness for tab loading animation.
@@ -593,11 +592,22 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
@@ -600,11 +599,22 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
///////////////////////////////////////////////////////////////////////////////
// BrowserView, public:
@ -162,7 +162,7 @@ index f0b0bd645a3c..ae1449aa9986 100644
SetShowIcon(::ShouldShowWindowIcon(browser_.get()));
// In forced app mode, all size controls are always disabled. Otherwise, use
@@ -611,7 +621,6 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
@@ -618,7 +628,6 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
}
browser_->tab_strip_model()->AddObserver(this);
@ -170,7 +170,7 @@ index f0b0bd645a3c..ae1449aa9986 100644
// Top container holds tab strip region and toolbar and lives at the front of
// the view hierarchy.
@@ -655,8 +664,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
@@ -662,8 +671,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
contents_container->SetLayoutManager(std::make_unique<ContentsLayoutManager>(
devtools_web_view_, contents_web_view_));
@ -188,7 +188,7 @@ index f0b0bd645a3c..ae1449aa9986 100644
contents_separator_ =
top_container_->AddChildView(std::make_unique<ContentsSeparator>());
@@ -1440,6 +1456,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const {
@@ -1454,6 +1470,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const {
if (immersive_mode_controller_->IsEnabled())
return false;
@ -197,7 +197,7 @@ index f0b0bd645a3c..ae1449aa9986 100644
return frame_->GetFrameView()->ShouldHideTopUIForFullscreen();
}
@@ -2482,7 +2500,8 @@ BrowserView::GetNativeViewHostsForTopControlsSlide() const {
@@ -2527,7 +2545,8 @@ BrowserView::GetNativeViewHostsForTopControlsSlide() const {
}
void BrowserView::ReparentTopContainerForEndOfImmersive() {
@ -207,7 +207,7 @@ index f0b0bd645a3c..ae1449aa9986 100644
top_container()->DestroyLayer();
AddChildViewAt(top_container(), 0);
EnsureFocusOrder();
@@ -2934,8 +2953,10 @@ void BrowserView::Layout() {
@@ -2979,8 +2998,10 @@ void BrowserView::Layout() {
// TODO(jamescook): Why was this in the middle of layout code?
toolbar_->location_bar()->omnibox_view()->SetFocusBehavior(
@ -220,7 +220,7 @@ index f0b0bd645a3c..ae1449aa9986 100644
// Some of the situations when the BrowserView is laid out are:
// - Enter/exit immersive fullscreen mode.
@@ -2998,6 +3019,11 @@ void BrowserView::AddedToWidget() {
@@ -3043,6 +3064,11 @@ void BrowserView::AddedToWidget() {
SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
#endif
@ -232,7 +232,7 @@ index f0b0bd645a3c..ae1449aa9986 100644
toolbar_->Init();
#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
@@ -3033,13 +3059,9 @@ void BrowserView::AddedToWidget() {
@@ -3078,13 +3104,9 @@ void BrowserView::AddedToWidget() {
EnsureFocusOrder();
@ -249,10 +249,10 @@ index f0b0bd645a3c..ae1449aa9986 100644
MaybeInitializeWebUITabStrip();
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
index 021f04720e56..98097fd4f11f 100644
index 4709cdd1f29d1..3d79400cbf4a7 100644
--- chrome/browser/ui/views/frame/browser_view.h
+++ chrome/browser/ui/views/frame/browser_view.h
@@ -114,11 +114,16 @@ class BrowserView : public BrowserWindow,
@@ -118,11 +118,16 @@ class BrowserView : public BrowserWindow,
public webapps::AppBannerManager::Observer {
public:
METADATA_HEADER(BrowserView);
@ -269,7 +269,7 @@ index 021f04720e56..98097fd4f11f 100644
void set_frame(BrowserFrame* frame) { frame_ = frame; }
BrowserFrame* frame() const { return frame_; }
@@ -668,6 +673,12 @@ class BrowserView : public BrowserWindow,
@@ -679,6 +684,12 @@ class BrowserView : public BrowserWindow,
return accessibility_focus_highlight_.get();
}
@ -283,7 +283,7 @@ index 021f04720e56..98097fd4f11f 100644
// Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate
// interface to keep these two classes decoupled and testable.
diff --git chrome/browser/ui/views/frame/browser_view_layout.cc chrome/browser/ui/views/frame/browser_view_layout.cc
index 18a85f436bd9..cf880936a8ed 100644
index 2bd298c830bec..47e5f851740a8 100644
--- chrome/browser/ui/views/frame/browser_view_layout.cc
+++ chrome/browser/ui/views/frame/browser_view_layout.cc
@@ -39,6 +39,10 @@
@ -297,7 +297,7 @@ index 18a85f436bd9..cf880936a8ed 100644
using views::View;
using web_modal::WebContentsModalDialogHost;
using web_modal::ModalDialogHostObserver;
@@ -441,6 +445,11 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) {
@@ -443,6 +447,11 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) {
int BrowserViewLayout::LayoutToolbar(int top) {
TRACE_EVENT0("ui", "BrowserViewLayout::LayoutToolbar");
@ -310,10 +310,10 @@ index 18a85f436bd9..cf880936a8ed 100644
bool toolbar_visible = delegate_->IsToolbarVisible();
int height = toolbar_visible ? toolbar_->GetPreferredSize().height() : 0;
diff --git chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
index 5e516ea5873c..b9890fbe050a 100644
index 140c0df49ea46..7d4ac470dcc9a 100644
--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
@@ -587,37 +587,53 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
@@ -591,37 +591,53 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
}
bool BrowserTabStripController::IsFrameCondensed() const {
@ -368,7 +368,7 @@ index 5e516ea5873c..b9890fbe050a 100644
}
diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc
index 7bc5cd3dabf7..ea706584db60 100644
index f290b0d5ea521..31ffa7e61e69f 100644
--- chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -162,12 +162,13 @@ auto& GetViewCommandMap() {
@ -397,10 +397,10 @@ index 7bc5cd3dabf7..ea706584db60 100644
size_animation_.Reset(1);
diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h
index 8346b612cfbe..d7fc5440af82 100644
index ec77ff5a0611a..0c8d95120d0c5 100644
--- chrome/browser/ui/views/toolbar/toolbar_view.h
+++ chrome/browser/ui/views/toolbar/toolbar_view.h
@@ -90,7 +90,8 @@ class ToolbarView : public views::AccessiblePaneView,
@@ -91,7 +91,8 @@ class ToolbarView : public views::AccessiblePaneView,
// needs to be displayed.
};

View File

@ -1,8 +1,8 @@
diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h
index 2619022a1d89c..572a495004def 100644
index d279815ed7dd1..de68b25583b37 100644
--- content/browser/devtools/devtools_instrumentation.h
+++ content/browser/devtools/devtools_instrumentation.h
@@ -89,7 +89,7 @@ bool ApplyUserAgentMetadataOverrides(
@@ -90,7 +90,7 @@ bool ApplyUserAgentMetadataOverrides(
FrameTreeNode* frame_tree_node,
absl::optional<blink::UserAgentMetadata>* override_out);
@ -47,10 +47,10 @@ index 57072bf1263ae..0a93446e4d21c 100644
blink::mojom::V8CacheOptions GetV8CacheOptions();
diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn
index 8003cd409ff37..8ac3fefade6de 100644
index 103fe625bb488..81c79036aa465 100644
--- third_party/blink/renderer/controller/BUILD.gn
+++ third_party/blink/renderer/controller/BUILD.gn
@@ -29,6 +29,7 @@ component("controller") {
@@ -33,6 +33,7 @@ component("controller") {
configs += [
"//build/config/compiler:noshadowing",
"//build/config/compiler:wexit_time_destructors",
@ -58,7 +58,7 @@ index 8003cd409ff37..8ac3fefade6de 100644
"//third_party/blink/renderer:config",
"//third_party/blink/renderer:inside_blink",
"//third_party/blink/renderer:non_test_config",
@@ -53,6 +54,8 @@ component("controller") {
@@ -57,6 +58,8 @@ component("controller") {
"performance_manager/v8_detailed_memory_reporter_impl.h",
"performance_manager/v8_worker_memory_reporter.cc",
"performance_manager/v8_worker_memory_reporter.h",

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/download/download_target_determiner.cc chrome/browser/download/download_target_determiner.cc
index 1891a950448c9..cf6cdb676edc9 100644
index 404fb702f46bd..fa460d245570c 100644
--- chrome/browser/download/download_target_determiner.cc
+++ chrome/browser/download/download_target_determiner.cc
@@ -677,7 +677,7 @@ void IsHandledBySafePlugin(int render_process_id,
@@ -683,7 +683,7 @@ void IsHandledBySafePlugin(int render_process_id,
content::PluginService* plugin_service =
content::PluginService::GetInstance();
bool plugin_found = plugin_service->GetPluginInfo(
@ -62,7 +62,7 @@ index 6e2d09885b457..da23a0211754b 100644
#endif
diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc
index dc4db573977d6..489ed518257c3 100644
index 18b58f53a9df7..80452f68f24fb 100644
--- content/browser/devtools/devtools_http_handler.cc
+++ content/browser/devtools/devtools_http_handler.cc
@@ -575,7 +575,7 @@ void DevToolsHttpHandler::OnJsonRequest(
@ -75,7 +75,7 @@ index dc4db573977d6..489ed518257c3 100644
GetContentClient()->browser()->GetUserAgent());
version.SetString("V8-Version", V8_VERSION_STRING);
diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc
index 42f62ccb3830b..5471182793dee 100644
index 33822b23dfb1e..0593095eb42f9 100644
--- content/browser/loader/navigation_url_loader_impl.cc
+++ content/browser/loader/navigation_url_loader_impl.cc
@@ -636,6 +636,13 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest(
@ -92,7 +92,7 @@ index 42f62ccb3830b..5471182793dee 100644
if (loader_factory) {
factory = base::MakeRefCounted<network::WrapperSharedURLLoaderFactory>(
std::move(loader_factory));
@@ -873,7 +880,7 @@ void NavigationURLLoaderImpl::CheckPluginAndContinueOnReceiveResponse(
@@ -869,7 +876,7 @@ void NavigationURLLoaderImpl::CheckPluginAndContinueOnReceiveResponse(
frame_tree_node->current_frame_host()->GetProcess()->GetID();
int routing_id = frame_tree_node->current_frame_host()->GetRoutingID();
bool has_plugin = PluginService::GetInstance()->GetPluginInfo(
@ -188,10 +188,10 @@ index 632ae86c6fd69..55b749ec12421 100644
const std::vector<WebPluginInfo>& all_plugins);
diff --git content/browser/renderer_host/render_frame_host_impl.cc content/browser/renderer_host/render_frame_host_impl.cc
index 714fd5889f254..9dc0414f02c55 100644
index 974823d53b583..f5d635cd92889 100644
--- content/browser/renderer_host/render_frame_host_impl.cc
+++ content/browser/renderer_host/render_frame_host_impl.cc
@@ -12008,6 +12008,7 @@ void RenderFrameHostImpl::BindHungDetectorHost(
@@ -12408,6 +12408,7 @@ void RenderFrameHostImpl::BindHungDetectorHost(
}
void RenderFrameHostImpl::GetPluginInfo(const GURL& url,
@ -199,7 +199,7 @@ index 714fd5889f254..9dc0414f02c55 100644
const url::Origin& main_frame_origin,
const std::string& mime_type,
GetPluginInfoCallback callback) {
@@ -12015,7 +12016,8 @@ void RenderFrameHostImpl::GetPluginInfo(const GURL& url,
@@ -12415,7 +12416,8 @@ void RenderFrameHostImpl::GetPluginInfo(const GURL& url,
WebPluginInfo info;
std::string actual_mime_type;
bool found = PluginServiceImpl::GetInstance()->GetPluginInfo(
@ -210,10 +210,10 @@ index 714fd5889f254..9dc0414f02c55 100644
std::move(callback).Run(found, info, actual_mime_type);
}
diff --git content/browser/renderer_host/render_frame_host_impl.h content/browser/renderer_host/render_frame_host_impl.h
index 8b5fc66305083..efe1b8ebc0549 100644
index 53cc68edc7fd7..b8b6698f65e9d 100644
--- content/browser/renderer_host/render_frame_host_impl.h
+++ content/browser/renderer_host/render_frame_host_impl.h
@@ -2559,6 +2559,7 @@ class CONTENT_EXPORT RenderFrameHostImpl
@@ -2611,6 +2611,7 @@ class CONTENT_EXPORT RenderFrameHostImpl
int32_t plugin_child_id,
const base::FilePath& path) override;
void GetPluginInfo(const GURL& url,
@ -234,7 +234,7 @@ index a544bfed7ed85..60aad01350c2f 100644
string mime_type) =>
(bool found,
diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc
index 997125e855c0f..c74b5c7f0d3a8 100644
index 0cf1f777dc5ff..5d6bf40de09b9 100644
--- content/public/browser/content_browser_client.cc
+++ content/public/browser/content_browser_client.cc
@@ -9,7 +9,7 @@
@ -247,7 +247,7 @@ index 997125e855c0f..c74b5c7f0d3a8 100644
#include <utility>
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
index 65638e207d6bf..b53028afd7809 100644
index bafb4cc0e7cdf..6f303d9866f18 100644
--- content/public/browser/content_browser_client.h
+++ content/public/browser/content_browser_client.h
@@ -33,6 +33,7 @@
@ -255,10 +255,10 @@ index 65638e207d6bf..b53028afd7809 100644
#include "content/public/browser/mojo_binder_policy_map.h"
#include "content/public/browser/storage_partition_config.h"
+#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui_browser_interface_broker_registry.h"
#include "content/public/common/page_visibility_state.h"
#include "content/public/common/window_container_type.mojom-forward.h"
#include "device/vr/buildflags/buildflags.h"
@@ -1766,6 +1767,14 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1780,6 +1781,14 @@ class CONTENT_EXPORT ContentBrowserClient {
const absl::optional<url::Origin>& initiating_origin,
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory);
@ -273,7 +273,7 @@ index 65638e207d6bf..b53028afd7809 100644
// Creates an OverlayWindow to be used for Picture-in-Picture. This window
// will house the content shown when in Picture-in-Picture mode. This will
// return a new OverlayWindow.
@@ -1839,6 +1848,10 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1853,6 +1862,10 @@ class CONTENT_EXPORT ContentBrowserClient {
// Used as part of the user agent string.
virtual std::string GetProduct();
@ -309,7 +309,7 @@ index 570b5a4738b94..923a5f7195c53 100644
WebPluginInfo* plugin) = 0;
diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h
index 7ec0901cf6ba2..db5b5529a4cda 100644
index b62158069f9a1..7470d6f49dac0 100644
--- content/public/renderer/content_renderer_client.h
+++ content/public/renderer/content_renderer_client.h
@@ -82,6 +82,9 @@ class CONTENT_EXPORT ContentRendererClient {
@ -334,10 +334,10 @@ index 7ec0901cf6ba2..db5b5529a4cda 100644
// started.
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc
index 9ba385b9f541d..859f9aa88f1e8 100644
index 173952d4545d5..2f311b988c380 100644
--- content/renderer/render_frame_impl.cc
+++ content/renderer/render_frame_impl.cc
@@ -3307,7 +3307,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
@@ -3306,7 +3306,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
WebPluginInfo info;
std::string mime_type;
bool found = false;
@ -348,10 +348,10 @@ index 9ba385b9f541d..859f9aa88f1e8 100644
&mime_type);
if (!found)
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
index 7e1d2199e024d..1a25e37314c8c 100644
index 52c02371bf373..3cd441e5d9a0d 100644
--- content/renderer/render_thread_impl.cc
+++ content/renderer/render_thread_impl.cc
@@ -609,6 +609,8 @@ void RenderThreadImpl::Init() {
@@ -610,6 +610,8 @@ void RenderThreadImpl::Init() {
GetContentClient()->renderer()->CreateURLLoaderThrottleProvider(
blink::URLLoaderThrottleProviderType::kFrame);
@ -361,10 +361,10 @@ index 7e1d2199e024d..1a25e37314c8c 100644
&RenderThreadImpl::OnRendererInterfaceReceiver, base::Unretained(this)));
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
index 272d5c2d7aa76..08cc3b31c2c4a 100644
index 337c630fc85f3..20abead97fe1d 100644
--- content/renderer/renderer_blink_platform_impl.cc
+++ content/renderer/renderer_blink_platform_impl.cc
@@ -1115,6 +1115,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
@@ -1101,6 +1101,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
//------------------------------------------------------------------------------
@ -381,10 +381,10 @@ index 272d5c2d7aa76..08cc3b31c2c4a 100644
if (!code_cache_host_) {
code_cache_host_ = mojo::SharedRemote<blink::mojom::CodeCacheHost>(
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
index 918400762b2bf..1a8f737074c61 100644
index b199c34615f02..43ced4c4d8cf5 100644
--- content/renderer/renderer_blink_platform_impl.h
+++ content/renderer/renderer_blink_platform_impl.h
@@ -259,6 +259,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -258,6 +258,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
const blink::WebURL& url,
blink::WebVector<blink::WebContentSecurityPolicyHeader>* csp) override;

View File

@ -123,7 +123,7 @@ index a26c5c2e053ed..c88c4c1b81f9b 100644
return RunContentProcess(params, runner.get());
}
diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc
index 095bc943529c3..a8c1febd913f8 100644
index 7e7a16e6f9cb1..1989de7847811 100644
--- content/app/content_main_runner_impl.cc
+++ content/app/content_main_runner_impl.cc
@@ -45,6 +45,7 @@

View File

@ -1,17 +1,17 @@
diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc
index d9cd3f7c287ad..834c345710aaf 100644
index dfa5022f7636e..fa880d2ea9acd 100644
--- components/embedder_support/user_agent_utils.cc
+++ components/embedder_support/user_agent_utils.cc
@@ -10,6 +10,7 @@
#include "base/strings/stringprintf.h"
@@ -12,6 +12,7 @@
#include "base/system/sys_info.h"
#include "build/branding_buildflags.h"
#include "build/build_config.h"
+#include "cef/libcef/common/cef_switches.h"
#include "components/embedder_support/switches.h"
#include "components/version_info/version_info.h"
#include "content/public/browser/web_contents.h"
@@ -23,6 +24,12 @@
namespace embedder_support {
@@ -113,6 +114,12 @@ std::string GetUniversalApiContractVersion() {
#endif // defined(OS_WIN)
std::string GetProduct() {
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();

View File

@ -195,7 +195,7 @@ index 0d21ebc927042..a08ebcbafc252 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 0bf4809cb6f60..fccf3478b8669 100644
index b6517195536df..8aaa645fcb0d5 100644
--- extensions/browser/process_manager.cc
+++ extensions/browser/process_manager.cc
@@ -393,9 +393,17 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension,

View File

@ -1,8 +1,8 @@
diff --git .gn .gn
index 64dbcb82086d9..2527fd74ed4b1 100644
index c89d504b288ba..3ae0eb3905db1 100644
--- .gn
+++ .gn
@@ -144,6 +144,8 @@ exec_script_whitelist =
@@ -145,6 +145,8 @@ exec_script_whitelist =
"//chrome/android/webapk/shell_apk/prepare_upload_dir/BUILD.gn",
@ -12,7 +12,7 @@ index 64dbcb82086d9..2527fd74ed4b1 100644
# https://crbug.com/474506.
"//clank/java/BUILD.gn",
diff --git BUILD.gn BUILD.gn
index 3bb7c2579c19c..8562b4bb02806 100644
index 0624ab1a07c89..030c497f8e2a2 100644
--- BUILD.gn
+++ BUILD.gn
@@ -16,6 +16,7 @@ import("//build/config/sanitizers/sanitizers.gni")
@ -23,7 +23,7 @@ index 3bb7c2579c19c..8562b4bb02806 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/browser/media/router/features.gni")
import("//components/nacl/features.gni")
@@ -263,6 +264,9 @@ group("gn_all") {
@@ -265,6 +266,9 @@ group("gn_all") {
deps += [ "//chrome/test:telemetry_perf_unittests${_target_suffix}" ]
}
}
@ -79,7 +79,7 @@ index d2266b28b33f8..a7ff6d9b68f38 100644
+_OBJC_METACLASS_$_UnderlayOpenGLHostingWindow
+
diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni
index b9dce47a02f58..70b11f9312fc8 100644
index a7056344778ec..322a3f313f63e 100644
--- chrome/chrome_paks.gni
+++ chrome/chrome_paks.gni
@@ -4,6 +4,7 @@
@ -152,18 +152,18 @@ index 51fa0d7f4cf77..2ede68e9377eb 100644
outputs = [
# See also chrome.packed.7z conditionally added below.
diff --git tools/grit/grit_defines.gni tools/grit/grit_defines.gni
index 0039f04a75ef2..32beb70d1b99c 100644
index 497bc384ee79f..85056a86edd2c 100644
--- tools/grit/grit_defines.gni
+++ tools/grit/grit_defines.gni
@@ -5,6 +5,7 @@
import("//build/config/chrome_build.gni")
@@ -6,6 +6,7 @@ import("//build/config/chrome_build.gni")
import("//build/config/chromeos/ui_mode.gni")
import("//build/config/crypto.gni")
import("//build/config/devtools.gni")
+import("//build/config/locales.gni")
import("//build/config/ui.gni")
grit_defines = [
@@ -111,6 +112,13 @@ if (is_android) {
shared_intermediate_dir = rebase_path(root_gen_dir, root_build_dir)
@@ -119,6 +120,13 @@ if (is_android) {
]
}

View File

@ -1,8 +1,8 @@
diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec
index 628fa47e4f253..a4dd6e2acfe15 100644
index 509687647e356..052818aaa2c7e 100644
--- tools/gritsettings/resource_ids.spec
+++ tools/gritsettings/resource_ids.spec
@@ -840,4 +840,13 @@
@@ -858,4 +858,13 @@
# Please read the header and find the right section above instead.
# Resource ids starting at 31000 are reserved for projects built on Chromium.

View File

@ -1,8 +1,8 @@
diff --git ui/base/ime/win/input_method_win_base.cc ui/base/ime/win/input_method_win_base.cc
index de4e2f8fa1761..3a60044e871fb 100644
index fd587926e4b4f..aae0143c6cd67 100644
--- ui/base/ime/win/input_method_win_base.cc
+++ ui/base/ime/win/input_method_win_base.cc
@@ -262,8 +262,9 @@ bool InputMethodWinBase::IsWindowFocused(const TextInputClient* client) const {
@@ -263,8 +263,9 @@ bool InputMethodWinBase::IsWindowFocused(const TextInputClient* client) const {
// receiving keyboard input as long as it is an active window. This works well
// even when the |attached_window_handle| becomes active but has not received
// WM_FOCUS yet.

View File

@ -0,0 +1,12 @@
diff --git third_party/maldoca/BUILD.gn third_party/maldoca/BUILD.gn
index 3fb5c5962c07b..20e5809263398 100644
--- third_party/maldoca/BUILD.gn
+++ third_party/maldoca/BUILD.gn
@@ -276,6 +276,7 @@ static_library("maldoca") {
"//third_party/boringssl",
"//third_party/libxml",
"//third_party/protobuf:protobuf_lite",
+ "//third_party/re2"
]
public_deps = [

View File

@ -12,10 +12,10 @@ index cdbc0273838e5..ee2809a0bb98a 100644
virtual ~WebContentsView() {}
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 2dc016e4be765..fb052a3a0bf21 100644
index b794ee4204fb8..ed1bb47c26758 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
@@ -211,6 +211,8 @@ void MimeHandlerViewGuest::CreateWebContents(
@@ -210,6 +210,8 @@ void MimeHandlerViewGuest::CreateWebContents(
WebContents::CreateParams params(browser_context(),
guest_site_instance.get());
params.guest_delegate = this;
@ -24,7 +24,7 @@ index 2dc016e4be765..fb052a3a0bf21 100644
// TODO(erikchen): Fix ownership semantics for guest views.
// https://crbug.com/832879.
std::move(callback).Run(
@@ -221,6 +223,10 @@ void MimeHandlerViewGuest::CreateWebContents(
@@ -220,6 +222,10 @@ void MimeHandlerViewGuest::CreateWebContents(
}
void MimeHandlerViewGuest::DidAttachToEmbedder() {
@ -35,7 +35,7 @@ index 2dc016e4be765..fb052a3a0bf21 100644
DCHECK(stream_->handler_url().SchemeIs(extensions::kExtensionScheme));
web_contents()->GetController().LoadURL(
stream_->handler_url(), content::Referrer(),
@@ -251,6 +257,11 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const {
@@ -250,6 +256,11 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const {
return true;
}
@ -48,10 +48,10 @@ index 2dc016e4be765..fb052a3a0bf21 100644
WebContents* source,
const content::OpenURLParams& params) {
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
index bb90319f768ed..b0ba7bfa08c03 100644
index 647a9bdf39c60..b620cca912b73 100644
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
@@ -130,6 +130,7 @@ class MimeHandlerViewGuest
@@ -139,6 +139,7 @@ class MimeHandlerViewGuest
void EmbedderFullscreenToggled(bool entered_fullscreen) final;
bool ZoomPropagatesFromEmbedderToGuest() const final;
bool ShouldDestroyOnDetach() const final;
@ -59,7 +59,7 @@ index bb90319f768ed..b0ba7bfa08c03 100644
// WebContentsDelegate implementation.
content::WebContents* OpenURLFromTab(
@@ -188,6 +189,7 @@ class MimeHandlerViewGuest
@@ -197,6 +198,7 @@ class MimeHandlerViewGuest
content::ChildProcessHost::kInvalidUniqueID, MSG_ROUTING_NONE};
int embedder_widget_routing_id_ = MSG_ROUTING_NONE;

View File

@ -10,10 +10,10 @@ index 96d1a51ec1078..e8120a818b1f2 100644
+// This load will not send any cookies. For CEF usage.
+LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 17)
diff --git net/url_request/url_request_http_job.cc net/url_request/url_request_http_job.cc
index a6cd1ef45ab03..4c947b9118e52 100644
index f892d0bcb280a..aedc381f6dbf4 100644
--- net/url_request/url_request_http_job.cc
+++ net/url_request/url_request_http_job.cc
@@ -561,7 +561,8 @@ void URLRequestHttpJob::AddCookieHeaderAndStart() {
@@ -562,7 +562,8 @@ void URLRequestHttpJob::AddCookieHeaderAndStart() {
// Read cookies whenever allow_credentials() is true, even if the PrivacyMode
// is being overridden by NetworkDelegate and will eventually block them, as
// blocked cookies still need to be logged in that case.
@ -24,7 +24,7 @@ index a6cd1ef45ab03..4c947b9118e52 100644
request_->force_ignore_site_for_cookies();
if (cookie_store->cookie_access_delegate() &&
diff --git services/network/public/cpp/resource_request.cc services/network/public/cpp/resource_request.cc
index e2e170ab85f39..0f4052dcd6767 100644
index 5fc02ead27db6..4e48070f18034 100644
--- services/network/public/cpp/resource_request.cc
+++ services/network/public/cpp/resource_request.cc
@@ -253,7 +253,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {

View File

@ -41,10 +41,10 @@ index cc4b13a7b9c67..84f3b9ed7cf49 100644
} // namespace content
diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc
index ebb771918923b..db13c44cd2738 100644
index d04421d235a08..91d67fefd4274 100644
--- content/browser/renderer_host/render_widget_host_impl.cc
+++ content/browser/renderer_host/render_widget_host_impl.cc
@@ -3110,6 +3110,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() {
@@ -3119,6 +3119,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() {
GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE);
}
@ -57,10 +57,10 @@ index ebb771918923b..db13c44cd2738 100644
const WebInputEvent& event) {
if ((base::FeatureList::IsEnabled(
diff --git content/browser/renderer_host/render_widget_host_impl.h content/browser/renderer_host/render_widget_host_impl.h
index d082d920c4124..b588cb681c4e8 100644
index 42ee281d4f743..39def42840256 100644
--- content/browser/renderer_host/render_widget_host_impl.h
+++ content/browser/renderer_host/render_widget_host_impl.h
@@ -762,6 +762,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
@@ -766,6 +766,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
void ProgressFlingIfNeeded(base::TimeTicks current_time);
void StopFling();

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/download/download_prefs.cc chrome/browser/download/download_prefs.cc
index 50aec56adb4b6..c36996e06ebee 100644
index 8f2e9445c9207..eccf2a3684650 100644
--- chrome/browser/download/download_prefs.cc
+++ chrome/browser/download/download_prefs.cc
@@ -24,6 +24,7 @@
@ -127,7 +127,7 @@ index 920f646f06484..76c0b5e5ee04b 100644
$i18n{cancel}
</cr-button>
diff --git chrome/browser/ui/webui/constrained_web_dialog_ui.cc chrome/browser/ui/webui/constrained_web_dialog_ui.cc
index dd3512b303c40..0627aa331492c 100644
index 1b6b4e93b45d2..b51f277453529 100644
--- chrome/browser/ui/webui/constrained_web_dialog_ui.cc
+++ chrome/browser/ui/webui/constrained_web_dialog_ui.cc
@@ -26,6 +26,8 @@

View File

@ -11,10 +11,10 @@ index 2824b97e715a4..7207b58654e49 100644
PrintJobWorker::~PrintJobWorker() {
diff --git printing/printing_context.h printing/printing_context.h
index 5c300fa414fbb..84da337deeca4 100644
index 753bc1d564d60..b80641b465217 100644
--- printing/printing_context.h
+++ printing/printing_context.h
@@ -133,6 +133,13 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
@@ -149,6 +149,13 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
int job_id() const { return job_id_; }
@ -28,7 +28,7 @@ index 5c300fa414fbb..84da337deeca4 100644
protected:
explicit PrintingContext(Delegate* delegate);
@@ -156,6 +163,10 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
@@ -176,6 +183,10 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
// The job id for the current job. The value is 0 if no jobs are active.
int job_id_;

View File

@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_view_host_impl.cc content/browser/renderer_host/render_view_host_impl.cc
index 9786cb8ef6633..33f8b8bffd127 100644
index af75828e89e8c..c7742fb2aa69d 100644
--- content/browser/renderer_host/render_view_host_impl.cc
+++ content/browser/renderer_host/render_view_host_impl.cc
@@ -612,6 +612,8 @@ bool RenderViewHostImpl::IsRenderViewLive() {
@@ -624,6 +624,8 @@ bool RenderViewHostImpl::IsRenderViewLive() {
}
void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {

View File

@ -1,11 +1,11 @@
diff --git ui/base/resource/resource_bundle.cc ui/base/resource/resource_bundle.cc
index 276ef65251647..bf2a3e07b98ce 100644
index 65585cd5cb5a5..d5d669f2a63dc 100644
--- ui/base/resource/resource_bundle.cc
+++ ui/base/resource/resource_bundle.cc
@@ -838,6 +838,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate)
: delegate_(delegate),
locale_resources_data_lock_(new base::Lock),
max_scale_factor_(SCALE_FACTOR_100P) {
max_scale_factor_(k100Percent) {
+ // With CEF's multi-threaded mode the ResourceBundle may be created on the
+ // main thread and then accessed on the UI thread. Allow the SequenceChecker
+ // to re-bind on the UI thread when CalledOnValidSequence() is called for the
@ -28,7 +28,7 @@ index 276ef65251647..bf2a3e07b98ce 100644
void ResourceBundle::InitSharedInstance(Delegate* delegate) {
DCHECK(g_shared_instance_ == nullptr) << "ResourceBundle initialized twice";
diff --git ui/base/resource/resource_bundle.h ui/base/resource/resource_bundle.h
index c1aee3d5f8557..215073ae0e712 100644
index 21274f68fb04d..0e134919b3b8b 100644
--- ui/base/resource/resource_bundle.h
+++ ui/base/resource/resource_bundle.h
@@ -191,6 +191,11 @@ class COMPONENT_EXPORT(UI_BASE) ResourceBundle {

View File

@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc
index 9ea3f7da129a0..d0e7f9ffcd10a 100644
index 28e9a059a5c22..f9de44e10828f 100644
--- content/browser/renderer_host/render_widget_host_view_aura.cc
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -645,10 +645,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() {
@@ -656,10 +656,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() {
void RenderWidgetHostViewAura::UpdateBackgroundColor() {
DCHECK(GetBackgroundColor());
@ -19,7 +19,7 @@ index 9ea3f7da129a0..d0e7f9ffcd10a 100644
}
absl::optional<DisplayFeature> RenderWidgetHostViewAura::GetDisplayFeature() {
@@ -2089,6 +2091,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
@@ -2113,6 +2115,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
// This needs to happen only after |window_| has been initialized using
// Init(), because it needs to have the layer.
window_->SetEmbedFrameSinkId(frame_sink_id_);

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/net/profile_network_context_service.cc chrome/browser/net/profile_network_context_service.cc
index 77573496f3548..2ac1f3ea101f9 100644
index edbc03f9230de..cc0926c573325 100644
--- chrome/browser/net/profile_network_context_service.cc
+++ chrome/browser/net/profile_network_context_service.cc
@@ -21,6 +21,7 @@
@ -10,7 +10,7 @@ index 77573496f3548..2ac1f3ea101f9 100644
#include "chrome/browser/browser_process.h"
#include "chrome/browser/content_settings/cookie_settings_factory.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
@@ -673,7 +674,19 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
@@ -678,7 +679,19 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
// Configure on-disk storage for non-OTR profiles. OTR profiles just use
// default behavior (in memory storage, default sizes).
@ -31,21 +31,21 @@ index 77573496f3548..2ac1f3ea101f9 100644
PrefService* local_state = g_browser_process->local_state();
// Configure the HTTP cache path and size.
base::FilePath base_cache_path;
@@ -686,7 +699,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
@@ -691,7 +704,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
base_cache_path.Append(chrome::kCacheDirname);
network_context_params->http_cache_max_size =
local_state->GetInteger(prefs::kDiskCacheSize);
+ }
+ if (!in_memory) {
// Currently this just contains HttpServerProperties, but that will likely
// change.
network_context_params->http_server_properties_path =
network_context_params->file_paths =
::network::mojom::NetworkContextFilePaths::New();
diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc
index f13f2ce613379..729c48c808342 100644
index b30a5ea775156..f381fe0540c93 100644
--- net/cookies/cookie_monster.cc
+++ net/cookies/cookie_monster.cc
@@ -506,6 +506,25 @@ void CookieMonster::SetCookieableSchemes(
@@ -505,6 +505,25 @@ void CookieMonster::SetCookieableSchemes(
MaybeRunCookieCallback(std::move(callback), true);
}
@ -72,7 +72,7 @@ index f13f2ce613379..729c48c808342 100644
void CookieMonster::SetPersistSessionCookies(bool persist_session_cookies) {
DCHECK(thread_checker_.CalledOnValidThread());
diff --git net/cookies/cookie_monster.h net/cookies/cookie_monster.h
index 8439ba30a162d..6170ffa6110ff 100644
index ad50ff33792ab..617c6d9061806 100644
--- net/cookies/cookie_monster.h
+++ net/cookies/cookie_monster.h
@@ -181,6 +181,8 @@ class NET_EXPORT CookieMonster : public CookieStore {
@ -85,10 +85,10 @@ index 8439ba30a162d..6170ffa6110ff 100644
// Enables writing session cookies into the cookie database. If this this
// method is called, it must be called before first use of the instance
diff --git net/cookies/cookie_store.h net/cookies/cookie_store.h
index 0642e632dedce..1e8be4703de44 100644
index ea17ea39baead..9669ed0f908a7 100644
--- net/cookies/cookie_store.h
+++ net/cookies/cookie_store.h
@@ -155,6 +155,11 @@ class NET_EXPORT CookieStore {
@@ -149,6 +149,11 @@ class NET_EXPORT CookieStore {
// Transfer ownership of a CookieAccessDelegate.
void SetCookieAccessDelegate(std::unique_ptr<CookieAccessDelegate> delegate);
@ -97,9 +97,9 @@ index 0642e632dedce..1e8be4703de44 100644
+ virtual void AddCookieableSchemes(const std::vector<std::string>& schemes,
+ SetCookieableSchemesCallback callback) = 0;
+
// Reports the estimate of dynamically allocated memory in bytes.
virtual void DumpMemoryStats(base::trace_event::ProcessMemoryDump* pmd,
const std::string& parent_absolute_name) const;
// This may be null if no delegate has been set yet, or the delegate has been
// reset to null.
const CookieAccessDelegate* cookie_access_delegate() const {
diff --git services/network/cookie_manager.cc services/network/cookie_manager.cc
index a397306372054..8a1bacea8d70c 100644
--- services/network/cookie_manager.cc
@ -123,10 +123,10 @@ index a397306372054..8a1bacea8d70c 100644
void CookieManager::SetForceKeepSessionState() {
diff --git services/network/network_context.cc services/network/network_context.cc
index 7c64f63ad0661..fc7c495dedd62 100644
index 188fe601bdf59..bfe5b8e921eb5 100644
--- services/network/network_context.cc
+++ services/network/network_context.cc
@@ -2054,16 +2054,27 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
@@ -2141,16 +2141,27 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
network_service_->network_quality_estimator());
}
@ -157,10 +157,10 @@ index 7c64f63ad0661..fc7c495dedd62 100644
trust_token_store_ = std::make_unique<PendingTrustTokenStore>();
diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom
index 409b43c0bf005..fcc1a0a15a8f7 100644
index 84b2e4eee90b1..0646b81a9235f 100644
--- services/network/public/mojom/network_context.mojom
+++ services/network/public/mojom/network_context.mojom
@@ -250,6 +250,9 @@ struct NetworkContextParams {
@@ -298,6 +298,9 @@ struct NetworkContextParams {
// cookies. Otherwise it should be false.
bool persist_session_cookies = false;

View File

@ -1,8 +1,8 @@
diff --git content/browser/storage_partition_impl.cc content/browser/storage_partition_impl.cc
index 5edf24182bc5a..8fed55299bacf 100644
index de63186ea911e..4beccce527c86 100644
--- content/browser/storage_partition_impl.cc
+++ content/browser/storage_partition_impl.cc
@@ -500,10 +500,6 @@ class LoginHandlerDelegate {
@@ -498,10 +498,6 @@ class LoginHandlerDelegate {
}
WebContents* web_contents = web_contents_getter_.Run();
@ -13,7 +13,7 @@ index 5edf24182bc5a..8fed55299bacf 100644
// WeakPtr is not strictly necessary here due to OnRequestCancelled.
creating_login_delegate_ = true;
@@ -556,12 +552,6 @@ void OnAuthRequiredContinuation(
@@ -552,12 +548,6 @@ void OnAuthRequiredContinuation(
mojo::PendingRemote<network::mojom::AuthChallengeResponder>
auth_challenge_responder,
base::RepeatingCallback<WebContents*(void)> web_contents_getter) {
@ -23,10 +23,10 @@ index 5edf24182bc5a..8fed55299bacf 100644
- auth_challenge_responder_remote->OnAuthCredentials(absl::nullopt);
- return;
- }
new LoginHandlerDelegate(std::move(auth_challenge_responder),
std::move(web_contents_getter), auth_info,
is_request_for_main_frame, process_id, routing_id,
@@ -2712,8 +2702,12 @@ void StoragePartitionImpl::GetQuotaSettings(
new LoginHandlerDelegate(
std::move(auth_challenge_responder), std::move(web_contents_getter),
auth_info, is_request_for_main_frame, process_id, request_id, url,
@@ -2689,8 +2679,12 @@ void StoragePartitionImpl::GetQuotaSettings(
return;
}
@ -40,7 +40,7 @@ index 5edf24182bc5a..8fed55299bacf 100644
storage::GetDefaultDeviceInfoHelper(), std::move(callback));
}
@@ -2726,6 +2720,11 @@ void StoragePartitionImpl::InitNetworkContext() {
@@ -2703,6 +2697,11 @@ void StoragePartitionImpl::InitNetworkContext() {
GetContentClient()->browser()->ConfigureNetworkContextParams(
browser_context_, is_in_memory(), relative_partition_path_,
context_params.get(), cert_verifier_creation_params.get());

View File

@ -1,8 +1,8 @@
diff --git ui/views/controls/native/native_view_host.cc ui/views/controls/native/native_view_host.cc
index 1a85a7b4a8305..66817eaecd86b 100644
index 91e9eac1fcf71..05b668948c02f 100644
--- ui/views/controls/native/native_view_host.cc
+++ ui/views/controls/native/native_view_host.cc
@@ -161,7 +161,7 @@ void NativeViewHost::OnPaint(gfx::Canvas* canvas) {
@@ -163,7 +163,7 @@ void NativeViewHost::OnPaint(gfx::Canvas* canvas) {
// It would be nice if this used some approximation of the page's
// current background color.
if (native_wrapper_->HasInstalledClip())
@ -39,10 +39,10 @@ index 3ed75e4c9b11e..c4a7318de5dd7 100644
};
diff --git ui/views/controls/webview/webview.cc ui/views/controls/webview/webview.cc
index 75c1f03c6efff..5ed55bb974958 100644
index 4423a94572577..a8842513d2db0 100644
--- ui/views/controls/webview/webview.cc
+++ ui/views/controls/webview/webview.cc
@@ -131,6 +131,10 @@ void WebView::EnableSizingFromWebContents(const gfx::Size& min_size,
@@ -132,6 +132,10 @@ void WebView::EnableSizingFromWebContents(const gfx::Size& min_size,
MaybeEnableAutoResize(web_contents()->GetMainFrame());
}
@ -54,7 +54,7 @@ index 75c1f03c6efff..5ed55bb974958 100644
if (crashed_overlay_view_ == crashed_overlay_view)
return;
diff --git ui/views/controls/webview/webview.h ui/views/controls/webview/webview.h
index 71883873f5028..def24d95736fb 100644
index 5bac066d8bcd9..9463256ca86f6 100644
--- ui/views/controls/webview/webview.h
+++ ui/views/controls/webview/webview.h
@@ -78,6 +78,10 @@ class WEBVIEW_EXPORT WebView : public View,

View File

@ -13,7 +13,7 @@ index 4960b1067e1c4..2686fa5bc550b 100644
{base::MayBlock(), base::TaskPriority::USER_VISIBLE,
base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN});
diff --git content/browser/browser_context.cc content/browser/browser_context.cc
index f7a2f30d3748a..098ff6540d8ea 100644
index 02e748a415afc..3434a329847e1 100644
--- content/browser/browser_context.cc
+++ content/browser/browser_context.cc
@@ -137,7 +137,7 @@ StoragePartition* BrowserContext::GetStoragePartition(
@ -25,7 +25,7 @@ index f7a2f30d3748a..098ff6540d8ea 100644
// An off the record profile MUST only use in memory storage partitions.
CHECK(storage_partition_config.in_memory());
}
@@ -387,7 +387,8 @@ BrowserContext::CreateVideoDecodePerfHistory() {
@@ -388,7 +388,8 @@ BrowserContext::CreateVideoDecodePerfHistory() {
const bool kUseInMemoryDBDefault = false;
bool use_in_memory_db = base::GetFieldTrialParamByFeatureAsBool(
media::kMediaCapabilitiesWithParameters, kUseInMemoryDBParamName,

View File

@ -1,5 +1,5 @@
diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h
index 81dea0e4a02ae..01a63782f6713 100644
index 702ac1a546463..c3844be6462cd 100644
--- base/trace_event/builtin_categories.h
+++ base/trace_event/builtin_categories.h
@@ -61,6 +61,8 @@

View File

@ -43,7 +43,7 @@ index f095bfc301151..f4eab5e49b61c 100644
virtual void MenuWillShow() {}
diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc
index 32efa9df61814..3b06181586935 100644
index dd24fd131a50d..3b8c7e04a0d21 100644
--- ui/gfx/render_text.cc
+++ ui/gfx/render_text.cc
@@ -650,6 +650,14 @@ void RenderText::SetWhitespaceElision(absl::optional<bool> whitespace_elision) {
@ -61,7 +61,7 @@ index 32efa9df61814..3b06181586935 100644
void RenderText::SetDisplayRect(const Rect& r) {
if (r != display_rect_) {
display_rect_ = r;
@@ -2035,6 +2043,19 @@ void RenderText::OnTextAttributeChanged() {
@@ -1994,6 +2002,19 @@ void RenderText::OnTextAttributeChanged() {
layout_text_up_to_date_ = false;
@ -82,7 +82,7 @@ index 32efa9df61814..3b06181586935 100644
}
diff --git ui/gfx/render_text.h ui/gfx/render_text.h
index 78e0d9ca85c02..937e627edc00a 100644
index bb01b826dbe52..642ab5609368a 100644
--- ui/gfx/render_text.h
+++ ui/gfx/render_text.h
@@ -343,6 +343,10 @@ class GFX_EXPORT RenderText {
@ -96,7 +96,7 @@ index 78e0d9ca85c02..937e627edc00a 100644
const Rect& display_rect() const { return display_rect_; }
void SetDisplayRect(const Rect& r);
@@ -1049,6 +1053,8 @@ class GFX_EXPORT RenderText {
@@ -1052,6 +1056,8 @@ class GFX_EXPORT RenderText {
// Tell whether or not the |layout_text_| needs an update or is up to date.
mutable bool layout_text_up_to_date_ = false;
@ -238,10 +238,10 @@ index 5bad0a8cd8cbc..da57021f0cefa 100644
std::unique_ptr<SelectionController> selection_controller_;
diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc
index 84332b5e94401..cf92a29a823c9 100644
index 6905cbd8354ef..86d56579b066a 100644
--- ui/views/controls/menu/menu_controller.cc
+++ ui/views/controls/menu/menu_controller.cc
@@ -2804,8 +2804,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem(
@@ -2852,8 +2852,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem(
void MenuController::OpenSubmenuChangeSelectionIfCan() {
MenuItemView* item = pending_state_.item;
@ -256,7 +256,7 @@ index 84332b5e94401..cf92a29a823c9 100644
MenuItemView* to_select = nullptr;
if (!item->GetSubmenu()->GetMenuItems().empty())
to_select = FindInitialSelectableMenuItem(item, INCREMENT_SELECTION_DOWN);
@@ -2824,8 +2829,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
@@ -2872,8 +2877,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
void MenuController::CloseSubmenu() {
MenuItemView* item = state_.item;
DCHECK(item);
@ -465,33 +465,32 @@ index 713b41c83e923..6f5502a98ea65 100644
content_view_->GetMenuItem()->GetMenuController()->GetAnchorPosition());
diff --git ui/views/test/ui_controls_factory_desktop_aurax11.cc ui/views/test/ui_controls_factory_desktop_aurax11.cc
index 64e09ff4359a8..714e8e9ff6610 100644
index e467f11ada887..be8545f3b39a2 100644
--- ui/views/test/ui_controls_factory_desktop_aurax11.cc
+++ ui/views/test/ui_controls_factory_desktop_aurax11.cc
@@ -89,10 +89,6 @@ class UIControlsDesktopX11 : public UIControlsAura {
@@ -89,9 +89,6 @@ class UIControlsDesktopX11 : public UIControlsAura {
aura::test::QueryLatestMousePositionRequestInHost(host);
host->ConvertPixelsToDIP(&root_current_location);
- auto* screen = views::test::TestDesktopScreenX11::GetInstance();
- DCHECK_EQ(screen, display::Screen::GetScreen());
- screen->set_cursor_screen_point(gfx::Point(screen_x, screen_y));
- auto* screen = display::Screen::GetScreen();
- screen->SetCursorScreenPointForTesting(gfx::Point(screen_x, screen_y));
-
if (root_location != root_current_location &&
x11_ui_controls_test_helper_.ButtonDownMask() == 0) {
// Move the cursor because EnterNotify/LeaveNotify are generated with the
diff --git ui/views/view.h ui/views/view.h
index e18f104b8c075..2f2e22dc97910 100644
index f5f5e2db9ed4e..fc1b401d1fefd 100644
--- ui/views/view.h
+++ ui/views/view.h
@@ -20,6 +20,7 @@
#include "base/compiler_specific.h"
@@ -21,6 +21,7 @@
#include "base/gtest_prod_util.h"
#include "base/memory/ptr_util.h"
#include "base/strings/string_piece.h"
+#include "base/supports_user_data.h"
#include "build/build_config.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "third_party/skia/include/core/SkPath.h"
@@ -268,7 +269,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
@@ -269,7 +270,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
public ui::EventTarget,
public ui::EventHandler,
public ui::PropertyHandler,

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 beaa6476fe5d8..beb1179214223 100644
index 5b3c9569f3672..c3db00a555940 100644
--- content/browser/renderer_host/render_widget_host_view_base.cc
+++ content/browser/renderer_host/render_widget_host_view_base.cc
@@ -638,6 +638,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() {
@@ -618,6 +618,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() {
return screen_info.device_scale_factor;
}
@ -18,10 +18,10 @@ index beaa6476fe5d8..beb1179214223 100644
if (!GetMouseWheelPhaseHandler())
return;
diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h
index 21669355ec8d1..e0dd842c5a69c 100644
index c30a5715f47f4..2a059a783efb4 100644
--- content/browser/renderer_host/render_widget_host_view_base.h
+++ content/browser/renderer_host/render_widget_host_view_base.h
@@ -67,6 +67,7 @@ class CursorManager;
@@ -68,6 +68,7 @@ class CursorManager;
class MouseWheelPhaseHandler;
class RenderWidgetHostImpl;
class RenderWidgetHostViewBaseObserver;
@ -29,7 +29,7 @@ index 21669355ec8d1..e0dd842c5a69c 100644
class SyntheticGestureTarget;
class TextInputManager;
class TouchSelectionControllerClientManager;
@@ -129,6 +130,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -130,6 +131,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
const gfx::Size& max_size) override;
void DisableAutoResize(const gfx::Size& new_size) override;
float GetDeviceScaleFactor() final;
@ -38,9 +38,9 @@ index 21669355ec8d1..e0dd842c5a69c 100644
TouchSelectionControllerClientManager*
GetTouchSelectionControllerClientManager() override;
void SetRecordContentToVisibleTimeRequest(
@@ -426,6 +429,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
virtual void InitAsPopup(RenderWidgetHostView* parent_host_view,
const gfx::Rect& bounds) = 0;
@@ -430,6 +433,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
const gfx::Rect& bounds,
const gfx::Rect& anchor_rect) = 0;
+ // Perform all the initialization steps necessary for this object to represent
+ // the platform widget owned by |guest_view| and embedded in
@ -51,7 +51,7 @@ index 21669355ec8d1..e0dd842c5a69c 100644
// Sets the cursor for this view to the one associated with the specified
// cursor_type.
virtual void UpdateCursor(const WebCursor& cursor) = 0;
@@ -613,6 +622,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -621,6 +630,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
TooltipObserver* tooltip_observer_for_testing_ = nullptr;
@ -63,10 +63,10 @@ index 21669355ec8d1..e0dd842c5a69c 100644
FRIEND_TEST_ALL_PREFIXES(
BrowserSideFlingBrowserTest,
diff --git content/browser/renderer_host/render_widget_host_view_event_handler.cc content/browser/renderer_host/render_widget_host_view_event_handler.cc
index 9043a181d4c04..a72a96e015e9d 100644
index c1d9d56076d33..3a7dea0a8134c 100644
--- content/browser/renderer_host/render_widget_host_view_event_handler.cc
+++ content/browser/renderer_host/render_widget_host_view_event_handler.cc
@@ -49,6 +49,10 @@ namespace {
@@ -53,6 +53,10 @@ namespace {
// of the border area, in percentage of the corresponding dimension.
const int kMouseLockBorderPercentage = 15;
@ -77,7 +77,7 @@ index 9043a181d4c04..a72a96e015e9d 100644
#if defined(OS_WIN)
// A callback function for EnumThreadWindows to enumerate and dismiss
// any owned popup windows.
@@ -834,6 +838,14 @@ void RenderWidgetHostViewEventHandler::MoveCursorToCenter(
@@ -838,6 +842,14 @@ void RenderWidgetHostViewEventHandler::MoveCursorToCenter(
}
return;
}
@ -92,7 +92,7 @@ index 9043a181d4c04..a72a96e015e9d 100644
#endif
synthetic_move_position_ = center_in_screen;
}
@@ -863,6 +875,17 @@ bool RenderWidgetHostViewEventHandler::MatchesSynthesizedMovePosition(
@@ -867,6 +879,17 @@ bool RenderWidgetHostViewEventHandler::MatchesSynthesizedMovePosition(
}
void RenderWidgetHostViewEventHandler::SetKeyboardFocus() {
@ -130,10 +130,10 @@ index 7a8ceb1916434..01d0ca9a19316 100644
// Set the view's active state (i.e., tint state of controls).
virtual void SetActive(bool active) = 0;
diff --git ui/platform_window/x11/x11_window.cc ui/platform_window/x11/x11_window.cc
index 9d0bc6966680f..152c6f01059b6 100644
index 030c1e3c4ade5..d4776e596f250 100644
--- ui/platform_window/x11/x11_window.cc
+++ ui/platform_window/x11/x11_window.cc
@@ -1671,7 +1671,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) {
@@ -1677,7 +1677,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) {
req.border_pixel = 0;
bounds_in_pixels_ = SanitizeBounds(bounds);
@ -144,7 +144,7 @@ index 9d0bc6966680f..152c6f01059b6 100644
req.y = bounds_in_pixels_.y();
req.width = bounds_in_pixels_.width();
diff --git ui/views/widget/desktop_aura/desktop_screen_win.cc ui/views/widget/desktop_aura/desktop_screen_win.cc
index 7c352dd0d992d..cf1a0c3e6db63 100644
index 7c352dd0d992d..516623a91b0e1 100644
--- ui/views/widget/desktop_aura/desktop_screen_win.cc
+++ ui/views/widget/desktop_aura/desktop_screen_win.cc
@@ -20,6 +20,8 @@ DesktopScreenWin::~DesktopScreenWin() {
@ -157,7 +157,7 @@ index 7c352dd0d992d..cf1a0c3e6db63 100644
return host ? host->GetAcceleratedWidget() : nullptr;
}
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc
index 6e09038a0fffa..0400f99c5de22 100644
index 9f61fc0b83a1e..97cd9c64e341c 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc
@@ -226,6 +226,18 @@ Widget::MoveLoopResult DesktopWindowTreeHostLinux::RunMoveLoop(
@ -179,7 +179,7 @@ index 6e09038a0fffa..0400f99c5de22 100644
void DesktopWindowTreeHostLinux::DispatchEvent(ui::Event* event) {
// In Windows, the native events sent to chrome are separated into client
// and non-client versions of events, which we record on our LocatedEvent
@@ -358,6 +370,8 @@ void DesktopWindowTreeHostLinux::AddAdditionalInitProperties(
@@ -367,6 +379,8 @@ void DesktopWindowTreeHostLinux::AddAdditionalInitProperties(
properties->wm_class_class = params.wm_class_class;
properties->wm_role_name = params.wm_role_name;
@ -189,10 +189,10 @@ index 6e09038a0fffa..0400f99c5de22 100644
properties->x11_extension_delegate = this;
}
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h
index dec3dd21f77b2..5c22c512e002e 100644
index fe31ecc51be14..7167a1918c671 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h
@@ -77,6 +77,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux
@@ -78,6 +78,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux
ui::DeskExtension* GetDeskExtension();
const ui::DeskExtension* GetDeskExtension() const;
@ -201,7 +201,7 @@ index dec3dd21f77b2..5c22c512e002e 100644
protected:
// Overridden from DesktopWindowTreeHost:
void Init(const Widget::InitParams& params) override;
@@ -87,6 +89,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux
@@ -88,6 +90,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux
const gfx::Vector2d& drag_offset,
Widget::MoveLoopSource source,
Widget::MoveLoopEscapeBehavior escape_behavior) override;
@ -210,7 +210,7 @@ index dec3dd21f77b2..5c22c512e002e 100644
// PlatformWindowDelegate:
void DispatchEvent(ui::Event* event) override;
@@ -142,6 +146,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux
@@ -144,6 +148,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux
// destroyed.
static std::list<gfx::AcceleratedWidget>* open_windows_;
@ -220,8 +220,23 @@ index dec3dd21f77b2..5c22c512e002e 100644
// The display and the native X window hosting the root window.
base::WeakPtrFactory<DesktopWindowTreeHostLinux> weak_factory_{this};
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
index 4392d37788528..160e6de131fc8 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
@@ -213,8 +213,8 @@ void DesktopWindowTreeHostPlatform::Init(const Widget::InitParams& params) {
if (properties.parent_widget) {
window_parent_ = DesktopWindowTreeHostPlatform::GetHostForWidget(
properties.parent_widget);
- DCHECK(window_parent_);
- window_parent_->window_children_.insert(this);
+ if (window_parent_)
+ window_parent_->window_children_.insert(this);
}
// Calculate initial bounds.
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 042fb2b5d1653..5ee040b8c26f4 100644
index 17668789847d1..92b6f9afe9688 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -180,8 +180,12 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) {
@ -272,7 +287,7 @@ index db1299089169f..a9c331c37b210 100644
// a reference.
corewm::TooltipWin* tooltip_;
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
index 37047c631afc3..aafa6a6fd0b38 100644
index 892f47b000354..e17a309bd4174 100644
--- ui/views/widget/widget.cc
+++ ui/views/widget/widget.cc
@@ -359,7 +359,8 @@ void Widget::Init(InitParams params) {
@ -299,7 +314,7 @@ index 37047c631afc3..aafa6a6fd0b38 100644
}
native_theme_observation_.Observe(GetNativeTheme());
@@ -1418,10 +1424,16 @@ void Widget::OnNativeWidgetDestroyed() {
@@ -1421,10 +1427,16 @@ void Widget::OnNativeWidgetDestroyed() {
}
gfx::Size Widget::GetMinimumSize() const {
@ -358,7 +373,7 @@ index c23259757d984..450b2610e34d1 100644
if (native_widget_delegate->IsDialogBox()) {
*style |= DS_MODALFRAME;
diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc
index c471f43c6da9e..251e2b2089bde 100644
index 21e96caaa8753..5347eee3eefcf 100644
--- ui/views/win/hwnd_message_handler.cc
+++ ui/views/win/hwnd_message_handler.cc
@@ -3117,10 +3117,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,

View File

@ -80,7 +80,7 @@ index 1026b739d283f..fe562ab60ce98 100644
private:
const HWND hwnd_;
diff --git components/viz/service/BUILD.gn components/viz/service/BUILD.gn
index f0eb025056501..823b7fcb55efc 100644
index 34dad16dac566..9618bc3c55fdb 100644
--- components/viz/service/BUILD.gn
+++ components/viz/service/BUILD.gn
@@ -208,6 +208,8 @@ viz_component("service") {

View File

@ -1,5 +1,5 @@
diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc
index 3170d101acf0b..8a15712e741b8 100644
index 55a636ca71a25..41dcccd02b4fa 100644
--- content/browser/web_contents/web_contents_impl.cc
+++ content/browser/web_contents/web_contents_impl.cc
@@ -2881,6 +2881,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@ -39,7 +39,7 @@ index 3170d101acf0b..8a15712e741b8 100644
std::unique_ptr<WebContentsImpl> new_contents;
if (!is_guest) {
create_params.context = view_->GetNativeView();
@@ -7531,6 +7547,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
@@ -7500,6 +7516,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
// This is an outermost WebContents.
SetAsFocusedWebContentsIfNecessary();
}
@ -50,7 +50,7 @@ index 3170d101acf0b..8a15712e741b8 100644
void WebContentsImpl::DidCallFocus() {
diff --git content/public/browser/web_contents.cc content/public/browser/web_contents.cc
index f1dcf53ea481b..192f7c0ddd04f 100644
index e40e14fd4913f..2ca3b08277e3d 100644
--- content/public/browser/web_contents.cc
+++ content/public/browser/web_contents.cc
@@ -29,6 +29,7 @@ WebContents::CreateParams::CreateParams(BrowserContext* context,
@ -62,10 +62,10 @@ index f1dcf53ea481b..192f7c0ddd04f 100644
WebContents::CreateParams::CreateParams(const CreateParams& other) = default;
diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h
index 0ccd96cb9b840..26ba3f571e343 100644
index aa3ecdb440db8..bedc9eee352f0 100644
--- content/public/browser/web_contents.h
+++ content/public/browser/web_contents.h
@@ -85,10 +85,12 @@ class BrowserContext;
@@ -86,10 +86,12 @@ class BrowserContext;
class BrowserPluginGuestDelegate;
class RenderFrameHost;
class RenderViewHost;
@ -78,7 +78,7 @@ index 0ccd96cb9b840..26ba3f571e343 100644
class WebUI;
struct DropData;
struct MHTMLGenerationParams;
@@ -221,6 +223,10 @@ class WebContents : public PageNavigator,
@@ -222,6 +224,10 @@ class WebContents : public PageNavigator,
// Sandboxing flags set on the new WebContents.
network::mojom::WebSandboxFlags starting_sandbox_flags;
@ -122,7 +122,7 @@ index a0da74d5cbe4a..1d6e4673a610f 100644
// typically happens when popups are created.
virtual void WebContentsCreated(WebContents* source_contents,
diff --git content/public/browser/web_contents_observer.h content/public/browser/web_contents_observer.h
index 264f4fa3ded25..d2e6e02f51727 100644
index d6f20a6c8d283..8cd985c25196b 100644
--- content/public/browser/web_contents_observer.h
+++ content/public/browser/web_contents_observer.h
@@ -705,6 +705,10 @@ class CONTENT_EXPORT WebContentsObserver {

View File

@ -10,10 +10,10 @@ index ff7a8ed89e94a..77f44956ff22f 100644
+ 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 1fc4708c4ac12..db42867e8b130 100644
index f9be3480ae7c9..913d327af7a85 100644
--- third_party/blink/public/platform/platform.h
+++ third_party/blink/public/platform/platform.h
@@ -876,6 +876,11 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -872,6 +872,11 @@ class BLINK_PLATFORM_EXPORT Platform {
const WebURL& url,
blink::WebVector<blink::WebContentSecurityPolicyHeader>* csp) {}
@ -44,7 +44,7 @@ index 463e3e5e73419..97aaf0da2b9a5 100644
DocumentInit& DocumentInit::WithTypeFrom(const String& mime_type) {
diff --git third_party/blink/renderer/core/frame/local_frame.cc third_party/blink/renderer/core/frame/local_frame.cc
index 16c679be469ab..75985bf7d9c72 100644
index cf505929c9f6e..ad6d5b603223f 100644
--- third_party/blink/renderer/core/frame/local_frame.cc
+++ third_party/blink/renderer/core/frame/local_frame.cc
@@ -1853,7 +1853,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() {

View File

@ -39,10 +39,10 @@ index 7995eb16a7cf6..1c007cbf08f32 100644
fullscreen_controller_(std::make_unique<FullscreenController>(this)),
page_base_background_color_(
diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h
index e7b0409bd60df..445b9eee5fd71 100644
index 293e146acb025..67c265a64ad04 100644
--- third_party/blink/renderer/core/exported/web_view_impl.h
+++ third_party/blink/renderer/core/exported/web_view_impl.h
@@ -131,7 +131,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -132,7 +132,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
static HashSet<WebViewImpl*>& AllInstances();
// Returns true if popup menus should be rendered by the browser, false if
// they should be rendered by WebKit (which is the default).
@ -52,7 +52,7 @@ index e7b0409bd60df..445b9eee5fd71 100644
// Returns whether frames under this WebView are backed by a compositor.
bool does_composite() const { return does_composite_; }
@@ -791,6 +792,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -792,6 +793,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
float fake_page_scale_animation_page_scale_factor_ = 0.f;
bool fake_page_scale_animation_use_anchor_ = false;
@ -62,10 +62,10 @@ index e7b0409bd60df..445b9eee5fd71 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 fdeb0ffd7c5f5..cc03daf4f705a 100644
index 724a67a401175..a505e5ed16b9f 100644
--- third_party/blink/renderer/core/page/chrome_client_impl.cc
+++ third_party/blink/renderer/core/page/chrome_client_impl.cc
@@ -842,7 +842,7 @@ bool ChromeClientImpl::HasOpenedPopup() const {
@@ -851,7 +851,7 @@ bool ChromeClientImpl::HasOpenedPopup() const {
PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
HTMLSelectElement& select) {
NotifyPopupOpeningObservers();

View File

@ -62,7 +62,7 @@ index 462eb546fbd94..f75ea77326f33 100644
bool result =
base::win::IsKeyboardPresentOnSlate(ui::GetHiddenWindow(), &reason);
diff --git chrome/browser/memory_details.cc chrome/browser/memory_details.cc
index 77538809e177d..256ab01bf7704 100644
index c4d7ed2be2287..cdb34057d7e43 100644
--- chrome/browser/memory_details.cc
+++ chrome/browser/memory_details.cc
@@ -17,6 +17,7 @@

View File

@ -1,8 +1,8 @@
diff --git chrome/app/generated_resources.grd chrome/app/generated_resources.grd
index 37364a4d11644..d9657aa938ec4 100644
index 85b4e2ae58841..90f2db47a00bf 100644
--- chrome/app/generated_resources.grd
+++ chrome/app/generated_resources.grd
@@ -5306,7 +5306,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
@@ -5318,7 +5318,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.">

View File

@ -28,9 +28,9 @@ scoped_refptr<RootWindow> RootWindow::Create(bool use_views) {
return new RootWindowGtk();
#elif defined(OS_MAC)
return new RootWindowMac();
#else
#error Unsupported platform
#endif
return nullptr;
}
} // namespace client

View File

@ -493,8 +493,18 @@ class DownloadTestHandler : public TestHandler {
mouse_event.x = 20;
mouse_event.y = 20;
mouse_event.modifiers = modifiers;
browser->GetHost()->SendMouseClickEvent(mouse_event, MBT_LEFT, false, 1);
browser->GetHost()->SendMouseClickEvent(mouse_event, MBT_LEFT, true, 1);
// Add some delay to avoid having events dropped or rate limited.
CefPostDelayedTask(
TID_UI,
base::BindOnce(&CefBrowserHost::SendMouseClickEvent, browser->GetHost(),
mouse_event, MBT_LEFT, false, 1),
50);
CefPostDelayedTask(
TID_UI,
base::BindOnce(&CefBrowserHost::SendMouseClickEvent, browser->GetHost(),
mouse_event, MBT_LEFT, true, 1),
100);
}
const TestMode test_mode_;

View File

@ -393,7 +393,10 @@ class PluginTestHandler : public RoutingTestHandler,
got_placeholder_loaded_.yes();
// The plugin placeholder has loaded. Trigger the context menu.
TriggerContextMenu(frame->GetBrowser());
CefPostDelayedTask(
TID_UI,
base::BindOnce(&PluginTestHandler::TriggerContextMenu, this, browser),
kPdfLoadDelayMs / 5);
} else if (request == "placeholder_hidden") {
EXPECT_TRUE(got_placeholder_loaded_);
EXPECT_FALSE(got_placeholder_hidden_);

View File

@ -321,10 +321,20 @@ class PopupTestHandler : public TestHandler {
mouse_event.x = 20;
mouse_event.y = 20;
mouse_event.modifiers = 0;
browser->GetHost()->SendMouseClickEvent(mouse_event, MBT_LEFT, false, 1);
browser->GetHost()->SendMouseClickEvent(mouse_event, MBT_LEFT, true, 1);
// Add some delay to avoid having events dropped or rate limited.
CefPostDelayedTask(
TID_UI,
base::BindOnce(&CefBrowserHost::SendMouseClickEvent,
browser->GetHost(), mouse_event, MBT_LEFT, false, 1),
50);
CefPostDelayedTask(
TID_UI,
base::BindOnce(&CefBrowserHost::SendMouseClickEvent,
browser->GetHost(), mouse_event, MBT_LEFT, true, 1),
100);
} else {
EXPECT_TRUE(false); // Not reached.
ADD_FAILURE(); // Not reached.
}
}