Update to Chromium version 75.0.3770.0 (#652427)

This commit is contained in:
Marshall Greenblatt 2019-06-05 16:15:45 +02:00
parent ab6fd322d1
commit 6193d8c554
79 changed files with 739 additions and 763 deletions

View File

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

View File

@ -30,6 +30,8 @@
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/guest_view/browser/guest_view_manager.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "components/keyed_service/core/simple_dependency_manager.h"
#include "components/keyed_service/core/simple_key_map.h"
#include "components/prefs/pref_service.h"
#include "components/proxy_config/pref_proxy_config_tracker_impl.h"
#include "components/user_prefs/user_prefs.h"
@ -222,8 +224,16 @@ CefBrowserContext::~CefBrowserContext() {
// Remove any BrowserContextKeyedServiceFactory associations. This must be
// called before the ProxyService owned by CefBrowserContext is destroyed.
BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices(
this);
// The SimpleDependencyManager should always be passed after the
// BrowserContextDependencyManager. This is because the KeyedService instances
// in the BrowserContextDependencyManager's dependency graph can depend on the
// ones in the SimpleDependencyManager's graph.
DependencyManager::PerformInterlockedTwoPhaseShutdown(
BrowserContextDependencyManager::GetInstance(), this,
SimpleDependencyManager::GetInstance(), key_.get());
key_.reset();
SimpleKeyMap::GetInstance()->Dissociate(this);
// Shuts down the storage partitions associated with this browser context.
// This must be called before the browser context is actually destroyed
@ -277,6 +287,9 @@ void CefBrowserContext::Initialize() {
CefString(&context->settings().accept_language_list);
}
key_ = std::make_unique<ProfileKey>(GetPath());
SimpleKeyMap::GetInstance()->Associate(this, key_.get());
// Initialize the PrefService object.
pref_service_ = browser_prefs::CreatePrefService(
this, cache_path_, !!settings_.persist_user_preferences);
@ -327,6 +340,7 @@ void CefBrowserContext::Initialize() {
PrefService* pref_service = GetPrefs();
DCHECK(pref_service);
user_prefs::UserPrefs::Set(this, pref_service);
key_->SetPrefs(pref_service);
if (extensions_enabled)
extension_system_->Init();
@ -550,8 +564,9 @@ const PrefService* CefBrowserContext::GetPrefs() const {
return pref_service_.get();
}
SimpleFactoryKey* CefBrowserContext::GetSimpleFactoryKey() const {
return nullptr;
ProfileKey* CefBrowserContext::GetProfileKey() const {
DCHECK(key_);
return key_.get();
}
const CefRequestContextSettings& CefBrowserContext::GetSettings() const {

View File

@ -179,7 +179,7 @@ class CefBrowserContext : public ChromeProfileStub,
PrefService* GetPrefs() override;
bool AllowsBrowserWindows() const override { return false; }
const PrefService* GetPrefs() const override;
SimpleFactoryKey* GetSimpleFactoryKey() const override;
ProfileKey* GetProfileKey() const override;
// Values checked in ProfileNetworkContextService::CreateNetworkContextParams
// when creating the NetworkContext.
@ -283,6 +283,10 @@ class CefBrowserContext : public ChromeProfileStub,
// Owned by the KeyedService system.
extensions::CefExtensionSystem* extension_system_ = nullptr;
// The key to index KeyedService instances created by
// SimpleKeyedServiceFactory.
std::unique_ptr<ProfileKey> key_;
DISALLOW_COPY_AND_ASSIGN(CefBrowserContext);
};

View File

@ -56,7 +56,7 @@
#endif // defined(USE_AURA)
#if defined(USE_AURA) && defined(OS_LINUX)
#include "ui/base/ime/input_method_initializer.h"
#include "ui/base/ime/init/input_method_initializer.h"
#endif
#if defined(OS_LINUX)

View File

@ -474,6 +474,30 @@ bool NavigationOnUIThread(
return ignore_navigation;
}
const extensions::ExtensionSet* GetEnabledExtensions(
content::BrowserContext* context) {
auto registry = extensions::ExtensionRegistry::Get(context);
return &registry->enabled_extensions();
}
const extensions::ExtensionSet* GetEnabledExtensions(
content::ResourceContext* context) {
auto cef_context = static_cast<CefResourceContext*>(context);
if (!cef_context)
return nullptr;
return &cef_context->GetExtensionInfoMap()->extensions();
}
const extensions::ExtensionSet* GetEnabledExtensions(
content::BrowserOrResourceContext context) {
if (content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)) {
return GetEnabledExtensions(context.ToBrowserContext());
}
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
return GetEnabledExtensions(context.ToResourceContext());
}
} // namespace
CefContentBrowserClient::CefContentBrowserClient() : browser_main_parts_(NULL) {
@ -568,29 +592,15 @@ bool CefContentBrowserClient::ShouldUseProcessPerSite(
// Based on
// ChromeContentBrowserClientExtensionsPart::DoesSiteRequireDedicatedProcess.
bool CefContentBrowserClient::DoesSiteRequireDedicatedProcess(
content::BrowserContext* browser_context,
content::BrowserOrResourceContext browser_or_resource_context,
const GURL& effective_site_url) {
if (!extensions::ExtensionsEnabled())
return false;
extensions::ExtensionRegistry* registry =
extensions::ExtensionRegistry::Get(browser_context);
const extensions::Extension* extension =
registry->enabled_extensions().GetExtensionOrAppByURL(effective_site_url);
if (!extension)
return false;
// Always isolate Chrome Web Store.
if (extension->id() == extensions::kWebStoreAppId)
return true;
// Extensions should be isolated, except for hosted apps. Isolating hosted
// apps is a good idea, but ought to be a separate knob.
if (extension->is_hosted_app())
return false;
auto extension = GetEnabledExtensions(browser_or_resource_context)
->GetExtensionOrAppByURL(effective_site_url);
// Isolate all extensions.
return true;
return extension != nullptr;
}
void CefContentBrowserClient::GetAdditionalWebUISchemes(
@ -891,7 +901,7 @@ CefContentBrowserClient::GetSystemNetworkContext() {
return SystemNetworkContextManager::GetInstance()->GetContext();
}
content::QuotaPermissionContext*
scoped_refptr<content::QuotaPermissionContext>
CefContentBrowserClient::CreateQuotaPermissionContext() {
return new CefQuotaPermissionContext();
}
@ -943,7 +953,7 @@ void CefContentBrowserClient::AllowCertificateError(
callback) {
CEF_REQUIRE_UIT();
if (resource_type != content::ResourceType::RESOURCE_TYPE_MAIN_FRAME) {
if (resource_type != content::ResourceType::kMainFrame) {
// A sub-resource has a certificate error. The user doesn't really
// have a context for making the right decision, so block the request
// hard.

View File

@ -48,8 +48,9 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
service_manager::mojom::ServiceRequest* service_request) override;
bool ShouldUseProcessPerSite(content::BrowserContext* browser_context,
const GURL& effective_url) override;
bool DoesSiteRequireDedicatedProcess(content::BrowserContext* browser_context,
const GURL& effective_site_url) override;
bool DoesSiteRequireDedicatedProcess(
content::BrowserOrResourceContext browser_or_resource_contexts,
const GURL& effective_site_url) override;
void GetAdditionalWebUISchemes(
std::vector<std::string>* additional_schemes) override;
void GetAdditionalViewSourceSchemes(
@ -76,7 +77,8 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
scoped_refptr<network::SharedURLLoaderFactory>
GetSystemSharedURLLoaderFactory() override;
network::mojom::NetworkContext* GetSystemNetworkContext() override;
content::QuotaPermissionContext* CreateQuotaPermissionContext() override;
scoped_refptr<content::QuotaPermissionContext> CreateQuotaPermissionContext()
override;
void GetQuotaSettings(
content::BrowserContext* context,
content::StoragePartition* partition,

View File

@ -144,9 +144,9 @@ bool ExecuteCodeInTabFunction::CanExecuteScriptOnPage(std::string* error) {
ExtensionApiFrameIdMap::GetRenderFrameHostById(browser->web_contents(),
frame_id);
if (!rfh) {
*error = ErrorUtils::FormatErrorMessage(keys::kFrameNotFoundError,
base::IntToString(frame_id),
base::IntToString(execute_tab_id_));
*error = ErrorUtils::FormatErrorMessage(
keys::kFrameNotFoundError, base::NumberToString(frame_id),
base::NumberToString(execute_tab_id_));
return false;
}

View File

@ -225,7 +225,7 @@ CefExtensionFunctionDetails::GetBrowserForTabIdFirstTime(
if (!browser || !browser->web_contents() || !CanAccessBrowser(browser)) {
if (error_message) {
*error_message = ErrorUtils::FormatErrorMessage(
keys::kTabNotFoundError, base::IntToString(tab_id));
keys::kTabNotFoundError, base::NumberToString(tab_id));
}
return nullptr;
}
@ -256,7 +256,7 @@ CefExtensionFunctionDetails::GetBrowserForTabIdAgain(
if (!browser || !browser->web_contents()) {
if (error_message) {
*error_message = ErrorUtils::FormatErrorMessage(
keys::kTabNotFoundError, base::IntToString(tab_id));
keys::kTabNotFoundError, base::NumberToString(tab_id));
}
}
return browser;

View File

@ -444,7 +444,7 @@ void CefExtensionSystem::UnregisterExtensionWithRequestContexts(
base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason));
}
const OneShotEvent& CefExtensionSystem::ready() const {
const base::OneShotEvent& CefExtensionSystem::ready() const {
return ready_;
}

View File

@ -14,8 +14,8 @@
#include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h"
#include "base/one_shot_event.h"
#include "extensions/browser/extension_system.h"
#include "extensions/common/one_shot_event.h"
class BrowserContextKeyedServiceFactory;
@ -107,7 +107,7 @@ class CefExtensionSystem : public ExtensionSystem {
void UnregisterExtensionWithRequestContexts(
const std::string& extension_id,
const UnloadedExtensionReason reason) override;
const OneShotEvent& ready() const override;
const base::OneShotEvent& ready() const override;
ContentVerifier* content_verifier() override;
std::unique_ptr<ExtensionSet> GetDependentExtensions(
const Extension* extension) override;
@ -182,7 +182,7 @@ class CefExtensionSystem : public ExtensionSystem {
scoped_refptr<ValueStoreFactory> store_factory_;
// Signaled when the extension system has completed its startup tasks.
OneShotEvent ready_;
base::OneShotEvent ready_;
// Sets of enabled/disabled/terminated/blacklisted extensions. Not owned.
ExtensionRegistry* registry_;

View File

@ -12,6 +12,7 @@
#include "base/message_loop/message_loop.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/win/wrapped_window_proc.h"
#include "skia/ext/platform_canvas.h"
@ -77,6 +78,23 @@ void DrawToNativeContext(SkCanvas* canvas,
canvas->getTotalMatrix());
}
HFONT CreateNativeFont(const gfx::Font& font) {
// Extracts |fonts| properties.
const DWORD italic = (font.GetStyle() & gfx::Font::ITALIC) ? TRUE : FALSE;
const DWORD underline =
(font.GetStyle() & gfx::Font::UNDERLINE) ? TRUE : FALSE;
// The font mapper matches its absolute value against the character height of
// the available fonts.
const int height = -font.GetFontSize();
// Select the primary font which forces a mapping to a physical font.
return ::CreateFont(height, 0, 0, 0, static_cast<int>(font.GetWeight()),
italic, underline, FALSE, DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
DEFAULT_PITCH | FF_DONTCARE,
base::UTF8ToUTF16(font.GetFontName()).c_str());
}
} // namespace
struct CefNativeMenuWin::ItemData {
@ -240,8 +258,8 @@ class CefNativeMenuWin::MenuHostWindow {
if (!underline_mnemonics)
format |= DT_HIDEPREFIX;
gfx::FontList font_list;
HGDIOBJ old_font = static_cast<HFONT>(
SelectObject(dc, font_list.GetPrimaryFont().GetNativeFont()));
HFONT new_font = CreateNativeFont(font_list.GetPrimaryFont());
HGDIOBJ old_font = SelectObject(dc, new_font);
// If an accelerator is specified (with a tab delimiting the rest of the
// label from the accelerator), we have to justify the fist part on the
@ -257,11 +275,13 @@ class CefNativeMenuWin::MenuHostWindow {
}
DrawTextEx(dc, const_cast<wchar_t*>(label.data()),
static_cast<int>(label.size()), &rect, format | DT_LEFT, NULL);
if (!accel.empty())
if (!accel.empty()) {
DrawTextEx(dc, const_cast<wchar_t*>(accel.data()),
static_cast<int>(accel.size()), &rect, format | DT_RIGHT,
NULL);
}
SelectObject(dc, old_font);
DeleteObject(new_font);
ui::MenuModel::ItemType type =
data->native_menu_win->model_->GetTypeAt(data->model_index);

View File

@ -406,7 +406,7 @@ void CefCookieManagerOldImpl::SetCookieInternal(
expiration_time,
base::Time(), // Last access time.
cookie.secure ? true : false, cookie.httponly ? true : false,
net::CookieSameSite::DEFAULT_MODE, net::COOKIE_PRIORITY_DEFAULT);
net::CookieSameSite::UNSPECIFIED, net::COOKIE_PRIORITY_DEFAULT);
net::CookieOptions options;
if (cookie.httponly)
@ -419,8 +419,9 @@ void CefCookieManagerOldImpl::SetCookieInternal(
return;
}
cookie_store->SetCanonicalCookieAsync(std::move(canonical_cookie),
url.scheme(), options, base::Bind(SetCookieCallbackImpl, callback));
cookie_store->SetCanonicalCookieAsync(
std::move(canonical_cookie), url.scheme(), options,
base::Bind(SetCookieCallbackImpl, callback));
}
void CefCookieManagerOldImpl::DeleteCookiesInternal(

View File

@ -119,8 +119,7 @@ std::unique_ptr<net::ProxyResolutionService> CreateProxyResolutionService(
proxy_resolver::mojom::ProxyResolverFactoryPtr proxy_resolver_factory,
std::unique_ptr<net::ProxyConfigService> proxy_config_service,
const base::CommandLine& command_line,
bool quick_check_enabled,
bool pac_https_url_stripping_enabled) {
bool quick_check_enabled) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
bool use_v8 = !command_line.HasSwitch(switches::kWinHttpProxyResolver);
// TODO(eroman): Figure out why this doesn't work in single-process mode.
@ -148,10 +147,6 @@ std::unique_ptr<net::ProxyResolutionService> CreateProxyResolutionService(
}
proxy_service->set_quick_check_enabled(quick_check_enabled);
proxy_service->set_sanitize_url_policy(
pac_https_url_stripping_enabled
? net::ProxyResolutionService::SanitizeUrlPolicy::SAFE
: net::ProxyResolutionService::SanitizeUrlPolicy::UNSAFE);
return proxy_service;
}
@ -206,10 +201,6 @@ CefURLRequestContextGetter::CefURLRequestContextGetter(
quick_check_enabled_.Init(prefs::kQuickCheckEnabled, pref_service);
quick_check_enabled_.MoveToThread(io_thread_proxy);
pac_https_url_stripping_enabled_.Init(prefs::kPacHttpsUrlStrippingEnabled,
pref_service);
pac_https_url_stripping_enabled_.MoveToThread(io_thread_proxy);
force_google_safesearch_.Init(prefs::kForceGoogleSafeSearch, pref_service);
force_google_safesearch_.MoveToThread(io_thread_proxy);
@ -244,7 +235,6 @@ void CefURLRequestContextGetter::RegisterPrefs(PrefRegistrySimple* registry) {
registry->RegisterStringPref(prefs::kGSSAPILibraryName, std::string());
#endif
registry->RegisterBooleanPref(prefs::kQuickCheckEnabled, true);
registry->RegisterBooleanPref(prefs::kPacHttpsUrlStrippingEnabled, true);
// Based on ProfileImpl::RegisterProfilePrefs.
registry->RegisterBooleanPref(prefs::kForceGoogleSafeSearch, false);
@ -257,7 +247,6 @@ void CefURLRequestContextGetter::RegisterPrefs(PrefRegistrySimple* registry) {
void CefURLRequestContextGetter::ShutdownOnUIThread() {
CEF_REQUIRE_UIT();
quick_check_enabled_.Destroy();
pac_https_url_stripping_enabled_.Destroy();
force_google_safesearch_.Destroy();
auth_server_whitelist_.Destroy();
auth_negotiate_delegate_whitelist_.Destroy();
@ -348,8 +337,7 @@ net::URLRequestContext* CefURLRequestContextGetter::GetURLRequestContext() {
io_state_->url_request_context_->network_delegate(),
std::move(io_state_->proxy_resolver_factory_),
std::move(io_state_->proxy_config_service_), *command_line,
quick_check_enabled_.GetValue(),
pac_https_url_stripping_enabled_.GetValue());
quick_check_enabled_.GetValue());
io_state_->storage_->set_proxy_resolution_service(
std::move(system_proxy_service));

View File

@ -126,7 +126,6 @@ class CefURLRequestContextGetter : public net::URLRequestContextGetter {
std::unique_ptr<IOState> io_state_;
BooleanPrefMember quick_check_enabled_;
BooleanPrefMember pac_https_url_stripping_enabled_;
// Member variables which are pointed to by the various context objects.
mutable BooleanPrefMember force_google_safesearch_;

View File

@ -49,7 +49,8 @@ void ContinueWithLoadedCookies(const AllowCookieCallback& allow_cookie_callback,
void GetCookieListCallback(const AllowCookieCallback& allow_cookie_callback,
DoneCookieCallback done_callback,
const net::CookieList& cookies) {
const net::CookieList& cookies,
const net::CookieStatusList&) {
CEF_REQUIRE_UIT();
CEF_POST_TASK(CEF_IOT,
base::BindOnce(ContinueWithLoadedCookies, allow_cookie_callback,
@ -80,13 +81,15 @@ struct SaveCookiesProgress {
int num_cookie_lines_left_;
};
void SetCanonicalCookieCallback(SaveCookiesProgress* progress,
const net::CanonicalCookie& cookie,
bool success) {
void SetCanonicalCookieCallback(
SaveCookiesProgress* progress,
const net::CanonicalCookie& cookie,
net::CanonicalCookie::CookieInclusionStatus status) {
CEF_REQUIRE_UIT();
progress->num_cookie_lines_left_--;
if (success)
if (status == net::CanonicalCookie::CookieInclusionStatus::INCLUDE) {
progress->allowed_cookies_.push_back(cookie);
}
// If all the cookie lines have been handled the request can be continued.
if (progress->num_cookie_lines_left_ == 0) {
@ -128,7 +131,9 @@ void SaveCookiesOnUIThread(content::BrowserContext* browser_context,
cookie));
}
SetCanonicalCookieCallback(progress, net::CanonicalCookie(), false);
SetCanonicalCookieCallback(
progress, net::CanonicalCookie(),
net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_UNKNOWN_ERROR);
}
} // namespace

View File

@ -35,11 +35,14 @@ void RunAsyncCompletionOnUIThread(CefRefPtr<CefCompletionCallback> callback) {
// Always execute the callback asynchronously.
void SetCookieCallbackImpl(CefRefPtr<CefSetCookieCallback> callback,
bool success) {
net::CanonicalCookie::CookieInclusionStatus status) {
if (!callback.get())
return;
CEF_POST_TASK(CEF_UIT, base::Bind(&CefSetCookieCallback::OnComplete,
callback.get(), success));
CEF_POST_TASK(
CEF_UIT,
base::Bind(
&CefSetCookieCallback::OnComplete, callback.get(),
status == net::CanonicalCookie::CookieInclusionStatus::INCLUDE));
}
// Always execute the callback asynchronously.
@ -78,11 +81,19 @@ void ExecuteVisitor(CefRefPtr<CefCookieVisitor> visitor,
// Always execute the callback asynchronously.
void GetCookiesCallbackImpl(CefRefPtr<CefCookieVisitor> visitor,
CefRefPtr<CefRequestContextImpl> request_context,
const std::vector<net::CanonicalCookie>& cookies) {
const net::CookieList& cookies,
const net::CookieStatusList&) {
CEF_POST_TASK(CEF_UIT,
base::Bind(&ExecuteVisitor, visitor, request_context, cookies));
}
void GetAllCookiesCallbackImpl(CefRefPtr<CefCookieVisitor> visitor,
CefRefPtr<CefRequestContextImpl> request_context,
const net::CookieList& cookies) {
GetCookiesCallbackImpl(visitor, request_context, cookies,
net::CookieStatusList());
}
} // namespace
CefCookieManagerImpl::CefCookieManagerImpl() {}
@ -143,7 +154,7 @@ bool CefCookieManagerImpl::VisitAllCookies(
GetCookieManager(request_context_.get())
->GetAllCookies(
base::Bind(&GetCookiesCallbackImpl, visitor, request_context_));
base::Bind(&GetAllCookiesCallbackImpl, visitor, request_context_));
return true;
}
@ -207,10 +218,12 @@ bool CefCookieManagerImpl::SetCookie(const CefString& url,
expiration_time,
base::Time(), // Last access time.
cookie.secure ? true : false, cookie.httponly ? true : false,
net::CookieSameSite::DEFAULT_MODE, net::COOKIE_PRIORITY_DEFAULT);
net::CookieSameSite::UNSPECIFIED, net::COOKIE_PRIORITY_DEFAULT);
if (!canonical_cookie) {
SetCookieCallbackImpl(callback, false);
SetCookieCallbackImpl(
callback,
net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_UNKNOWN_ERROR);
return true;
}

View File

@ -10,7 +10,7 @@
#include "base/callback.h"
#include "base/containers/unique_ptr_adapters.h"
#include "base/hash.h"
#include "base/hash/hash.h"
#include "base/macros.h"
#include "base/strings/string_piece.h"
#include "content/public/browser/content_browser_client.h"

View File

@ -1083,7 +1083,8 @@ void InitOnUIThread(
if (request.render_frame_id >= 0) {
// TODO(network): Are these main frame checks equivalent?
if (request.is_main_frame ||
request.resource_type == content::RESOURCE_TYPE_MAIN_FRAME) {
static_cast<content::ResourceType>(request.resource_type) ==
content::ResourceType::kMainFrame) {
frame = web_contents->GetMainFrame();
DCHECK(frame);
} else {

View File

@ -136,6 +136,12 @@ struct PopulateAxNodeAttributes {
ToString(attr.first),
ToString(static_cast<ax::mojom::Restriction>(attr.second)));
break;
case ax::mojom::IntAttribute::kListStyle: {
auto state = static_cast<ax::mojom::ListStyle>(attr.second);
if (ax::mojom::ListStyle::kNone != state) {
attributes->SetString(ToString(attr.first), ToString(state));
}
} break;
case ax::mojom::IntAttribute::kSortDirection: {
auto state = static_cast<ax::mojom::SortDirection>(attr.second);
if (ax::mojom::SortDirection::kNone != state) {
@ -180,7 +186,8 @@ struct PopulateAxNodeAttributes {
static ax::mojom::TextStyle textStyleArr[] = {
ax::mojom::TextStyle::kBold, ax::mojom::TextStyle::kItalic,
ax::mojom::TextStyle::kUnderline,
ax::mojom::TextStyle::kLineThrough};
ax::mojom::TextStyle::kLineThrough,
ax::mojom::TextStyle::kOverline};
CefRefPtr<CefListValue> list = CefListValue::Create();
int index = 0;
@ -191,6 +198,14 @@ struct PopulateAxNodeAttributes {
}
attributes->SetList(ToString(attr.first), list);
} break;
case ax::mojom::IntAttribute::kTextOverlineStyle:
case ax::mojom::IntAttribute::kTextStrikethroughStyle:
case ax::mojom::IntAttribute::kTextUnderlineStyle: {
auto state = static_cast<ax::mojom::TextDecorationStyle>(attr.second);
if (ax::mojom::TextDecorationStyle::kNone != state) {
attributes->SetString(ToString(attr.first), ToString(state));
}
} break;
case ax::mojom::IntAttribute::kImageAnnotationStatus: {
// TODO(cef): Implement support for Image Annotation Status
} break;

View File

@ -490,7 +490,7 @@ void CefRenderWidgetHostViewOSR::SetSize(const gfx::Size& size) {}
void CefRenderWidgetHostViewOSR::SetBounds(const gfx::Rect& rect) {}
gfx::NativeView CefRenderWidgetHostViewOSR::GetNativeView() const {
gfx::NativeView CefRenderWidgetHostViewOSR::GetNativeView() {
return gfx::NativeView();
}
@ -501,11 +501,11 @@ CefRenderWidgetHostViewOSR::GetNativeViewAccessible() {
void CefRenderWidgetHostViewOSR::Focus() {}
bool CefRenderWidgetHostViewOSR::HasFocus() const {
bool CefRenderWidgetHostViewOSR::HasFocus() {
return false;
}
bool CefRenderWidgetHostViewOSR::IsSurfaceAvailableForCopy() const {
bool CefRenderWidgetHostViewOSR::IsSurfaceAvailableForCopy() {
return GetDelegatedFrameHost()->CanCopyFromCompositingSurface();
}
@ -559,7 +559,7 @@ void CefRenderWidgetHostViewOSR::EnsureSurfaceSynchronizedForWebTest() {
SynchronizeVisualProperties();
}
gfx::Rect CefRenderWidgetHostViewOSR::GetViewBounds() const {
gfx::Rect CefRenderWidgetHostViewOSR::GetViewBounds() {
if (IsPopupWidget())
return popup_position_;
@ -588,7 +588,7 @@ void CefRenderWidgetHostViewOSR::SetBackgroundColor(SkColor color) {
content::RenderWidgetHostViewBase::SetBackgroundColor(color);
}
base::Optional<SkColor> CefRenderWidgetHostViewOSR::GetBackgroundColor() const {
base::Optional<SkColor> CefRenderWidgetHostViewOSR::GetBackgroundColor() {
return background_color_;
}
@ -836,13 +836,12 @@ void CefRenderWidgetHostViewOSR::UpdateCursor(
browser_impl_->GetClient()->GetRenderHandler();
CHECK(handler);
content::CursorInfo cursor_info;
cursor.GetCursorInfo(&cursor_info);
const content::CursorInfo& cursor_info = cursor.info();
const cef_cursor_type_t cursor_type =
static_cast<cef_cursor_type_t>(cursor_info.type);
CefCursorInfo custom_cursor_info;
if (cursor.IsCustom()) {
if (cursor_info.type == blink::WebCursorInfo::kTypeCustom) {
custom_cursor_info.hotspot.x = cursor_info.hotspot.x();
custom_cursor_info.hotspot.y = cursor_info.hotspot.y();
custom_cursor_info.image_scale_factor = cursor_info.image_scale_factor;
@ -852,10 +851,10 @@ void CefRenderWidgetHostViewOSR::UpdateCursor(
}
#if defined(USE_AURA)
content::WebCursor web_cursor = cursor;
content::WebCursor web_cursor(cursor_info);
ui::PlatformCursor platform_cursor;
if (web_cursor.IsCustom()) {
if (cursor_info.type == blink::WebCursorInfo::kTypeCustom) {
ui::Cursor ui_cursor(ui::CursorType::kCustom);
SkBitmap bitmap;
gfx::Point hotspot;
@ -876,7 +875,7 @@ void CefRenderWidgetHostViewOSR::UpdateCursor(
custom_cursor_info);
#elif defined(OS_MACOSX)
// |web_cursor| owns the resulting |native_cursor|.
content::WebCursor web_cursor = cursor;
content::WebCursor web_cursor(cursor);
CefCursorHandle native_cursor = web_cursor.GetNativeCursor();
handler->OnCursorChange(browser_impl_.get(), native_cursor, cursor_type,
custom_cursor_info);
@ -944,7 +943,7 @@ void CefRenderWidgetHostViewOSR::SetTooltipText(
}
}
gfx::Size CefRenderWidgetHostViewOSR::GetCompositorViewportPixelSize() const {
gfx::Size CefRenderWidgetHostViewOSR::GetCompositorViewportPixelSize() {
return gfx::ScaleToCeiledSize(GetRequestedRendererSize(),
current_device_scale_factor_);
}
@ -961,8 +960,7 @@ void CefRenderWidgetHostViewOSR::CopyFromSurface(
std::move(callback));
}
void CefRenderWidgetHostViewOSR::GetScreenInfo(
content::ScreenInfo* results) const {
void CefRenderWidgetHostViewOSR::GetScreenInfo(content::ScreenInfo* results) {
if (!browser_impl_.get())
return;

View File

@ -118,19 +118,19 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
void InitAsChild(gfx::NativeView parent_view) override;
void SetSize(const gfx::Size& size) override;
void SetBounds(const gfx::Rect& rect) override;
gfx::NativeView GetNativeView() const override;
gfx::NativeView GetNativeView() override;
gfx::NativeViewAccessible GetNativeViewAccessible() override;
void Focus() override;
bool HasFocus() const override;
bool HasFocus() override;
uint32_t GetCaptureSequenceNumber() const override;
bool IsSurfaceAvailableForCopy() const override;
bool IsSurfaceAvailableForCopy() override;
void Show() override;
void Hide() override;
bool IsShowing() override;
void EnsureSurfaceSynchronizedForWebTest() override;
gfx::Rect GetViewBounds() const override;
gfx::Rect GetViewBounds() override;
void SetBackgroundColor(SkColor color) override;
base::Optional<SkColor> GetBackgroundColor() const override;
base::Optional<SkColor> GetBackgroundColor() override;
void UpdateBackgroundColor() override;
bool LockMouse() override;
void UnlockMouse() override;
@ -165,12 +165,12 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
void Destroy() override;
void SetTooltipText(const base::string16& tooltip_text) override;
content::CursorManager* GetCursorManager() override;
gfx::Size GetCompositorViewportPixelSize() const override;
gfx::Size GetCompositorViewportPixelSize() override;
void CopyFromSurface(
const gfx::Rect& src_rect,
const gfx::Size& output_size,
base::OnceCallback<void(const SkBitmap&)> callback) override;
void GetScreenInfo(content::ScreenInfo* results) const override;
void GetScreenInfo(content::ScreenInfo* results) override;
void TransformPointToRootSurface(gfx::PointF* point) override;
gfx::Rect GetBoundsInRootWindow() override;
viz::ScopedSurfaceIdAllocator DidUpdateVisualProperties(

View File

@ -54,6 +54,7 @@
#include "extensions/browser/extension_prefs.h"
#include "extensions/buildflags/buildflags.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/ui_base_switches.h"
#if defined(OS_MACOSX)
#include "components/os_crypt/os_crypt.h"
@ -124,7 +125,8 @@ std::unique_ptr<PrefService> CreatePrefService(Profile* profile,
if (profile) {
// Used to store supervised user preferences.
SupervisedUserSettingsService* supervised_user_settings =
SupervisedUserSettingsServiceFactory::GetForProfile(profile);
SupervisedUserSettingsServiceFactory::GetForKey(
profile->GetProfileKey());
if (store_on_disk) {
supervised_user_settings->Init(cache_path, sequenced_task_runner.get(),
@ -210,7 +212,11 @@ std::unique_ptr<PrefService> CreatePrefService(Profile* profile,
HostContentSettingsMap::RegisterProfilePrefs(registry.get());
language::LanguagePrefs::RegisterProfilePrefs(registry.get());
ProfileNetworkContextService::RegisterProfilePrefs(registry.get());
renderer_prefs::RegisterProfilePrefs(registry.get());
const std::string& locale =
command_line->GetSwitchValueASCII(switches::kLang);
DCHECK(!locale.empty());
renderer_prefs::RegisterProfilePrefs(registry.get(), locale);
// Print preferences.
// Based on ProfileImpl::RegisterProfilePrefs.

View File

@ -294,8 +294,9 @@ void SetCommandLinePrefDefaults(CommandLinePrefStore* prefs) {
SetBool(prefs, prefs::kWebKitPluginsEnabled, false);
}
void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
PrefsTabHelper::RegisterProfilePrefs(registry);
void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
const std::string& locale) {
PrefsTabHelper::RegisterProfilePrefs(registry, locale);
RegisterAnimationPolicyPrefs(registry);
// From chrome::RegisterBrowserUserPrefs.

View File

@ -13,7 +13,7 @@ class CommandLinePrefStore;
namespace content {
class RenderViewHost;
struct WebPreferences;
}
} // namespace content
namespace user_prefs {
class PrefRegistrySyncable;
@ -22,7 +22,8 @@ class PrefRegistrySyncable;
namespace renderer_prefs {
// Register additional renderer-related preferences.
void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
const std::string& locale);
// Set default values based on CEF command-line flags for preferences that are
// available via the PrefService. Chromium command-line flags should not exist

View File

@ -96,7 +96,7 @@ void CefResourceDispatcherHostDelegate::OnStreamCreated(
std::map<net::URLRequest*, StreamTargetInfo>::iterator ix =
stream_target_info_.find(request);
CHECK(ix != stream_target_info_.end());
bool embedded = info->GetResourceType() != content::RESOURCE_TYPE_MAIN_FRAME;
bool embedded = info->GetResourceType() != content::ResourceType::kMainFrame;
base::PostTaskWithTraits(
FROM_HERE, {content::BrowserThread::UI},
base::BindOnce(

View File

@ -7,6 +7,7 @@
#include "libcef/browser/thread_util.h"
#include "ui/gfx/canvas.h"
#include "ui/views/controls/button/menu_button_controller.h"
#include "ui/views/controls/menu/menu_config.h"
namespace {
@ -14,7 +15,7 @@ namespace {
class ButtonPressedLock : public CefMenuButtonPressedLock {
public:
explicit ButtonPressedLock(views::MenuButton* menu_button)
: pressed_lock_(menu_button->menu_button_controller()) {}
: pressed_lock_(menu_button->button_controller()) {}
private:
views::MenuButtonController::PressedLock pressed_lock_;
@ -50,10 +51,10 @@ void CefMenuButtonView::SetDrawStringsFlags(int flags) {
label()->SetDrawStringsFlags(flags);
}
void CefMenuButtonView::OnMenuButtonClicked(views::MenuButton* source,
void CefMenuButtonView::OnMenuButtonClicked(views::Button* source,
const gfx::Point& point,
const ui::Event* event) {
cef_delegate()->OnMenuButtonPressed(GetCefMenuButton(),
CefPoint(point.x(), point.y()),
new ButtonPressedLock(source));
cef_delegate()->OnMenuButtonPressed(
GetCefMenuButton(), CefPoint(point.x(), point.y()),
new ButtonPressedLock(static_cast<views::MenuButton*>(source)));
}

View File

@ -46,7 +46,7 @@ class CefMenuButtonView
void SetDrawStringsFlags(int flags);
// views::MenuButtonListener methods:
void OnMenuButtonClicked(views::MenuButton* source,
void OnMenuButtonClicked(views::Button* source,
const gfx::Point& point,
const ui::Event* event) override;

View File

@ -684,17 +684,17 @@ void CefCrashReporterClient::GetCrashOptionalArguments(
if (max_uploads_ > 0) {
arguments->push_back(std::string("--max-uploads=") +
base::IntToString(max_uploads_));
base::NumberToString(max_uploads_));
}
if (max_db_size_ > 0) {
arguments->push_back(std::string("--max-db-size=") +
base::IntToString(max_db_size_));
base::NumberToString(max_db_size_));
}
if (max_db_age_ > 0) {
arguments->push_back(std::string("--max-db-age=") +
base::IntToString(max_db_age_));
base::NumberToString(max_db_age_));
}
}

View File

@ -546,13 +546,13 @@ bool CefMainDelegate::BasicStartupComplete(int* exit_code) {
settings.remote_debugging_port <= 65535) {
command_line->AppendSwitchASCII(
switches::kRemoteDebuggingPort,
base::IntToString(settings.remote_debugging_port));
base::NumberToString(settings.remote_debugging_port));
}
if (settings.uncaught_exception_stack_size > 0) {
command_line->AppendSwitchASCII(
switches::kUncaughtExceptionStackSize,
base::IntToString(settings.uncaught_exception_stack_size));
base::NumberToString(settings.uncaught_exception_stack_size));
}
std::vector<std::string> disable_features;

View File

@ -705,8 +705,8 @@ void CefRequestImpl::Get(blink::WebURLRequest& request,
base::AutoLock lock_scope(lock_);
request.SetRequestContext(blink::mojom::RequestContextType::INTERNAL);
request.SetURL(url_);
request.SetHTTPMethod(blink::WebString::FromUTF8(method_));
request.SetUrl(url_);
request.SetHttpMethod(blink::WebString::FromUTF8(method_));
if (!referrer_url_.is_empty()) {
const blink::WebString& referrer =
@ -714,7 +714,7 @@ void CefRequestImpl::Get(blink::WebURLRequest& request,
NetReferrerPolicyToBlinkReferrerPolicy(referrer_policy_), url_,
blink::WebString::FromUTF8(referrer_url_.spec()));
if (!referrer.IsEmpty()) {
request.SetHTTPReferrer(
request.SetHttpReferrer(
referrer, NetReferrerPolicyToBlinkReferrerPolicy(referrer_policy_));
}
}
@ -723,7 +723,7 @@ void CefRequestImpl::Get(blink::WebURLRequest& request,
blink::WebHTTPBody body;
body.Initialize();
static_cast<CefPostDataImpl*>(postdata_.get())->Get(body);
request.SetHTTPBody(body);
request.SetHttpBody(body);
if (flags_ & UR_FLAG_REPORT_UPLOAD_PROGRESS) {
// Attempt to determine the upload data size.
@ -759,10 +759,10 @@ void CefRequestImpl::Get(blink::WebURLRequest& request,
// static
void CefRequestImpl::Get(const CefMsg_LoadRequest_Params& params,
blink::WebURLRequest& request) {
request.SetURL(params.url);
request.SetUrl(params.url);
request.SetRequestorOrigin(blink::WebSecurityOrigin::Create(params.url));
if (!params.method.empty())
request.SetHTTPMethod(blink::WebString::FromASCII(params.method));
request.SetHttpMethod(blink::WebString::FromASCII(params.method));
if (params.referrer.is_valid()) {
const blink::WebString& referrer =
@ -771,7 +771,7 @@ void CefRequestImpl::Get(const CefMsg_LoadRequest_Params& params,
static_cast<cef_referrer_policy_t>(params.referrer_policy)),
params.url, blink::WebString::FromUTF8(params.referrer.spec()));
if (!referrer.IsEmpty()) {
request.SetHTTPReferrer(
request.SetHttpReferrer(
referrer,
NetReferrerPolicyToBlinkReferrerPolicy(
static_cast<cef_referrer_policy_t>(params.referrer_policy)));
@ -793,7 +793,7 @@ void CefRequestImpl::Get(const CefMsg_LoadRequest_Params& params,
const base::string16& method = request.HttpMethod().Utf16();
if (method == base::ASCIIToUTF16("GET") ||
method == base::ASCIIToUTF16("HEAD")) {
request.SetHTTPMethod(blink::WebString::FromASCII("POST"));
request.SetHttpMethod(blink::WebString::FromASCII("POST"));
}
// The comparison performed by httpHeaderField() is case insensitive.
@ -823,7 +823,7 @@ void CefRequestImpl::Get(const CefMsg_LoadRequest_Params& params,
}
}
request.SetHTTPBody(body);
request.SetHttpBody(body);
}
if (params.site_for_cookies.is_valid())

View File

@ -203,7 +203,7 @@ void CefResponseImpl::Set(const blink::WebURLResponse& response) {
};
HeaderVisitor visitor(&header_map_);
response.VisitHTTPHeaderFields(&visitor);
response.VisitHttpHeaderFields(&visitor);
}
void CefResponseImpl::Set(const net::URLRequest* request) {

View File

@ -419,7 +419,7 @@ void CefContentRendererClient::RenderThreadStarted() {
}
for (auto& origin_or_hostname_pattern : network::GetSecureOriginAllowlist()) {
blink::WebSecurityPolicy::AddOriginTrustworthyWhiteList(
blink::WebSecurityPolicy::AddOriginToTrustworthySafelist(
blink::WebString::FromUTF8(origin_or_hostname_pattern));
}

View File

@ -443,19 +443,22 @@ v8::Local<v8::String> GetV8String(v8::Isolate* isolate, const CefString& str) {
#if defined(CEF_STRING_TYPE_UTF16)
// Already a UTF16 string.
return v8::String::NewFromTwoByte(
isolate,
reinterpret_cast<uint16_t*>(
const_cast<CefString::char_type*>(str.c_str())),
v8::String::kNormalString, str.length());
isolate,
reinterpret_cast<uint16_t*>(
const_cast<CefString::char_type*>(str.c_str())),
v8::NewStringType::kNormal, str.length())
.ToLocalChecked();
#elif defined(CEF_STRING_TYPE_UTF8)
// Already a UTF8 string.
return v8::String::NewFromUtf8(isolate, const_cast<char*>(str.c_str()),
v8::String::kNormalString, str.length());
v8::NewStringType::kNormal, str.length())
.ToLocalChecked();
#else
// Convert the string to UTF8.
std::string tmpStr = str;
return v8::String::NewFromUtf8(isolate, tmpStr.c_str(),
v8::String::kNormalString, tmpStr.length());
v8::NewStringType::kNormal, tmpStr.length())
.ToLocalChecked();
#endif
}
@ -1503,7 +1506,7 @@ void CefV8ValueImpl::InitFromV8Value(v8::Local<v8::Context> context,
} else if (value->IsFalse()) {
InitBool(false);
} else if (value->IsBoolean()) {
InitBool(value->ToBoolean(context).ToLocalChecked()->Value());
InitBool(value->ToBoolean(context->GetIsolate())->Value());
} else if (value->IsInt32()) {
InitInt(value->ToInt32(context).ToLocalChecked()->Value());
} else if (value->IsUint32()) {

View File

@ -424,8 +424,10 @@ patches = [
'name': 'services_network_2622',
},
{
# Windows: Revert base::Value change which breaks cef_sandbox build.
# Windows: Remove the base::Value is_standard_layout assert which will fail
# for the cef_sandbox build, and which is no longer required.
# https://bugs.chromium.org/p/chromium/issues/detail?id=646113#c173
# https://chromium.googlesource.com/chromium/src/+/2f28731c17
'name': 'base_value_646113',
},
{
@ -437,5 +439,16 @@ patches = [
# Remove requirement that enforces component builds
# http://crrev.com/567d828446
'name': 'remove_component_build_check',
},
{
# Fix CompositorFrameReportingController usage of DCHECK_NE to compare
# unique_ptr types.
# https://chromium-review.googlesource.com/c/chromium/src/+/1584292
'name': 'compositor_frame_reporting_controller_1584292',
},
{
# Fix AssertContextWasntDestroyed due to pointer reuse.
# https://chromium-review.googlesource.com/c/chromium/src/+/1590418
'name': 'simple_dependency_manager_1590418',
}
]

View File

@ -1,8 +1,8 @@
diff --git base/values.cc base/values.cc
index 6f3a9e2cd8a2..d35972814034 100644
index 03acb86bbc04..b65a6d542987 100644
--- base/values.cc
+++ base/values.cc
@@ -22,20 +22,6 @@
@@ -23,20 +23,6 @@
namespace base {
@ -20,240 +20,6 @@ index 6f3a9e2cd8a2..d35972814034 100644
- "base::Value should be a standard-layout C++ class in order "
- "to avoid undefined behaviour in its implementation!");
-
namespace {
static_assert(sizeof(Value::DoubleStorage) == sizeof(double),
"The double and DoubleStorage types should have the same size");
const char* const kTypeNames[] = {"null", "boolean", "integer", "double",
@@ -150,15 +136,15 @@ Value::Value(Type type) : type_(type) {
}
Value::Value(bool in_bool)
- : bool_type_(Type::BOOLEAN),
+ : type_(Type::BOOLEAN),
bool_value_(in_bool) {}
Value::Value(int in_int)
- : int_type_(Type::INTEGER),
+ : type_(Type::INTEGER),
int_value_(in_int) {}
Value::Value(double in_double)
- : double_type_(Type::DOUBLE),
+ : type_(Type::DOUBLE),
double_value_(in_double) {
if (!std::isfinite(double_value_)) {
NOTREACHED() << "Non-finite (i.e. NaN or positive/negative infinity) "
@@ -172,7 +158,7 @@ Value::Value(const char* in_string) : Value(std::string(in_string)) {}
Value::Value(StringPiece in_string) : Value(std::string(in_string)) {}
Value::Value(std::string&& in_string) noexcept
- : string_type_(Type::STRING),
+ : type_(Type::STRING),
string_value_(std::move(in_string)) {
DCHECK(IsStringUTF8(string_value_));
}
@@ -182,19 +168,19 @@ Value::Value(const char16* in_string16) : Value(StringPiece16(in_string16)) {}
Value::Value(StringPiece16 in_string16) : Value(UTF16ToUTF8(in_string16)) {}
Value::Value(const std::vector<char>& in_blob)
- : binary_type_(Type::BINARY),
+ : type_(Type::BINARY),
binary_value_(in_blob.begin(), in_blob.end()) {}
Value::Value(base::span<const uint8_t> in_blob)
- : binary_type_(Type::BINARY),
+ : type_(Type::BINARY),
binary_value_(in_blob.begin(), in_blob.end()) {}
Value::Value(BlobStorage&& in_blob) noexcept
- : binary_type_(Type::BINARY),
+ : type_(Type::BINARY),
binary_value_(std::move(in_blob)) {}
Value::Value(const DictStorage& in_dict)
- : dict_type_(Type::DICTIONARY), dict_() {
+ : type_(Type::DICTIONARY), dict_() {
dict_.reserve(in_dict.size());
for (const auto& it : in_dict) {
dict_.try_emplace(dict_.end(), it.first,
@@ -203,17 +189,17 @@ Value::Value(const DictStorage& in_dict)
}
Value::Value(DictStorage&& in_dict) noexcept
- : dict_type_(Type::DICTIONARY),
+ : type_(Type::DICTIONARY),
dict_(std::move(in_dict)) {}
-Value::Value(const ListStorage& in_list) : list_type_(Type::LIST), list_() {
+Value::Value(const ListStorage& in_list) : type_(Type::LIST), list_() {
list_.reserve(in_list.size());
for (const auto& val : in_list)
list_.emplace_back(val.Clone());
}
Value::Value(ListStorage&& in_list) noexcept
- : list_type_(Type::LIST),
+ : type_(Type::LIST),
list_(std::move(in_list)) {}
Value& Value::operator=(Value&& that) noexcept {
diff --git base/values.h base/values.h
index 7bc355ee586d..441967681a4b 100644
--- base/values.h
+++ base/values.h
@@ -390,78 +390,18 @@ class BASE_EXPORT Value {
size_t EstimateMemoryUsage() const;
protected:
- // Technical note:
- // The naive way to implement a tagged union leads to wasted bytes
- // in the object on CPUs like ARM ones, which impose an 8-byte alignment
- // for double values. I.e. if one does something like:
- //
- // struct TaggedValue {
- // int type_; // size = 1, align = 4
- // union {
- // bool bool_value_; // size = 1, align = 1
- // int int_value_; // size = 4, align = 4
- // double double_value_; // size = 8, align = 8
- // std::string string_value_; // size = 12, align = 4 (32-bit)
- // };
- // };
- //
- // The end result is that the union will have an alignment of 8, and a size
- // of 16, due to 4 extra padding bytes following |string_value_| to respect
- // the alignment requirement.
- //
- // As a consequence, the struct TaggedValue will have a size of 24 bytes,
- // due to the size of the union (16), the size of |type_| (4) and 4 bytes
- // of padding between |type_| and the union to respect its alignment.
- //
- // This means 8 bytes of unused memory per instance on 32-bit ARM!
- //
- // To reclaim these, a union of structs is used instead, in order to ensure
- // that |double_value_| below is always located at an offset that is a
- // multiple of 8, relative to the start of the overall data structure.
- //
- // Each struct must declare its own |type_| field, which must have a different
- // name, to appease the C++ compiler.
- //
- // Using this technique sizeof(base::Value) == 16 on 32-bit ARM instead
- // of 24, without losing any information. Results are unchanged for x86,
- // x86_64 and arm64 (16, 32 and 32 bytes respectively).
+ // TODO(crbug.com/646113): Make these private once DictionaryValue and
+ // ListValue are properly inlined.
+ Type type_;
+
union {
- struct {
- // TODO(crbug.com/646113): Make these private once DictionaryValue and
- // ListValue are properly inlined.
- Type type_ : 8;
- };
- struct {
- Type bool_type_ : 8;
- bool bool_value_;
- };
- struct {
- Type int_type_ : 8;
- int int_value_;
- };
- struct {
- Type double_type_ : 8;
- // Subtle: On architectures that require it, the compiler will ensure
- // that |double_value_|'s offset is a multiple of 8 (e.g. 32-bit ARM).
- // See technical note above to understand why it is important.
- double double_value_;
- };
- struct {
- Type string_type_ : 8;
- std::string string_value_;
- };
- struct {
- Type binary_type_ : 8;
- BlobStorage binary_value_;
- };
- struct {
- Type dict_type_ : 8;
- DictStorage dict_;
- };
- struct {
- Type list_type_ : 8;
- ListStorage list_;
- };
+ bool bool_value_;
+ int int_value_;
+ double double_value_;
+ std::string string_value_;
+ BlobStorage binary_value_;
+ DictStorage dict_;
+ ListStorage list_;
};
private:
diff --git base/values_unittest.cc base/values_unittest.cc
index 2907dc066843..3a65e2d6ff2b 100644
--- base/values_unittest.cc
+++ base/values_unittest.cc
@@ -6,7 +6,6 @@
#include <stddef.h>
-#include <algorithm>
#include <functional>
#include <limits>
#include <memory>
@@ -16,7 +15,6 @@
#include <vector>
#include "base/containers/adapters.h"
-#include "base/logging.h"
#include "base/strings/string16.h"
#include "base/strings/string_piece.h"
#include "base/strings/utf_string_conversions.h"
@@ -26,46 +24,6 @@
namespace base {
-// Test is currently incorrect on Windows x86.
-#if !defined(OS_WIN) || !defined(ARCH_CPU_X86)
-TEST(ValuesTest, SizeOfValue) {
- // Ensure that base::Value is as small as possible, i.e. that there is
- // no wasted space after the inner value due to alignment constraints.
- // Distinguish between the 'header' that includes |type_| and and the inner
- // value that follows it, which can be a bool, int, double, string, blob, list
- // or dict.
-#define INNER_TYPES_LIST(X) \
- X(bool, bool_value_) \
- X(int, int_value_) \
- X(double, double_value_) \
- X(std::string, string_value_) \
- X(Value::BlobStorage, binary_value_) \
- X(Value::ListStorage, list_) \
- X(Value::DictStorage, dict_)
-
-#define INNER_STRUCT_LIMIT(type, value) offsetof(Value, value) + sizeof(type),
-
- // Return the maximum size in bytes of each inner struct inside base::Value
- size_t max_inner_struct_limit =
- std::max({INNER_TYPES_LIST(INNER_STRUCT_LIMIT)});
-
- // Ensure that base::Value is not larger than necessary, i.e. that there is
- // no un-necessary padding afte the structs due to alignment constraints of
- // one of the inner fields.
- EXPECT_EQ(max_inner_struct_limit, sizeof(Value));
- if (max_inner_struct_limit != sizeof(Value)) {
- // The following are useful to understand what's wrong when the EXPECT_EQ()
- // above actually fails.
-#define PRINT_INNER_FIELD_INFO(x, y) \
- LOG(INFO) << #y " type=" #x " size=" << sizeof(x) << " align=" << alignof(x);
-
- LOG(INFO) << "Value size=" << sizeof(Value) << " align=" << alignof(Value);
- INNER_TYPES_LIST(PRINT_INNER_FIELD_INFO)
- LOG(INFO) << "max_inner_struct_limit=" << max_inner_struct_limit;
- }
-}
-#endif
-
TEST(ValuesTest, TestNothrow) {
static_assert(std::is_nothrow_move_constructible<Value>::value,
"IsNothrowMoveConstructible");

View File

@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_widget_host_view_child_frame.cc content/browser/renderer_host/render_widget_host_view_child_frame.cc
index 88681456e180..aec9ee42e21b 100644
index e098a5261725..001670b0a7aa 100644
--- content/browser/renderer_host/render_widget_host_view_child_frame.cc
+++ content/browser/renderer_host/render_widget_host_view_child_frame.cc
@@ -650,6 +650,7 @@ void RenderWidgetHostViewChildFrame::SubmitCompositorFrame(
@@ -649,6 +649,7 @@ void RenderWidgetHostViewChildFrame::SubmitCompositorFrame(
"RenderWidgetHostViewChildFrame::OnSwapCompositorFrame");
support_->SubmitCompositorFrame(local_surface_id, std::move(frame),
std::move(hit_test_region_list));
@ -10,7 +10,7 @@ index 88681456e180..aec9ee42e21b 100644
}
void RenderWidgetHostViewChildFrame::OnDidNotProduceFrame(
@@ -658,6 +659,15 @@ void RenderWidgetHostViewChildFrame::OnDidNotProduceFrame(
@@ -657,6 +658,15 @@ void RenderWidgetHostViewChildFrame::OnDidNotProduceFrame(
support_->DidNotProduceFrame(ack);
}
@ -26,7 +26,7 @@ index 88681456e180..aec9ee42e21b 100644
void RenderWidgetHostViewChildFrame::TransformPointToRootSurface(
gfx::PointF* point) {
// This function is called by RenderWidgetHostInputEventRouter only for
@@ -842,6 +852,11 @@ void RenderWidgetHostViewChildFrame::ShowDefinitionForSelection() {
@@ -841,6 +851,11 @@ void RenderWidgetHostViewChildFrame::ShowDefinitionForSelection() {
void RenderWidgetHostViewChildFrame::SpeakSelection() {}
#endif // defined(OS_MACOSX)

View File

@ -12,7 +12,7 @@ index de89d291e5cb..9ce7bf4cb250 100644
// Force a new surface id to be allocated. Returns true if the
// RenderWidgetHostImpl sent the resulting surface id to the renderer.
diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm
index 6cdd1d10b580..312f27823674 100644
index 625566d5ad25..64e2732caf24 100644
--- content/browser/renderer_host/browser_compositor_view_mac.mm
+++ content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -84,6 +84,12 @@ DelegatedFrameHost* BrowserCompositorMac::GetDelegatedFrameHost() {

View File

@ -79,10 +79,10 @@ index bfb918a2cba3..a193b5a0fed8 100644
// Creates a new View that holds a non-top-level widget and receives messages
// for it.
diff --git content/browser/web_contents/web_contents_view_aura.cc content/browser/web_contents/web_contents_view_aura.cc
index 0c15633445d7..e6224d9a7612 100644
index 74f537d11618..85110e2e6ecf 100644
--- content/browser/web_contents/web_contents_view_aura.cc
+++ content/browser/web_contents/web_contents_view_aura.cc
@@ -763,7 +763,8 @@ void WebContentsViewAura::CreateView(const gfx::Size& initial_size,
@@ -818,7 +818,8 @@ void WebContentsViewAura::CreateView(const gfx::Size& initial_size,
}
RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
@ -92,7 +92,7 @@ index 0c15633445d7..e6224d9a7612 100644
if (render_widget_host->GetView()) {
// During testing, the view will already be set up in most cases to the
// test view, so we don't want to clobber it with a real one. To verify that
@@ -775,6 +776,7 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
@@ -830,6 +831,7 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
render_widget_host->GetView());
}
@ -221,7 +221,7 @@ index 4266d4c817d4..7bcede99bca1 100644
RenderWidgetHost* render_widget_host) override;
void SetPageTitle(const base::string16& title) override;
diff --git content/browser/web_contents/web_contents_view_mac.mm content/browser/web_contents/web_contents_view_mac.mm
index 011c81a25cb6..2d2a744a582c 100644
index 2d24491812f5..bbba45c502e5 100644
--- content/browser/web_contents/web_contents_view_mac.mm
+++ content/browser/web_contents/web_contents_view_mac.mm
@@ -319,7 +319,8 @@ void WebContentsViewMac::CreateView(

View File

@ -1,5 +1,5 @@
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
index b37e8d1f2ab6..f42ea327a9e8 100644
index 4b24c762b6e9..d2fd1fc5d414 100644
--- build/config/compiler/BUILD.gn
+++ build/config/compiler/BUILD.gn
@@ -157,7 +157,7 @@ declare_args() {
@ -11,7 +11,7 @@ index b37e8d1f2ab6..f42ea327a9e8 100644
!(current_cpu == "x86" || current_cpu == "x64"))))
}
@@ -1696,8 +1696,6 @@ config("thin_archive") {
@@ -1701,8 +1701,6 @@ config("thin_archive") {
# archive names to 16 characters, which is not what we want).
if ((is_posix && !is_nacl && !is_mac && !is_ios) || is_fuchsia) {
arflags = [ "-T" ]

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
index c9a0e95880f3..2a3667c5acc5 100644
index 987b36217aad..832eab3ee56a 100644
--- chrome/browser/BUILD.gn
+++ chrome/browser/BUILD.gn
@@ -8,6 +8,7 @@ import("//build/config/features.gni")
@ -10,7 +10,7 @@ index c9a0e95880f3..2a3667c5acc5 100644
import("//chrome/common/features.gni")
import("//components/feature_engagement/features.gni")
import("//components/feed/features.gni")
@@ -1807,6 +1808,7 @@ jumbo_split_static_library("browser") {
@@ -1811,6 +1812,7 @@ jumbo_split_static_library("browser") {
"//base:i18n",
"//base/allocator:buildflags",
"//cc",
@ -18,7 +18,7 @@ index c9a0e95880f3..2a3667c5acc5 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -2105,6 +2107,10 @@ jumbo_split_static_library("browser") {
@@ -2111,6 +2113,10 @@ jumbo_split_static_library("browser") {
]
}
@ -29,7 +29,7 @@ index c9a0e95880f3..2a3667c5acc5 100644
if (is_android) {
sources += [
"after_startup_task_utils_android.cc",
@@ -3877,7 +3883,7 @@ jumbo_split_static_library("browser") {
@@ -3916,7 +3922,7 @@ jumbo_split_static_library("browser") {
]
}

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/content_settings/host_content_settings_map_factory.cc chrome/browser/content_settings/host_content_settings_map_factory.cc
index 9596665e9320..c38584d4a222 100644
index 8d55c77443cd..a8314498c93f 100644
--- chrome/browser/content_settings/host_content_settings_map_factory.cc
+++ chrome/browser/content_settings/host_content_settings_map_factory.cc
@@ -7,6 +7,7 @@
@ -21,7 +21,7 @@ index 9596665e9320..c38584d4a222 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/extension_service.h"
#include "extensions/browser/extension_system.h"
@@ -42,8 +47,14 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory()
@@ -44,8 +49,14 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory()
DependsOn(SupervisedUserSettingsServiceFactory::GetInstance());
#endif
#if BUILDFLAG(ENABLE_EXTENSIONS)
@ -36,7 +36,7 @@ index 9596665e9320..c38584d4a222 100644
#endif
}
@@ -88,10 +99,16 @@ scoped_refptr<RefcountedKeyedService>
@@ -90,10 +101,16 @@ scoped_refptr<RefcountedKeyedService>
base::FeatureList::IsEnabled(features::kPermissionDelegation)));
#if BUILDFLAG(ENABLE_EXTENSIONS)

View File

@ -24,10 +24,10 @@ index cac72c6a2fd1..2ed83a4af1b3 100644
// network quality change events.
virtual network::NetworkQualityTracker* network_quality_tracker() = 0;
diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc
index 6699792348cc..5a550106043d 100644
index 0b15890653cb..175eb09c6dc7 100644
--- chrome/browser/browser_process_impl.cc
+++ chrome/browser/browser_process_impl.cc
@@ -665,6 +665,10 @@ BrowserProcessImpl::system_network_context_manager() {
@@ -681,6 +681,10 @@ BrowserProcessImpl::system_network_context_manager() {
return SystemNetworkContextManager::GetInstance();
}
@ -39,7 +39,7 @@ index 6699792348cc..5a550106043d 100644
BrowserProcessImpl::shared_url_loader_factory() {
return system_network_context_manager()->GetSharedURLLoaderFactory();
diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h
index 9bf48b759148..90d455eae40d 100644
index 6c8e21f6f5fe..4496c5579265 100644
--- chrome/browser/browser_process_impl.h
+++ chrome/browser/browser_process_impl.h
@@ -141,6 +141,7 @@ class BrowserProcessImpl : public BrowserProcess,
@ -51,7 +51,7 @@ index 9bf48b759148..90d455eae40d 100644
override;
network::NetworkQualityTracker* network_quality_tracker() override;
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index dba025da98a5..c6d4e2998bf4 100644
index 535c4f04c0f3..8cd8768022ae 100644
--- chrome/browser/ui/BUILD.gn
+++ chrome/browser/ui/BUILD.gn
@@ -9,6 +9,7 @@ import("//build/config/features.gni")
@ -62,7 +62,7 @@ index dba025da98a5..c6d4e2998bf4 100644
import("//chrome/common/features.gni")
import("//chromeos/assistant/assistant.gni")
import("//components/feature_engagement/features.gni")
@@ -350,6 +351,10 @@ jumbo_split_static_library("ui") {
@@ -351,6 +352,10 @@ jumbo_split_static_library("ui") {
"//build/config/compiler:wexit_time_destructors",
]
@ -73,7 +73,7 @@ index dba025da98a5..c6d4e2998bf4 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
@@ -366,6 +371,7 @@ jumbo_split_static_library("ui") {
@@ -368,6 +373,7 @@ jumbo_split_static_library("ui") {
"//base:i18n",
"//base/allocator:buildflags",
"//cc/paint",
@ -81,7 +81,7 @@ index dba025da98a5..c6d4e2998bf4 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -2322,7 +2328,7 @@ jumbo_split_static_library("ui") {
@@ -2347,7 +2353,7 @@ jumbo_split_static_library("ui") {
"views/frame/native_browser_frame_factory_ozone.cc",
]
} else {

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
index 52a1a31ee131..5a1e29fec9c8 100644
index cf4250c7ba26..b8a05db7cced 100644
--- chrome/browser/chrome_content_browser_client.cc
+++ chrome/browser/chrome_content_browser_client.cc
@@ -1033,12 +1033,16 @@ void LaunchURL(
@@ -1049,12 +1049,16 @@ void LaunchURL(
}
}
@ -22,7 +22,7 @@ index 52a1a31ee131..5a1e29fec9c8 100644
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kUserAgent)) {
diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h
index cbf1e2218e91..a42d2a4d71bb 100644
index 07e0e051ff1d..41337a1719a1 100644
--- chrome/browser/chrome_content_browser_client.h
+++ chrome/browser/chrome_content_browser_client.h
@@ -77,7 +77,8 @@ class Origin;

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
index ec2433d53264..85e2043b25b5 100644
index 376d23b7ca93..87b6418e8782 100644
--- chrome/browser/profiles/profile_manager.cc
+++ chrome/browser/profiles/profile_manager.cc
@@ -384,7 +384,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
@@ -385,7 +385,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED,
content::NotificationService::AllSources());

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/plugins/plugin_info_host_impl.cc chrome/browser/plugins/plugin_info_host_impl.cc
index e699f1feb070..f5fcc878c246 100644
index daf826ece047..615200c4b41c 100644
--- chrome/browser/plugins/plugin_info_host_impl.cc
+++ chrome/browser/plugins/plugin_info_host_impl.cc
@@ -18,6 +18,7 @@
@ -10,7 +10,7 @@ index e699f1feb070..f5fcc878c246 100644
#include "chrome/browser/browser_process.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/plugins/chrome_plugin_service_filter.h"
@@ -56,6 +57,11 @@
@@ -55,6 +56,11 @@
#include "url/gurl.h"
#include "url/origin.h"
@ -22,7 +22,7 @@ index e699f1feb070..f5fcc878c246 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "components/guest_view/browser/guest_view_base.h"
#include "extensions/browser/extension_registry.h"
@@ -102,6 +108,9 @@ bool IsPluginLoadingAccessibleResourceInWebView(
@@ -101,6 +107,9 @@ bool IsPluginLoadingAccessibleResourceInWebView(
extensions::ExtensionRegistry* extension_registry,
int process_id,
const GURL& resource) {
@ -32,7 +32,7 @@ index e699f1feb070..f5fcc878c246 100644
extensions::WebViewRendererState* renderer_state =
extensions::WebViewRendererState::GetInstance();
std::string partition_id;
@@ -131,12 +140,16 @@ bool IsPluginLoadingAccessibleResourceInWebView(
@@ -130,12 +139,16 @@ bool IsPluginLoadingAccessibleResourceInWebView(
PluginInfoHostImpl::Context::Context(int render_process_id, Profile* profile)
: render_process_id_(render_process_id),
resource_context_(profile->GetResourceContext()),
@ -52,7 +52,7 @@ index e699f1feb070..f5fcc878c246 100644
allow_outdated_plugins_.Init(prefs::kPluginsAllowOutdated,
profile->GetPrefs());
allow_outdated_plugins_.MoveToThread(
@@ -235,6 +248,7 @@ void PluginInfoHostImpl::PluginsLoaded(
@@ -234,6 +247,7 @@ void PluginInfoHostImpl::PluginsLoaded(
plugin_metadata->identifier(), &output->status);
}
@ -60,7 +60,7 @@ index e699f1feb070..f5fcc878c246 100644
if (output->status == chrome::mojom::PluginStatus::kNotFound) {
// Check to see if the component updater can fetch an implementation.
base::PostTaskAndReplyWithResult(
@@ -246,7 +260,9 @@ void PluginInfoHostImpl::PluginsLoaded(
@@ -245,7 +259,9 @@ void PluginInfoHostImpl::PluginsLoaded(
base::BindOnce(&PluginInfoHostImpl::ComponentPluginLookupDone, this,
params, std::move(output), std::move(callback),
std::move(plugin_metadata)));
@ -71,7 +71,7 @@ index e699f1feb070..f5fcc878c246 100644
GetPluginInfoFinish(params, std::move(output), std::move(callback),
std::move(plugin_metadata));
}
@@ -259,6 +275,14 @@ void PluginInfoHostImpl::Context::DecidePluginStatus(
@@ -258,6 +274,14 @@ void PluginInfoHostImpl::Context::DecidePluginStatus(
PluginMetadata::SecurityStatus security_status,
const std::string& plugin_identifier,
chrome::mojom::PluginStatus* status) const {
@ -86,7 +86,7 @@ index e699f1feb070..f5fcc878c246 100644
if (security_status == PluginMetadata::SECURITY_STATUS_FULLY_TRUSTED) {
*status = chrome::mojom::PluginStatus::kAllowed;
return;
@@ -377,16 +401,36 @@ bool PluginInfoHostImpl::Context::FindEnabledPlugin(
@@ -366,16 +390,36 @@ bool PluginInfoHostImpl::Context::FindEnabledPlugin(
return false;
}
@ -125,7 +125,7 @@ index e699f1feb070..f5fcc878c246 100644
// If we broke out of the loop, we have found an enabled plugin.
bool enabled = i < matching_plugins.size();
diff --git chrome/browser/plugins/plugin_utils.cc chrome/browser/plugins/plugin_utils.cc
index 68e7057b7cf6..102caf10e68c 100644
index 01ea0ba7f0cb..2828896bbcad 100644
--- chrome/browser/plugins/plugin_utils.cc
+++ chrome/browser/plugins/plugin_utils.cc
@@ -5,6 +5,7 @@
@ -148,7 +148,7 @@ index 68e7057b7cf6..102caf10e68c 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "extensions/browser/info_map.h"
#include "extensions/common/constants.h"
@@ -158,10 +164,23 @@ PluginUtils::GetMimeTypeToExtensionIdMap(
@@ -180,10 +186,23 @@ PluginUtils::GetMimeTypeToExtensionIdMap(
content::ResourceContext* resource_context) {
base::flat_map<std::string, std::string> mime_type_to_extension_id_map;
#if BUILDFLAG(ENABLE_EXTENSIONS)
@ -172,7 +172,7 @@ index 68e7057b7cf6..102caf10e68c 100644
std::vector<std::string> whitelist = MimeTypesHandler::GetMIMETypeWhitelist();
// Go through the white-listed extensions and try to use them to intercept
// the URL request.
@@ -176,7 +195,7 @@ PluginUtils::GetMimeTypeToExtensionIdMap(
@@ -198,7 +217,7 @@ PluginUtils::GetMimeTypeToExtensionIdMap(
}
if (extension_id == extension_misc::kPdfExtensionId &&
@ -182,10 +182,10 @@ index 68e7057b7cf6..102caf10e68c 100644
}
diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc
index a838fabbdfcb..93ccc1cbdb35 100644
index 202376e2548e..15a7bd34cf48 100644
--- chrome/renderer/chrome_content_renderer_client.cc
+++ chrome/renderer/chrome_content_renderer_client.cc
@@ -752,6 +752,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -758,6 +758,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
if ((status == chrome::mojom::PluginStatus::kUnauthorized ||
status == chrome::mojom::PluginStatus::kBlocked) &&
@ -193,7 +193,7 @@ index a838fabbdfcb..93ccc1cbdb35 100644
observer->IsPluginTemporarilyAllowed(identifier)) {
status = chrome::mojom::PluginStatus::kAllowed;
}
@@ -936,7 +937,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -942,7 +943,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
&plugin_auth_host);
plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier);
@ -203,7 +203,7 @@ index a838fabbdfcb..93ccc1cbdb35 100644
break;
}
case chrome::mojom::PluginStatus::kBlocked: {
@@ -945,7 +947,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -951,7 +953,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
placeholder->AllowLoading();
RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked"));
@ -213,7 +213,7 @@ index a838fabbdfcb..93ccc1cbdb35 100644
break;
}
case chrome::mojom::PluginStatus::kBlockedByPolicy: {
@@ -955,7 +958,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -961,7 +964,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
group_name));
RenderThread::Get()->RecordAction(
UserMetricsAction("Plugin_BlockedByPolicy"));
@ -223,7 +223,7 @@ index a838fabbdfcb..93ccc1cbdb35 100644
break;
}
case chrome::mojom::PluginStatus::kBlockedNoLoading: {
@@ -963,7 +967,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -969,7 +973,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 2fa66151a8ad..de180c486eda 100644
index 44798c35c1e7..88a7639a96d9 100644
--- chrome/renderer/BUILD.gn
+++ chrome/renderer/BUILD.gn
@@ -4,6 +4,7 @@

View File

@ -69,7 +69,7 @@ index 886bdf0edf8f..1d714000cce5 100644
blink::mojom::V8CacheOptions GetV8CacheOptions();
diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn
index 65c03e2a2f7d..f44826c38236 100644
index c62ad20e5ef9..6e43db6a2fda 100644
--- third_party/blink/renderer/controller/BUILD.gn
+++ third_party/blink/renderer/controller/BUILD.gn
@@ -26,6 +26,7 @@ jumbo_component("controller") {
@ -80,7 +80,7 @@ index 65c03e2a2f7d..f44826c38236 100644
"//third_party/blink/renderer:config",
"//third_party/blink/renderer:inside_blink",
"//third_party/blink/renderer:non_test_config",
@@ -46,6 +47,8 @@ jumbo_component("controller") {
@@ -44,6 +45,8 @@ jumbo_component("controller") {
"dev_tools_frontend_impl.h",
"memory_usage_monitor.cc",
"memory_usage_monitor.h",

View File

@ -0,0 +1,15 @@
diff --git cc/scheduler/compositor_frame_reporting_controller.cc cc/scheduler/compositor_frame_reporting_controller.cc
index f1587ed158d4..1b17021fd229 100644
--- cc/scheduler/compositor_frame_reporting_controller.cc
+++ cc/scheduler/compositor_frame_reporting_controller.cc
@@ -31,8 +31,8 @@ void CompositorFrameReportingController::WillBeginImplFrame() {
void CompositorFrameReportingController::WillBeginMainFrame() {
DCHECK(reporters_[PipelineStage::kBeginImplFrame]);
- DCHECK_NE(reporters_[PipelineStage::kBeginMainFrame],
- reporters_[PipelineStage::kBeginImplFrame]);
+ DCHECK(reporters_[PipelineStage::kBeginMainFrame] !=
+ reporters_[PipelineStage::kBeginImplFrame]);
reporters_[PipelineStage::kBeginImplFrame]->StartStage(
"SendBeginMainFrameToCommit");
AdvanceReporterStage(PipelineStage::kBeginImplFrame,

View File

@ -14,10 +14,10 @@ index 010f9511741c..a777f2d7a106 100644
// The GetPlugins call causes the plugin list to be refreshed. Once that's
// done we can retry the GetPluginInfo call. We break out of this cycle
diff --git chrome/browser/plugins/chrome_plugin_service_filter.cc chrome/browser/plugins/chrome_plugin_service_filter.cc
index c9ca4a805d1b..0928f0e237f1 100644
index 5c2a2d0adf1c..54fc2db321e9 100644
--- chrome/browser/plugins/chrome_plugin_service_filter.cc
+++ chrome/browser/plugins/chrome_plugin_service_filter.cc
@@ -169,6 +169,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable(
@@ -168,6 +168,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable(
int render_frame_id,
const void* context,
const GURL& plugin_content_url,
@ -78,28 +78,11 @@ index 94892dd57d36..1d4036fdedf8 100644
version.SetString("User-Agent",
GetContentClient()->browser()->GetUserAgent());
version.SetString("V8-Version", V8_VERSION_STRING);
diff --git content/browser/frame_host/navigation_handle_impl.cc content/browser/frame_host/navigation_handle_impl.cc
index 8191262c3815..0fc558a96b1b 100644
--- content/browser/frame_host/navigation_handle_impl.cc
+++ content/browser/frame_host/navigation_handle_impl.cc
@@ -316,12 +316,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() {
}
RenderFrameHostImpl* NavigationHandleImpl::GetRenderFrameHost() {
- // Only allow the RenderFrameHost to be retrieved once it has been set for
- // this navigation. This will happens either at WillProcessResponse time for
- // regular navigations or at WillFailRequest time for error pages.
- CHECK_GE(state_, PROCESSING_WILL_FAIL_REQUEST)
- << "This accessor should only be called after a RenderFrameHost has been "
- "picked for this navigation.";
static_assert(WILL_FAIL_REQUEST < WILL_PROCESS_RESPONSE,
"WillFailRequest state should come before WillProcessResponse");
return navigation_request_->render_frame_host();
diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc
index 23470d05e0bd..550d1dd993af 100644
index 5cadc6afb658..f30c0b60285b 100644
--- content/browser/frame_host/render_frame_message_filter.cc
+++ content/browser/frame_host/render_frame_message_filter.cc
@@ -707,6 +707,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id,
@@ -705,6 +705,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id,
void RenderFrameMessageFilter::OnGetPluginInfo(
int render_frame_id,
const GURL& url,
@ -107,7 +90,7 @@ index 23470d05e0bd..550d1dd993af 100644
const url::Origin& main_frame_origin,
const std::string& mime_type,
bool* found,
@@ -718,8 +719,8 @@ void RenderFrameMessageFilter::OnGetPluginInfo(
@@ -716,8 +717,8 @@ void RenderFrameMessageFilter::OnGetPluginInfo(
bool allow_wildcard = true;
*found = plugin_service_->GetPluginInfo(
render_process_id_, render_frame_id, resource_context_, url,
@ -131,10 +114,10 @@ index 641c7bcbf1b8..3faf6a6452c4 100644
const std::string& mime_type,
bool* found,
diff --git content/browser/loader/mime_sniffing_resource_handler.cc content/browser/loader/mime_sniffing_resource_handler.cc
index 31aa4bc38442..0314343499d3 100644
index 7b73b2a8a838..da5aacc31910 100644
--- content/browser/loader/mime_sniffing_resource_handler.cc
+++ content/browser/loader/mime_sniffing_resource_handler.cc
@@ -510,8 +510,8 @@ bool MimeSniffingResourceHandler::CheckForPluginHandler(
@@ -512,8 +512,8 @@ bool MimeSniffingResourceHandler::CheckForPluginHandler(
WebPluginInfo plugin;
bool has_plugin = plugin_service_->GetPluginInfo(
info->GetChildID(), info->GetRenderFrameID(), info->GetContext(),
@ -146,10 +129,10 @@ index 31aa4bc38442..0314343499d3 100644
if (stale) {
// Refresh the plugins asynchronously.
diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc
index f9d3104fa375..719b84b88615 100644
index 0010982ecf26..b32f3b14e0c0 100644
--- content/browser/loader/navigation_url_loader_impl.cc
+++ content/browser/loader/navigation_url_loader_impl.cc
@@ -927,6 +927,12 @@ class NavigationURLLoaderImpl::URLLoaderRequestController
@@ -896,6 +896,12 @@ class NavigationURLLoaderImpl::URLLoaderRequestController
resource_request_->has_user_gesture, resource_request_->method,
resource_request_->headers, &proxied_factory_request_,
external_protocol_factory);
@ -162,7 +145,7 @@ index f9d3104fa375..719b84b88615 100644
if (external_protocol_factory) {
factory =
@@ -1156,7 +1162,7 @@ class NavigationURLLoaderImpl::URLLoaderRequestController
@@ -1137,7 +1143,7 @@ class NavigationURLLoaderImpl::URLLoaderRequestController
// path does as well for navigations.
bool has_plugin = PluginService::GetInstance()->GetPluginInfo(
-1 /* render_process_id */, -1 /* render_frame_id */, resource_context_,
@ -279,10 +262,10 @@ index 3009401dac6b..b4c5a9e2db50 100644
};
diff --git content/common/frame_messages.h content/common/frame_messages.h
index 5ea18183cc12..a40b09f2e0e4 100644
index 8673d65844ea..7d13c72dca9b 100644
--- content/common/frame_messages.h
+++ content/common/frame_messages.h
@@ -1278,9 +1278,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
@@ -1286,9 +1286,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
// type. If there is no matching plugin, |found| is false.
// |actual_mime_type| is the actual mime type supported by the
// found plugin.
@ -295,10 +278,10 @@ index 5ea18183cc12..a40b09f2e0e4 100644
std::string /* mime_type */,
bool /* found */,
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
index b89c08735e10..4a319326afb9 100644
index 0a1bf5d0b4d1..6dea4f0f4a44 100644
--- content/public/browser/content_browser_client.h
+++ content/public/browser/content_browser_client.h
@@ -1439,6 +1439,15 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1460,6 +1460,15 @@ class CONTENT_EXPORT ContentBrowserClient {
network::mojom::URLLoaderFactoryRequest* factory_request,
network::mojom::URLLoaderFactory*& out_factory);
@ -314,7 +297,7 @@ index b89c08735e10..4a319326afb9 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.
@@ -1506,6 +1515,10 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1527,6 +1536,10 @@ class CONTENT_EXPORT ContentBrowserClient {
// Used as part of the user agent string.
virtual std::string GetProduct() const;
@ -350,7 +333,7 @@ index 3b610b1f554e..7c439e060779 100644
WebPluginInfo* plugin) = 0;
diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h
index a7413c47e02b..54e7f221ed04 100644
index fad5f104f011..fd7ecbcd48b8 100644
--- content/public/renderer/content_renderer_client.h
+++ content/public/renderer/content_renderer_client.h
@@ -73,6 +73,9 @@ class CONTENT_EXPORT ContentRendererClient {
@ -375,10 +358,10 @@ index a7413c47e02b..54e7f221ed04 100644
// started.
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
diff --git content/public/renderer/render_frame_observer.h content/public/renderer/render_frame_observer.h
index f16b90c8077b..8f6c7cddaf9a 100644
index 8935697155f5..179b6ebf1360 100644
--- content/public/renderer/render_frame_observer.h
+++ content/public/renderer/render_frame_observer.h
@@ -194,6 +194,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
@@ -202,6 +202,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
virtual void DidReceiveTransferSizeUpdate(int resource_id,
int received_data_length) {}
@ -389,10 +372,10 @@ index f16b90c8077b..8f6c7cddaf9a 100644
virtual void FocusedNodeChanged(const blink::WebNode& node) {}
diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc
index 61e0039608e8..b79b6a2dbc22 100644
index c75b6177f066..860bbe9e1c14 100644
--- content/renderer/render_frame_impl.cc
+++ content/renderer/render_frame_impl.cc
@@ -3926,7 +3926,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
@@ -3996,7 +3996,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
std::string mime_type;
bool found = false;
Send(new FrameHostMsg_GetPluginInfo(
@ -402,7 +385,7 @@ index 61e0039608e8..b79b6a2dbc22 100644
params.mime_type.Utf8(), &found, &info, &mime_type));
if (!found)
return nullptr;
@@ -4353,6 +4354,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) {
@@ -4422,6 +4423,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) {
void RenderFrameImpl::FrameFocused() {
Send(new FrameHostMsg_FrameFocused(routing_id_));
@ -412,7 +395,7 @@ index 61e0039608e8..b79b6a2dbc22 100644
void RenderFrameImpl::DidChangeName(const blink::WebString& name) {
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
index 47903ba66fd6..8c2fdded4d32 100644
index e47b89dbbe1c..8cd96c860595 100644
--- content/renderer/render_thread_impl.cc
+++ content/renderer/render_thread_impl.cc
@@ -806,6 +806,8 @@ void RenderThreadImpl::Init() {
@ -425,7 +408,7 @@ index 47903ba66fd6..8c2fdded4d32 100644
base::Bind(&RenderThreadImpl::OnRendererInterfaceRequest,
base::Unretained(this)));
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
index 2c6828e7b474..f0e0611a0c59 100644
index 30273211857b..8d4a7295d62c 100644
--- content/renderer/renderer_blink_platform_impl.cc
+++ content/renderer/renderer_blink_platform_impl.cc
@@ -1113,6 +1113,14 @@ void RendererBlinkPlatformImpl::RecordMetricsForBackgroundedRendererPurge() {
@ -444,7 +427,7 @@ index 2c6828e7b474..f0e0611a0c59 100644
if (!web_database_host_) {
web_database_host_ = blink::mojom::ThreadSafeWebDatabaseHostPtr::Create(
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
index d8620e051044..517d795f815e 100644
index 629362d2f990..9db27c88d9e5 100644
--- content/renderer/renderer_blink_platform_impl.h
+++ content/renderer/renderer_blink_platform_impl.h
@@ -241,6 +241,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {

View File

@ -510,7 +510,7 @@ index a76d264648d2..ff9a19e259fb 100644
handler_path, database_path, metrics_path, url,
GetProcessSimpleAnnotations(), arguments, true, false);
diff --git components/crash/content/app/crashpad_win.cc components/crash/content/app/crashpad_win.cc
index cc16c40ea320..3bb03459adf4 100644
index 8f55759a6f4a..5d60fc3f84eb 100644
--- components/crash/content/app/crashpad_win.cc
+++ components/crash/content/app/crashpad_win.cc
@@ -35,8 +35,8 @@ void GetPlatformCrashpadAnnotations(

View File

@ -146,7 +146,7 @@ index a2b0c74636f4..01370fdc20d9 100644
struct Data;
diff --git third_party/crashpad/crashpad/handler/BUILD.gn third_party/crashpad/crashpad/handler/BUILD.gn
index e1e673e26a01..ae0224dd847d 100644
index dc32b94e651c..100a52ce25f9 100644
--- third_party/crashpad/crashpad/handler/BUILD.gn
+++ third_party/crashpad/crashpad/handler/BUILD.gn
@@ -12,6 +12,7 @@
@ -156,8 +156,8 @@ index e1e673e26a01..ae0224dd847d 100644
+import("//cef/libcef/features/features.gni")
import("../build/crashpad_buildconfig.gni")
if (crashpad_is_in_chromium) {
@@ -69,6 +70,17 @@ static_library("handler") {
static_library("handler") {
@@ -65,6 +66,17 @@ static_library("handler") {
]
}
@ -175,7 +175,7 @@ index e1e673e26a01..ae0224dd847d 100644
public_configs = [ "..:crashpad_config" ]
public_deps = [
@@ -81,6 +93,7 @@ static_library("handler") {
@@ -77,6 +89,7 @@ static_library("handler") {
"../minidump",
"../snapshot",
"../tools:tool_support",

View File

@ -159,7 +159,7 @@ index 93dce1cad08c..1eef00b03063 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 14fa00f41564..9487425a5627 100644
index b203c136597a..4967c176f9b8 100644
--- extensions/browser/process_manager.cc
+++ extensions/browser/process_manager.cc
@@ -383,9 +383,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension,

View File

@ -1,5 +1,5 @@
diff --git content/browser/compositor/browser_compositor_output_surface.cc content/browser/compositor/browser_compositor_output_surface.cc
index 0a1231d4e16c..11e1cbc521d4 100644
index 24cfe2fb6d7b..d624bf71d07d 100644
--- content/browser/compositor/browser_compositor_output_surface.cc
+++ content/browser/compositor/browser_compositor_output_surface.cc
@@ -53,6 +53,10 @@ void BrowserCompositorOutputSurface::SetReflector(ReflectorImpl* reflector) {
@ -14,10 +14,10 @@ index 0a1231d4e16c..11e1cbc521d4 100644
}
diff --git content/browser/compositor/browser_compositor_output_surface.h content/browser/compositor/browser_compositor_output_surface.h
index 3c4d448b972f..fa3f01f59484 100644
index dda4ac04b913..c82c01bd1354 100644
--- content/browser/compositor/browser_compositor_output_surface.h
+++ content/browser/compositor/browser_compositor_output_surface.h
@@ -40,6 +40,8 @@ class CONTENT_EXPORT BrowserCompositorOutputSurface
@@ -38,6 +38,8 @@ class CONTENT_EXPORT BrowserCompositorOutputSurface
void SetReflector(ReflectorImpl* reflector);
@ -27,7 +27,7 @@ index 3c4d448b972f..fa3f01f59484 100644
virtual void OnReflectorChanged();
diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc
index 0da5e9c1ecbc..49c79455b4aa 100644
index 99c703a1ba14..afd6834e44da 100644
--- content/browser/compositor/gpu_process_transport_factory.cc
+++ content/browser/compositor/gpu_process_transport_factory.cc
@@ -208,6 +208,18 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() {
@ -106,12 +106,12 @@ index 525fa0c06b33..1f95b4f53496 100644
// ImageTransportFactory implementation.
void DisableGpuCompositing() override;
diff --git content/browser/compositor/offscreen_browser_compositor_output_surface.cc content/browser/compositor/offscreen_browser_compositor_output_surface.cc
index e719683c37e9..a51294913fc4 100644
index dfedf6a60ebe..882457ebbbaa 100644
--- content/browser/compositor/offscreen_browser_compositor_output_surface.cc
+++ content/browser/compositor/offscreen_browser_compositor_output_surface.cc
@@ -34,10 +34,12 @@ OffscreenBrowserCompositorOutputSurface::
scoped_refptr<ws::ContextProviderCommandBuffer> context,
const UpdateVSyncParametersCallback& update_vsync_parameters_callback,
@@ -35,10 +35,12 @@ OffscreenBrowserCompositorOutputSurface::
const viz::UpdateVSyncParametersCallback&
update_vsync_parameters_callback,
std::unique_ptr<viz::CompositorOverlayCandidateValidator>
- overlay_candidate_validator)
+ overlay_candidate_validator,
@ -123,7 +123,7 @@ index e719683c37e9..a51294913fc4 100644
weak_ptr_factory_(this) {
capabilities_.uses_default_gl_framebuffer = false;
}
@@ -47,6 +49,10 @@ OffscreenBrowserCompositorOutputSurface::
@@ -48,6 +50,10 @@ OffscreenBrowserCompositorOutputSurface::
DiscardBackbuffer();
}
@ -134,7 +134,7 @@ index e719683c37e9..a51294913fc4 100644
void OffscreenBrowserCompositorOutputSurface::BindToClient(
viz::OutputSurfaceClient* client) {
DCHECK(client);
@@ -55,42 +61,72 @@ void OffscreenBrowserCompositorOutputSurface::BindToClient(
@@ -56,42 +62,72 @@ void OffscreenBrowserCompositorOutputSurface::BindToClient(
}
void OffscreenBrowserCompositorOutputSurface::EnsureBackbuffer() {
@ -237,7 +237,7 @@ index e719683c37e9..a51294913fc4 100644
}
void OffscreenBrowserCompositorOutputSurface::DiscardBackbuffer() {
@@ -102,6 +138,16 @@ void OffscreenBrowserCompositorOutputSurface::DiscardBackbuffer() {
@@ -103,6 +139,16 @@ void OffscreenBrowserCompositorOutputSurface::DiscardBackbuffer() {
reflector_->OnSourceTextureMailboxUpdated(nullptr);
}
@ -254,7 +254,7 @@ index e719683c37e9..a51294913fc4 100644
if (fbo_) {
gl->BindFramebuffer(GL_FRAMEBUFFER, fbo_);
gl->DeleteFramebuffers(1, &fbo_);
@@ -124,15 +170,20 @@ void OffscreenBrowserCompositorOutputSurface::Reshape(
@@ -125,15 +171,20 @@ void OffscreenBrowserCompositorOutputSurface::Reshape(
}
void OffscreenBrowserCompositorOutputSurface::BindFramebuffer() {
@ -279,7 +279,7 @@ index e719683c37e9..a51294913fc4 100644
}
}
@@ -153,6 +204,12 @@ void OffscreenBrowserCompositorOutputSurface::SwapBuffers(
@@ -154,6 +205,12 @@ void OffscreenBrowserCompositorOutputSurface::SwapBuffers(
// The original implementation had a flickering issue (crbug.com/515332).
gpu::gles2::GLES2Interface* gl = context_provider_->ContextGL();
@ -292,7 +292,7 @@ index e719683c37e9..a51294913fc4 100644
gpu::SyncToken sync_token;
gl->GenUnverifiedSyncTokenCHROMIUM(sync_token.GetData());
context_provider_->ContextSupport()->SignalSyncToken(
@@ -192,7 +249,9 @@ void OffscreenBrowserCompositorOutputSurface::OnSwapBuffersComplete(
@@ -193,7 +250,9 @@ void OffscreenBrowserCompositorOutputSurface::OnSwapBuffersComplete(
const std::vector<ui::LatencyInfo>& latency_info) {
latency_tracker_.OnGpuSwapBuffersCompleted(latency_info);
client_->DidReceiveSwapBuffersAck();
@ -304,12 +304,12 @@ index e719683c37e9..a51294913fc4 100644
unsigned OffscreenBrowserCompositorOutputSurface::UpdateGpuFence() {
diff --git content/browser/compositor/offscreen_browser_compositor_output_surface.h content/browser/compositor/offscreen_browser_compositor_output_surface.h
index 71830777ae56..6a0857b02a04 100644
index 9751f1e74d82..ca3237a4d995 100644
--- content/browser/compositor/offscreen_browser_compositor_output_surface.h
+++ content/browser/compositor/offscreen_browser_compositor_output_surface.h
@@ -31,7 +31,8 @@ class OffscreenBrowserCompositorOutputSurface
scoped_refptr<ws::ContextProviderCommandBuffer> context,
const UpdateVSyncParametersCallback& update_vsync_parameters_callback,
@@ -32,7 +32,8 @@ class OffscreenBrowserCompositorOutputSurface
const viz::UpdateVSyncParametersCallback&
update_vsync_parameters_callback,
std::unique_ptr<viz::CompositorOverlayCandidateValidator>
- overlay_candidate_validator);
+ overlay_candidate_validator,
@ -317,7 +317,7 @@ index 71830777ae56..6a0857b02a04 100644
~OffscreenBrowserCompositorOutputSurface() override;
@@ -53,11 +54,15 @@ class OffscreenBrowserCompositorOutputSurface
@@ -54,11 +55,15 @@ class OffscreenBrowserCompositorOutputSurface
gfx::BufferFormat GetOverlayBufferFormat() const override;
uint32_t GetFramebufferCopyTextureFormat() override;
@ -333,7 +333,7 @@ index 71830777ae56..6a0857b02a04 100644
void OnSwapBuffersComplete(const std::vector<ui::LatencyInfo>& latency_info);
viz::OutputSurfaceClient* client_ = nullptr;
@@ -65,6 +70,11 @@ class OffscreenBrowserCompositorOutputSurface
@@ -66,6 +71,11 @@ class OffscreenBrowserCompositorOutputSurface
uint32_t fbo_ = 0;
bool reflector_changed_ = false;
std::unique_ptr<ReflectorTexture> reflector_texture_;
@ -346,10 +346,10 @@ index 71830777ae56..6a0857b02a04 100644
base::WeakPtrFactory<OffscreenBrowserCompositorOutputSurface>
weak_ptr_factory_;
diff --git gpu/GLES2/gl2chromium_autogen.h gpu/GLES2/gl2chromium_autogen.h
index 404c05cee78b..d2ce3e8de6e9 100644
index 052b441e020d..9c3044185400 100644
--- gpu/GLES2/gl2chromium_autogen.h
+++ gpu/GLES2/gl2chromium_autogen.h
@@ -416,6 +416,10 @@
@@ -411,6 +411,10 @@
GLES2_GET_FUN(CreateClientGpuFenceCHROMIUM)
#define glWaitGpuFenceCHROMIUM GLES2_GET_FUN(WaitGpuFenceCHROMIUM)
#define glDestroyGpuFenceCHROMIUM GLES2_GET_FUN(DestroyGpuFenceCHROMIUM)
@ -359,12 +359,12 @@ index 404c05cee78b..d2ce3e8de6e9 100644
+#define glDeleteSharedTexture GLES2_GET_FUN(DeleteSharedTexture)
#define glInvalidateReadbackBufferShadowDataCHROMIUM \
GLES2_GET_FUN(InvalidateReadbackBufferShadowDataCHROMIUM)
#define glFramebufferTextureMultiviewLayeredANGLE \
#define glFramebufferTextureMultiviewOVR \
diff --git gpu/command_buffer/build_gles2_cmd_buffer.py gpu/command_buffer/build_gles2_cmd_buffer.py
index 4032b2491109..02639f9b2080 100755
index 255f6eb57f59..725e1475bbad 100755
--- gpu/command_buffer/build_gles2_cmd_buffer.py
+++ gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -4254,6 +4254,35 @@ _FUNCTION_INFO = {
@@ -4231,6 +4231,35 @@ _FUNCTION_INFO = {
'extension': 'CHROMIUM_gpu_fence',
'extension_flag': 'chromium_gpu_fence',
},
@ -401,10 +401,10 @@ index 4032b2491109..02639f9b2080 100755
'decoder_func': 'DoUnpremultiplyAndDitherCopyCHROMIUM',
'cmd_args': 'GLuint source_id, GLuint dest_id, GLint x, GLint y, '
diff --git gpu/command_buffer/client/gles2_c_lib_autogen.h gpu/command_buffer/client/gles2_c_lib_autogen.h
index b68942087179..2248762fcd77 100644
index 1772133baf4d..601301cad308 100644
--- gpu/command_buffer/client/gles2_c_lib_autogen.h
+++ gpu/command_buffer/client/gles2_c_lib_autogen.h
@@ -1909,6 +1909,20 @@ void GL_APIENTRY GLES2WaitGpuFenceCHROMIUM(GLuint gpu_fence_id) {
@@ -1896,6 +1896,20 @@ void GL_APIENTRY GLES2WaitGpuFenceCHROMIUM(GLuint gpu_fence_id) {
void GL_APIENTRY GLES2DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) {
gles2::GetGLContext()->DestroyGpuFenceCHROMIUM(gpu_fence_id);
}
@ -425,7 +425,7 @@ index b68942087179..2248762fcd77 100644
void GL_APIENTRY
GLES2InvalidateReadbackBufferShadowDataCHROMIUM(GLuint buffer_id) {
gles2::GetGLContext()->InvalidateReadbackBufferShadowDataCHROMIUM(buffer_id);
@@ -3434,6 +3448,22 @@ extern const NameToFunc g_gles2_function_table[] = {
@@ -3403,6 +3417,22 @@ extern const NameToFunc g_gles2_function_table[] = {
"glDestroyGpuFenceCHROMIUM",
reinterpret_cast<GLES2FunctionPointer>(glDestroyGpuFenceCHROMIUM),
},
@ -449,10 +449,10 @@ index b68942087179..2248762fcd77 100644
"glInvalidateReadbackBufferShadowDataCHROMIUM",
reinterpret_cast<GLES2FunctionPointer>(
diff --git gpu/command_buffer/client/gles2_cmd_helper_autogen.h gpu/command_buffer/client/gles2_cmd_helper_autogen.h
index e2ac01959e22..83fb39054432 100644
index dbe1d6080d28..6902055b7c70 100644
--- gpu/command_buffer/client/gles2_cmd_helper_autogen.h
+++ gpu/command_buffer/client/gles2_cmd_helper_autogen.h
@@ -3521,6 +3521,42 @@ void DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) {
@@ -3513,6 +3513,42 @@ void DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) {
}
}
@ -496,10 +496,10 @@ index e2ac01959e22..83fb39054432 100644
GLint shm_id,
GLuint shm_offset,
diff --git gpu/command_buffer/client/gles2_implementation.cc gpu/command_buffer/client/gles2_implementation.cc
index e748a48a8e2a..a92b41df54d3 100644
index bb4a599a9a37..3159b045d260 100644
--- gpu/command_buffer/client/gles2_implementation.cc
+++ gpu/command_buffer/client/gles2_implementation.cc
@@ -7687,6 +7687,22 @@ void GLES2Implementation::Viewport(GLint x,
@@ -7616,6 +7616,22 @@ void GLES2Implementation::Viewport(GLint x,
CheckGLError();
}
@ -523,10 +523,10 @@ index e748a48a8e2a..a92b41df54d3 100644
GLuint id,
uint32_t sync_data_shm_id,
diff --git gpu/command_buffer/client/gles2_implementation_autogen.h gpu/command_buffer/client/gles2_implementation_autogen.h
index 6882d12a79c4..b237ee953860 100644
index dd25fd00046a..cd02e794f801 100644
--- gpu/command_buffer/client/gles2_implementation_autogen.h
+++ gpu/command_buffer/client/gles2_implementation_autogen.h
@@ -1345,6 +1345,16 @@ void WaitGpuFenceCHROMIUM(GLuint gpu_fence_id) override;
@@ -1337,6 +1337,16 @@ void WaitGpuFenceCHROMIUM(GLuint gpu_fence_id) override;
void DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) override;
@ -542,9 +542,9 @@ index 6882d12a79c4..b237ee953860 100644
+
void InvalidateReadbackBufferShadowDataCHROMIUM(GLuint buffer_id) override;
void FramebufferTextureMultiviewLayeredANGLE(GLenum target,
void FramebufferTextureMultiviewOVR(GLenum target,
diff --git gpu/command_buffer/client/gles2_implementation_impl_autogen.h gpu/command_buffer/client/gles2_implementation_impl_autogen.h
index 13b36769ae3d..d2351bb96021 100644
index 123fcfe07b93..7c019fc91dd6 100644
--- gpu/command_buffer/client/gles2_implementation_impl_autogen.h
+++ gpu/command_buffer/client/gles2_implementation_impl_autogen.h
@@ -3790,6 +3790,30 @@ void GLES2Implementation::DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) {
@ -575,14 +575,14 @@ index 13b36769ae3d..d2351bb96021 100644
+ CheckGLError();
+}
+
void GLES2Implementation::FramebufferTextureMultiviewLayeredANGLE(
GLenum target,
GLenum attachment,
void GLES2Implementation::FramebufferTextureMultiviewOVR(GLenum target,
GLenum attachment,
GLuint texture,
diff --git gpu/command_buffer/client/gles2_interface_autogen.h gpu/command_buffer/client/gles2_interface_autogen.h
index 2071473f0da8..77a29e65cafd 100644
index dcf283b6555c..43d17fcc02bd 100644
--- gpu/command_buffer/client/gles2_interface_autogen.h
+++ gpu/command_buffer/client/gles2_interface_autogen.h
@@ -1010,6 +1010,12 @@ virtual GLuint CreateGpuFenceCHROMIUM() = 0;
@@ -1006,6 +1006,12 @@ virtual GLuint CreateGpuFenceCHROMIUM() = 0;
virtual GLuint CreateClientGpuFenceCHROMIUM(ClientGpuFence source) = 0;
virtual void WaitGpuFenceCHROMIUM(GLuint gpu_fence_id) = 0;
virtual void DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) = 0;
@ -593,13 +593,13 @@ index 2071473f0da8..77a29e65cafd 100644
+virtual void UnlockSharedTexture(GLuint64 shared_handle) = 0;
+virtual void DeleteSharedTexture(GLuint64 shared_handle) = 0;
virtual void InvalidateReadbackBufferShadowDataCHROMIUM(GLuint buffer_id) = 0;
virtual void FramebufferTextureMultiviewLayeredANGLE(GLenum target,
GLenum attachment,
virtual void FramebufferTextureMultiviewOVR(GLenum target,
GLenum attachment,
diff --git gpu/command_buffer/client/gles2_interface_stub_autogen.h gpu/command_buffer/client/gles2_interface_stub_autogen.h
index 158134cf608e..2990494dcc5e 100644
index bd728edb5702..da59935fc7b8 100644
--- gpu/command_buffer/client/gles2_interface_stub_autogen.h
+++ gpu/command_buffer/client/gles2_interface_stub_autogen.h
@@ -980,6 +980,12 @@ GLuint CreateGpuFenceCHROMIUM() override;
@@ -976,6 +976,12 @@ GLuint CreateGpuFenceCHROMIUM() override;
GLuint CreateClientGpuFenceCHROMIUM(ClientGpuFence source) override;
void WaitGpuFenceCHROMIUM(GLuint gpu_fence_id) override;
void DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) override;
@ -610,13 +610,13 @@ index 158134cf608e..2990494dcc5e 100644
+void UnlockSharedTexture(GLuint64 shared_handle) override;
+void DeleteSharedTexture(GLuint64 shared_handle) override;
void InvalidateReadbackBufferShadowDataCHROMIUM(GLuint buffer_id) override;
void FramebufferTextureMultiviewLayeredANGLE(GLenum target,
GLenum attachment,
void FramebufferTextureMultiviewOVR(GLenum target,
GLenum attachment,
diff --git gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
index 29d079725c72..444c60df71a4 100644
index 305731012054..9fdd3db6aa60 100644
--- gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
+++ gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
@@ -1303,6 +1303,14 @@ GLuint GLES2InterfaceStub::CreateClientGpuFenceCHROMIUM(
@@ -1296,6 +1296,14 @@ GLuint GLES2InterfaceStub::CreateClientGpuFenceCHROMIUM(
}
void GLES2InterfaceStub::WaitGpuFenceCHROMIUM(GLuint /* gpu_fence_id */) {}
void GLES2InterfaceStub::DestroyGpuFenceCHROMIUM(GLuint /* gpu_fence_id */) {}
@ -630,12 +630,12 @@ index 29d079725c72..444c60df71a4 100644
+void GLES2InterfaceStub::DeleteSharedTexture(GLuint64 /* shared_handle */) {}
void GLES2InterfaceStub::InvalidateReadbackBufferShadowDataCHROMIUM(
GLuint /* buffer_id */) {}
void GLES2InterfaceStub::FramebufferTextureMultiviewLayeredANGLE(
void GLES2InterfaceStub::FramebufferTextureMultiviewOVR(
diff --git gpu/command_buffer/client/gles2_trace_implementation_autogen.h gpu/command_buffer/client/gles2_trace_implementation_autogen.h
index 7e94db26455d..d9de7879ea9a 100644
index 6f6b8dde72cf..078386560a72 100644
--- gpu/command_buffer/client/gles2_trace_implementation_autogen.h
+++ gpu/command_buffer/client/gles2_trace_implementation_autogen.h
@@ -980,6 +980,12 @@ GLuint CreateGpuFenceCHROMIUM() override;
@@ -976,6 +976,12 @@ GLuint CreateGpuFenceCHROMIUM() override;
GLuint CreateClientGpuFenceCHROMIUM(ClientGpuFence source) override;
void WaitGpuFenceCHROMIUM(GLuint gpu_fence_id) override;
void DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) override;
@ -646,13 +646,13 @@ index 7e94db26455d..d9de7879ea9a 100644
+void UnlockSharedTexture(GLuint64 shared_handle) override;
+void DeleteSharedTexture(GLuint64 shared_handle) override;
void InvalidateReadbackBufferShadowDataCHROMIUM(GLuint buffer_id) override;
void FramebufferTextureMultiviewLayeredANGLE(GLenum target,
GLenum attachment,
void FramebufferTextureMultiviewOVR(GLenum target,
GLenum attachment,
diff --git gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
index 4b7932e147b0..b0f5f2cafae3 100644
index 4a0a5288fa73..f56be5dad6cb 100644
--- gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
+++ gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
@@ -2747,6 +2747,28 @@ void GLES2TraceImplementation::DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) {
@@ -2724,6 +2724,28 @@ void GLES2TraceImplementation::DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) {
gl_->DestroyGpuFenceCHROMIUM(gpu_fence_id);
}
@ -682,10 +682,10 @@ index 4b7932e147b0..b0f5f2cafae3 100644
GLuint buffer_id) {
TRACE_EVENT_BINARY_EFFICIENT0(
diff --git gpu/command_buffer/common/gles2_cmd_format_autogen.h gpu/command_buffer/common/gles2_cmd_format_autogen.h
index 2a59e11c2d25..fbb6c4551d70 100644
index cf009da41277..c5f46fba64b4 100644
--- gpu/command_buffer/common/gles2_cmd_format_autogen.h
+++ gpu/command_buffer/common/gles2_cmd_format_autogen.h
@@ -17336,6 +17336,193 @@ static_assert(offsetof(DestroyGpuFenceCHROMIUM, header) == 0,
@@ -17294,6 +17294,193 @@ static_assert(offsetof(DestroyGpuFenceCHROMIUM, header) == 0,
static_assert(offsetof(DestroyGpuFenceCHROMIUM, gpu_fence_id) == 4,
"offset of DestroyGpuFenceCHROMIUM gpu_fence_id should be 4");
@ -880,10 +880,10 @@ index 2a59e11c2d25..fbb6c4551d70 100644
typedef SetReadbackBufferShadowAllocationINTERNAL ValueType;
static const CommandId kCmdId = kSetReadbackBufferShadowAllocationINTERNAL;
diff --git gpu/command_buffer/common/gles2_cmd_format_test_autogen.h gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
index 128473360af0..b4947682c816 100644
index ee423c7663fc..3d736022f54b 100644
--- gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
+++ gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
@@ -5721,6 +5721,52 @@ TEST_F(GLES2FormatTest, DestroyGpuFenceCHROMIUM) {
@@ -5710,6 +5710,52 @@ TEST_F(GLES2FormatTest, DestroyGpuFenceCHROMIUM) {
CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
}
@ -937,27 +937,27 @@ index 128473360af0..b4947682c816 100644
cmds::SetReadbackBufferShadowAllocationINTERNAL& cmd =
*GetBufferAs<cmds::SetReadbackBufferShadowAllocationINTERNAL>();
diff --git gpu/command_buffer/common/gles2_cmd_ids_autogen.h gpu/command_buffer/common/gles2_cmd_ids_autogen.h
index b3dd9b38feba..bcb3656e4481 100644
index 3f3f159828ab..8f447617205b 100644
--- gpu/command_buffer/common/gles2_cmd_ids_autogen.h
+++ gpu/command_buffer/common/gles2_cmd_ids_autogen.h
@@ -361,7 +361,11 @@
OP(MaxShaderCompilerThreadsKHR) /* 602 */ \
OP(CreateAndTexStorage2DSharedImageINTERNALImmediate) /* 603 */ \
OP(BeginSharedImageAccessDirectCHROMIUM) /* 604 */ \
- OP(EndSharedImageAccessDirectCHROMIUM) /* 605 */
+ OP(EndSharedImageAccessDirectCHROMIUM) /* 605 */ \
+ OP(CreateSharedTexture) /* 606 */ \
+ OP(LockSharedTexture) /* 607 */ \
+ OP(UnlockSharedTexture) /* 608 */ \
+ OP(DeleteSharedTexture) /* 609 */
@@ -360,7 +360,11 @@
OP(MaxShaderCompilerThreadsKHR) /* 601 */ \
OP(CreateAndTexStorage2DSharedImageINTERNALImmediate) /* 602 */ \
OP(BeginSharedImageAccessDirectCHROMIUM) /* 603 */ \
- OP(EndSharedImageAccessDirectCHROMIUM) /* 604 */
+ OP(EndSharedImageAccessDirectCHROMIUM) /* 604 */ \
+ OP(CreateSharedTexture) /* 605 */ \
+ OP(LockSharedTexture) /* 606 */ \
+ OP(UnlockSharedTexture) /* 607 */ \
+ OP(DeleteSharedTexture) /* 608 */
enum CommandId {
kOneBeforeStartPoint =
diff --git gpu/command_buffer/gles2_cmd_buffer_functions.txt gpu/command_buffer/gles2_cmd_buffer_functions.txt
index 2f9b93fda757..9897a2790587 100644
index 7c3d121e54dc..b9b7ffa2a585 100644
--- gpu/command_buffer/gles2_cmd_buffer_functions.txt
+++ gpu/command_buffer/gles2_cmd_buffer_functions.txt
@@ -417,6 +417,12 @@ GL_APICALL GLuint GL_APIENTRY glCreateClientGpuFenceCHROMIUM (ClientGpuFen
@@ -412,6 +412,12 @@ GL_APICALL GLuint GL_APIENTRY glCreateClientGpuFenceCHROMIUM (ClientGpuFen
GL_APICALL void GL_APIENTRY glWaitGpuFenceCHROMIUM (GLuint gpu_fence_id);
GL_APICALL void GL_APIENTRY glDestroyGpuFenceCHROMIUM (GLuint gpu_fence_id);
@ -971,7 +971,7 @@ index 2f9b93fda757..9897a2790587 100644
GL_APICALL void GL_APIENTRY glInvalidateReadbackBufferShadowDataCHROMIUM (GLidBuffer buffer_id);
// (used for CHROMIUM_nonblocking_readback implementation)
diff --git gpu/command_buffer/service/BUILD.gn gpu/command_buffer/service/BUILD.gn
index bbf81312c8d9..817a6b6fa421 100644
index 8ff7c571352d..63ffe016f019 100644
--- gpu/command_buffer/service/BUILD.gn
+++ gpu/command_buffer/service/BUILD.gn
@@ -107,6 +107,8 @@ target(link_target_type, "gles2_sources") {
@ -984,7 +984,7 @@ index bbf81312c8d9..817a6b6fa421 100644
"abstract_texture_impl_shared_context_state.cc",
"abstract_texture_impl_shared_context_state.h",
diff --git gpu/command_buffer/service/gles2_cmd_decoder.cc gpu/command_buffer/service/gles2_cmd_decoder.cc
index 5bb86a2a5d32..5439662701af 100644
index 71ae06b85d79..c5599711d769 100644
--- gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -38,6 +38,7 @@
@ -995,7 +995,7 @@ index 5bb86a2a5d32..5439662701af 100644
#include "gpu/command_buffer/common/debug_marker_manager.h"
#include "gpu/command_buffer/common/gles2_cmd_format.h"
#include "gpu/command_buffer/common/gles2_cmd_utils.h"
@@ -916,6 +917,13 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient {
@@ -917,6 +918,13 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient {
return group_->mailbox_manager();
}
@ -1009,7 +1009,7 @@ index 5bb86a2a5d32..5439662701af 100644
ImageManager* image_manager() { return group_->image_manager(); }
VertexArrayManager* vertex_array_manager() {
@@ -2644,6 +2652,8 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient {
@@ -2645,6 +2653,8 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient {
std::unique_ptr<VertexArrayManager> vertex_array_manager_;
@ -1079,7 +1079,7 @@ index 5bb86a2a5d32..5439662701af 100644
for (auto it = saved_back_textures_.begin(); it != saved_back_textures_.end();
++it) {
diff --git gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
index 2766bcbc5418..417f26076423 100644
index 6b9c176a0dcf..6e9ff5b7d35d 100644
--- gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
+++ gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
@@ -11,6 +11,7 @@
@ -1090,7 +1090,7 @@ index 2766bcbc5418..417f26076423 100644
#include "gpu/command_buffer/service/command_buffer_service.h"
#include "gpu/command_buffer/service/decoder_client.h"
#include "gpu/command_buffer/service/feature_info.h"
@@ -2512,6 +2513,67 @@ error::Error GLES2DecoderPassthroughImpl::CheckSwapBuffersResult(
@@ -2515,6 +2516,67 @@ error::Error GLES2DecoderPassthroughImpl::CheckSwapBuffersResult(
return error::kNoError;
}
@ -1159,7 +1159,7 @@ index 2766bcbc5418..417f26076423 100644
GLES2DecoderPassthroughImpl::TextureTarget
GLES2DecoderPassthroughImpl::GLenumToTextureTarget(GLenum target) {
diff --git gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h
index ed682013976b..4bc28fe68a5d 100644
index 7470c03bfc6a..58b91b2f666d 100644
--- gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h
+++ gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h
@@ -45,6 +45,7 @@ class SharedImageRepresentationGLTexturePassthrough;
@ -1179,7 +1179,7 @@ index ed682013976b..4bc28fe68a5d 100644
void* GetScratchMemory(size_t size);
template <typename T>
@@ -580,6 +583,8 @@ class GPU_GLES2_EXPORT GLES2DecoderPassthroughImpl : public GLES2Decoder {
@@ -578,6 +581,8 @@ class GPU_GLES2_EXPORT GLES2DecoderPassthroughImpl : public GLES2Decoder {
std::unique_ptr<MultiDrawManager> multi_draw_manager_;
@ -1189,10 +1189,10 @@ index ed682013976b..4bc28fe68a5d 100644
size_t active_texture_unit_;
diff --git ui/compositor/compositor.cc ui/compositor/compositor.cc
index 311c26b6e0ea..8583fdfecc19 100644
index 6ab0a01e8f3d..1046cbde43e9 100644
--- ui/compositor/compositor.cc
+++ ui/compositor/compositor.cc
@@ -555,6 +555,16 @@ scoped_refptr<CompositorVSyncManager> Compositor::vsync_manager() const {
@@ -560,6 +560,16 @@ scoped_refptr<CompositorVSyncManager> Compositor::vsync_manager() const {
return vsync_manager_;
}
@ -1210,7 +1210,7 @@ index 311c26b6e0ea..8583fdfecc19 100644
observer_list_.AddObserver(observer);
}
diff --git ui/compositor/compositor.h ui/compositor/compositor.h
index 4e28277f7750..cd283ca49bd7 100644
index 102c2fcef112..0115a1ec972a 100644
--- ui/compositor/compositor.h
+++ ui/compositor/compositor.h
@@ -25,6 +25,7 @@
@ -1221,7 +1221,7 @@ index 4e28277f7750..cd283ca49bd7 100644
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkMatrix44.h"
#include "ui/compositor/compositor_animation_observer.h"
@@ -160,6 +161,8 @@ class COMPOSITOR_EXPORT ContextFactoryPrivate {
@@ -154,6 +155,8 @@ class COMPOSITOR_EXPORT ContextFactoryPrivate {
const viz::BeginFrameArgs& args) = 0;
virtual void SetOutputIsSecure(Compositor* compositor, bool secure) = 0;
@ -1230,7 +1230,7 @@ index 4e28277f7750..cd283ca49bd7 100644
};
// This class abstracts the creation of the 3D context for the compositor. It is
@@ -200,6 +203,17 @@ class COMPOSITOR_EXPORT ContextFactory {
@@ -194,6 +197,17 @@ class COMPOSITOR_EXPORT ContextFactory {
virtual bool SyncTokensRequiredForDisplayCompositor() = 0;
};
@ -1248,7 +1248,7 @@ index 4e28277f7750..cd283ca49bd7 100644
// Compositor object to take care of GPU painting.
// A Browser compositor object is responsible for generating the final
// displayable form of pixels comprising a single widget's contents. It draws an
@@ -242,6 +256,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
@@ -236,6 +250,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
// Schedules a redraw of the layer tree associated with this compositor.
void ScheduleDraw();
@ -1258,7 +1258,7 @@ index 4e28277f7750..cd283ca49bd7 100644
// Sets the root of the layer tree drawn by this Compositor. The root layer
// must have no parent. The compositor's root layer is reset if the root layer
// is destroyed. NULL can be passed to reset the root layer, in which case the
@@ -355,6 +372,10 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
@@ -349,6 +366,10 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
return task_runner_;
}
@ -1269,7 +1269,7 @@ index 4e28277f7750..cd283ca49bd7 100644
// Compositor does not own observers. It is the responsibility of the
// observer to remove itself when it is done observing.
void AddObserver(CompositorObserver* observer);
@@ -465,6 +486,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
@@ -460,6 +481,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
ui::ContextFactory* context_factory_;
ui::ContextFactoryPrivate* context_factory_private_;
@ -1278,7 +1278,7 @@ index 4e28277f7750..cd283ca49bd7 100644
// The root of the Layer tree drawn by this compositor.
Layer* root_layer_ = nullptr;
@@ -499,6 +522,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
@@ -494,6 +517,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
ExternalBeginFrameClient* const external_begin_frame_client_;

View File

@ -1,8 +1,8 @@
diff --git .gn .gn
index 94ccc332ef23..2eae5c3a0c9f 100644
index 2bccf9d2b12c..39ce25e36c22 100644
--- .gn
+++ .gn
@@ -666,6 +666,8 @@ exec_script_whitelist =
@@ -664,6 +664,8 @@ exec_script_whitelist =
# in the Chromium repo outside of //build.
"//build_overrides/build.gni",
@ -12,10 +12,10 @@ index 94ccc332ef23..2eae5c3a0c9f 100644
# https://crbug.com/474506.
"//clank/java/BUILD.gn",
diff --git BUILD.gn BUILD.gn
index 40343b6a520a..f59de9f9999e 100644
index 2d6f3315e687..405ddd14fab6 100644
--- BUILD.gn
+++ BUILD.gn
@@ -189,6 +189,7 @@ group("gn_all") {
@@ -187,6 +187,7 @@ group("gn_all") {
if (!is_ios && !is_fuchsia) {
deps += [
@ -123,10 +123,10 @@ index 0ce237fe1323..6201bbba992c 100755
# directory in order to run binaries locally, but they are needed in order
# to create isolates or the mini_installer. Copying them to the output
diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni
index 803db7cc95fd..e450ba296e77 100644
index dc766a29cc34..97b47d0538e4 100644
--- chrome/chrome_paks.gni
+++ chrome/chrome_paks.gni
@@ -261,7 +261,7 @@ template("chrome_paks") {
@@ -265,7 +265,7 @@ template("chrome_paks") {
}
input_locales = locales

View File

@ -1,8 +1,8 @@
diff --git tools/gritsettings/resource_ids tools/gritsettings/resource_ids
index dc660db144df..6fc116b2c8ff 100644
index 33dc98925f5f..9bd2dbef9faf 100644
--- tools/gritsettings/resource_ids
+++ tools/gritsettings/resource_ids
@@ -434,4 +434,11 @@
@@ -442,4 +442,11 @@
# 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,7 +1,7 @@
diff --git ui/base/ime/input_method_win_base.cc ui/base/ime/input_method_win_base.cc
index bd7edb13c4d1..8917f77e557e 100644
--- ui/base/ime/input_method_win_base.cc
+++ ui/base/ime/input_method_win_base.cc
diff --git ui/base/ime/win/input_method_win_base.cc ui/base/ime/win/input_method_win_base.cc
index 7de0c9321795..cba34d236a1f 100644
--- ui/base/ime/win/input_method_win_base.cc
+++ ui/base/ime/win/input_method_win_base.cc
@@ -267,8 +267,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

View File

@ -28,7 +28,7 @@ index 547b42fb5c66..0eae3470e1bb 100644
# Additional dependent variables -----------------------------------------------
diff --git chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
index 79c24d729c08..1c2b19b75e6b 100644
index c3511e3e6a66..3500f4a2b005 100644
--- chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
+++ chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
@@ -6,6 +6,7 @@
@ -68,10 +68,10 @@ index 79c24d729c08..1c2b19b75e6b 100644
void ChromeBrowserMainExtraPartsViewsLinux::ToolkitInitialized() {
diff --git chrome/test/BUILD.gn chrome/test/BUILD.gn
index a4bd99bf7cd1..13b7b96609bf 100644
index 5406779a17c2..b1ed0f2c970b 100644
--- chrome/test/BUILD.gn
+++ chrome/test/BUILD.gn
@@ -4146,7 +4146,7 @@ test("unit_tests") {
@@ -4159,7 +4159,7 @@ test("unit_tests") {
"../browser/ui/input_method/input_method_engine_unittest.cc",
]
}
@ -80,7 +80,7 @@ index a4bd99bf7cd1..13b7b96609bf 100644
sources +=
[ "../browser/ui/libgtkui/select_file_dialog_impl_gtk_unittest.cc" ]
deps += [ "//build/config/linux/gtk" ]
@@ -4167,7 +4167,7 @@ test("unit_tests") {
@@ -4180,7 +4180,7 @@ test("unit_tests") {
if (use_gio) {
configs += [ "//build/linux:gio_config" ]
}
@ -89,7 +89,7 @@ index a4bd99bf7cd1..13b7b96609bf 100644
deps += [ "//chrome/browser/ui/libgtkui" ]
}
@@ -5184,7 +5184,7 @@ if (!is_android) {
@@ -5206,7 +5206,7 @@ if (!is_android) {
# suites, it seems like one or another starts timing out too.
"../browser/ui/views/keyboard_access_browsertest.cc",
]
@ -99,10 +99,10 @@ index a4bd99bf7cd1..13b7b96609bf 100644
"../browser/ui/libgtkui/select_file_dialog_interactive_uitest.cc",
]
diff --git remoting/host/BUILD.gn remoting/host/BUILD.gn
index 7aeefa7b1b89..13fc19218a4c 100644
index 229a7cb37e34..d51e249a7f9e 100644
--- remoting/host/BUILD.gn
+++ remoting/host/BUILD.gn
@@ -351,7 +351,7 @@ static_library("common") {
@@ -353,7 +353,7 @@ static_library("common") {
"//build/config/linux:xrandr",
]
deps += [ "//remoting/host/linux:x11" ]
@ -111,7 +111,7 @@ index 7aeefa7b1b89..13fc19218a4c 100644
deps += [ "//build/config/linux/gtk" ]
}
} else {
@@ -734,7 +734,7 @@ if (enable_me2me_host) {
@@ -737,7 +737,7 @@ if (enable_me2me_host) {
deps += [ "//components/policy:generated" ]
}
@ -134,10 +134,10 @@ index ffaaa0b5b423..9fc7f88859a9 100644
deps += [ "//build/config/linux/gtk" ]
}
diff --git remoting/host/it2me/BUILD.gn remoting/host/it2me/BUILD.gn
index e6298a0cb0b2..cee7134af3ec 100644
index 39dc46737578..e5cb11d5ef04 100644
--- remoting/host/it2me/BUILD.gn
+++ remoting/host/it2me/BUILD.gn
@@ -56,7 +56,7 @@ source_set("common") {
@@ -53,7 +53,7 @@ source_set("common") {
"//remoting/resources",
"//remoting/signaling",
]
@ -146,7 +146,7 @@ index e6298a0cb0b2..cee7134af3ec 100644
deps += [
"//build/config/linux/gtk",
@@ -250,7 +250,7 @@ if (!is_chromeos && enable_remoting_host) {
@@ -247,7 +247,7 @@ if (!is_chromeos && enable_remoting_host) {
}
}
@ -169,10 +169,10 @@ index a07f8b0254af..970c1a54b4d2 100644
}
}
diff --git remoting/test/BUILD.gn remoting/test/BUILD.gn
index d916fa822a8f..245c0e006cdf 100644
index 57b7f3b4e507..e87a45273a21 100644
--- remoting/test/BUILD.gn
+++ remoting/test/BUILD.gn
@@ -148,7 +148,7 @@ if (enable_remoting_host && !is_android && !is_chromeos) {
@@ -158,7 +158,7 @@ if (enable_remoting_host && !is_android && !is_chromeos) {
":it2me_standalone_host",
]

View File

@ -1,5 +1,5 @@
diff --git ui/gl/init/gl_initializer_mac.cc ui/gl/init/gl_initializer_mac.cc
index 03ad2d5027bf..627cbdeba62b 100644
index 85cab0eaef3e..37b2d42a34f5 100644
--- ui/gl/init/gl_initializer_mac.cc
+++ ui/gl/init/gl_initializer_mac.cc
@@ -46,11 +46,8 @@ bool InitializeOneOffForSandbox() {

View File

@ -1,8 +1,8 @@
diff --git base/message_loop/message_loop.cc base/message_loop/message_loop.cc
index ae58f829393d..453368e55bb7 100644
index afcf04d5882a..69f9f85cba84 100644
--- base/message_loop/message_loop.cc
+++ base/message_loop/message_loop.cc
@@ -163,6 +163,9 @@ MessageLoopBase* MessageLoop::GetMessageLoopBase() {
@@ -149,6 +149,9 @@ bool MessageLoop::IsIdleForTesting() {
//------------------------------------------------------------------------------
@ -13,10 +13,10 @@ index ae58f829393d..453368e55bb7 100644
std::unique_ptr<MessageLoop> MessageLoop::CreateUnbound(Type type) {
return WrapUnique(new MessageLoop(type, nullptr));
diff --git base/message_loop/message_loop.h base/message_loop/message_loop.h
index 46782b49a7f0..78ebaf71cbdf 100644
index ddfed508baef..f332d1823667 100644
--- base/message_loop/message_loop.h
+++ base/message_loop/message_loop.h
@@ -377,6 +377,7 @@ class BASE_EXPORT MessageLoop {
@@ -275,6 +275,7 @@ class BASE_EXPORT MessageLoop {
class BASE_EXPORT MessageLoopForUI : public MessageLoop {
public:
explicit MessageLoopForUI(Type type = TYPE_UI);
@ -25,10 +25,10 @@ index 46782b49a7f0..78ebaf71cbdf 100644
#if defined(OS_IOS)
// On iOS, the main message loop cannot be Run(). Instead call Attach(),
diff --git base/message_loop/message_loop_current.cc base/message_loop/message_loop_current.cc
index 7dcab95f6838..4a6ec38e051a 100644
index 2e2adfa55fa4..1370d8484d8f 100644
--- base/message_loop/message_loop_current.cc
+++ base/message_loop/message_loop_current.cc
@@ -46,6 +46,8 @@ void MessageLoopCurrent::AddDestructionObserver(
@@ -47,6 +47,8 @@ void MessageLoopCurrent::AddDestructionObserver(
void MessageLoopCurrent::RemoveDestructionObserver(
DestructionObserver* destruction_observer) {
@ -38,10 +38,10 @@ index 7dcab95f6838..4a6ec38e051a 100644
current_->RemoveDestructionObserver(destruction_observer);
}
diff --git base/message_loop/message_loop_current.h base/message_loop/message_loop_current.h
index 1809f870d188..d0e8e645e3a7 100644
index 270c6593e789..520cb0e3198a 100644
--- base/message_loop/message_loop_current.h
+++ base/message_loop/message_loop_current.h
@@ -133,6 +133,12 @@ class BASE_EXPORT MessageLoopCurrent {
@@ -132,6 +132,12 @@ class BASE_EXPORT MessageLoopCurrent {
// posted tasks.
void SetAddQueueTimeToTasks(bool enable);
@ -54,10 +54,10 @@ index 1809f870d188..d0e8e645e3a7 100644
// Enables or disables the recursive task processing. This happens in the case
// of recursive message loops. Some unwanted message loops may occur when
// using common controls or printer functions. By default, recursive task
@@ -200,6 +206,13 @@ class BASE_EXPORT MessageLoopCurrent {
@@ -202,6 +208,13 @@ class BASE_EXPORT MessageLoopCurrent {
friend class web::TestWebThreadBundle;
MessageLoopBase* current_;
sequence_manager::internal::SequenceManagerImpl* current_;
+
+#if defined(OS_WIN)
+ private:

View File

@ -22,10 +22,10 @@ index 49fe875c7d22..c1e3df840dc0 100644
THREAD_CHECKER(thread_checker_);
diff --git net/url_request/url_request_job.cc net/url_request/url_request_job.cc
index 85a188974509..ec9a15fc9fa5 100644
index 06df9bd3e545..c5dbb0f0f6ef 100644
--- net/url_request/url_request_job.cc
+++ net/url_request/url_request_job.cc
@@ -466,6 +466,12 @@ void URLRequestJob::NotifyHeadersComplete() {
@@ -464,6 +464,12 @@ void URLRequestJob::NotifyHeadersComplete() {
DCHECK(!source_stream_);
source_stream_ = SetUpSourceStream();

View File

@ -1,8 +1,8 @@
diff --git net/url_request/url_request.h net/url_request/url_request.h
index 33337d91f5cc..7de7579d9f12 100644
index b264ca045f24..1746e0588926 100644
--- net/url_request/url_request.h
+++ net/url_request/url_request.h
@@ -754,10 +754,10 @@ class NET_EXPORT URLRequest : public base::SupportsUserData {
@@ -748,10 +748,10 @@ class NET_EXPORT URLRequest : public base::SupportsUserData {
base::WeakPtr<URLRequest> GetWeakPtr();

View File

@ -1,8 +1,8 @@
diff --git BUILD.gn BUILD.gn
index f0accf1fe..1799af5c1 100644
index 83fc631bd..26b675d64 100644
--- BUILD.gn
+++ BUILD.gn
@@ -215,6 +215,10 @@ jumbo_static_library("pdfium") {
@@ -212,6 +212,10 @@ jumbo_static_library("pdfium") {
complete_static_lib = true
configs -= [ "//build/config/compiler:thin_archive" ]
}
@ -14,7 +14,7 @@ index f0accf1fe..1799af5c1 100644
# Targets below this are only visible within this file (and to the
diff --git fpdfsdk/fpdf_view.cpp fpdfsdk/fpdf_view.cpp
index 0123035f7..8cc537325 100644
index 9b1e84b63..73f04bc68 100644
--- fpdfsdk/fpdf_view.cpp
+++ fpdfsdk/fpdf_view.cpp
@@ -38,6 +38,7 @@

View File

@ -1,5 +1,5 @@
diff --git content/public/common/common_param_traits_macros.h content/public/common/common_param_traits_macros.h
index 0886144e1314..6a8e9a997fdc 100644
index 24bded9417c5..cb5d04ab32ab 100644
--- content/public/common/common_param_traits_macros.h
+++ content/public/common/common_param_traits_macros.h
@@ -189,6 +189,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
@ -23,7 +23,7 @@ index 1822036e406d..b5f0e63d0b37 100644
record_whole_document(false),
cookie_enabled(true),
diff --git content/public/common/web_preferences.h content/public/common/web_preferences.h
index 2e7285fa9bf8..6b21ff08d887 100644
index a83015f3629a..fe79480e9af7 100644
--- content/public/common/web_preferences.h
+++ content/public/common/web_preferences.h
@@ -185,6 +185,7 @@ struct CONTENT_EXPORT WebPreferences {
@ -35,10 +35,10 @@ index 2e7285fa9bf8..6b21ff08d887 100644
bool record_whole_document;
diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc
index 37444267d71f..579f56cd18be 100644
index 3e328daa5827..7d0869aa29fd 100644
--- content/renderer/render_view_impl.cc
+++ content/renderer/render_view_impl.cc
@@ -1025,6 +1025,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
@@ -1026,6 +1026,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
#endif
WebRuntimeFeatures::EnableTranslateService(prefs.translate_service_available);

View File

@ -242,7 +242,7 @@ index 1802034a6e15..ae0d479ecafa 100644
#endif // COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_
diff --git components/printing/renderer/print_render_frame_helper.cc components/printing/renderer/print_render_frame_helper.cc
index f0e785dc303f..e919b4355307 100644
index eb717d8d4be3..ddaa19d8d241 100644
--- components/printing/renderer/print_render_frame_helper.cc
+++ components/printing/renderer/print_render_frame_helper.cc
@@ -351,7 +351,6 @@ bool IsPrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame,
@ -277,7 +277,7 @@ index f0e785dc303f..e919b4355307 100644
// Helper function to scale and round an integer value with a double valued
// scaling.
@@ -1108,10 +1104,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
@@ -1106,10 +1102,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
return;
if (g_is_preview_enabled) {
@ -288,7 +288,7 @@ index f0e785dc303f..e919b4355307 100644
} else {
auto weak_this = weak_ptr_factory_.GetWeakPtr();
web_frame->DispatchBeforePrintEvent();
@@ -1139,13 +1133,11 @@ bool PrintRenderFrameHelper::OnMessageReceived(const IPC::Message& message) {
@@ -1137,13 +1131,11 @@ bool PrintRenderFrameHelper::OnMessageReceived(const IPC::Message& message) {
IPC_BEGIN_MESSAGE_MAP(PrintRenderFrameHelper, message)
IPC_MESSAGE_HANDLER(PrintMsg_PrintPages, OnPrintPages)
IPC_MESSAGE_HANDLER(PrintMsg_PrintForSystemDialog, OnPrintForSystemDialog)
@ -302,7 +302,7 @@ index f0e785dc303f..e919b4355307 100644
IPC_MESSAGE_HANDLER(PrintMsg_PrintFrameContent, OnPrintFrameContent)
IPC_MESSAGE_HANDLER(PrintMsg_SetPrintingEnabled, OnSetPrintingEnabled)
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -1225,7 +1217,6 @@ void PrintRenderFrameHelper::UpdateFrameMarginsCssInfo(
@@ -1223,7 +1215,6 @@ void PrintRenderFrameHelper::UpdateFrameMarginsCssInfo(
ignore_css_margins_ = (margins_type != DEFAULT_MARGINS);
}
@ -310,7 +310,7 @@ index f0e785dc303f..e919b4355307 100644
void PrintRenderFrameHelper::OnPrintPreview(
const base::DictionaryValue& settings) {
if (ipc_nesting_level_ > 1)
@@ -1490,7 +1481,6 @@ int PrintRenderFrameHelper::GetFitToPageScaleFactor(
@@ -1488,7 +1479,6 @@ int PrintRenderFrameHelper::GetFitToPageScaleFactor(
printable_height / static_cast<double>(uniform_page_size.height);
return static_cast<int>(100.0f * std::min(scale_width, scale_height));
}
@ -318,7 +318,7 @@ index f0e785dc303f..e919b4355307 100644
void PrintRenderFrameHelper::OnPrintingDone(bool success) {
if (ipc_nesting_level_ > 1)
@@ -1505,7 +1495,6 @@ void PrintRenderFrameHelper::OnSetPrintingEnabled(bool enabled) {
@@ -1503,7 +1493,6 @@ void PrintRenderFrameHelper::OnSetPrintingEnabled(bool enabled) {
is_printing_enabled_ = enabled;
}
@ -326,7 +326,7 @@ index f0e785dc303f..e919b4355307 100644
void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
if (ipc_nesting_level_ > 1)
return;
@@ -1516,7 +1505,9 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
@@ -1514,7 +1503,9 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
// that instead.
auto plugin = delegate_->GetPdfElement(frame);
if (!plugin.IsNull()) {
@ -336,7 +336,7 @@ index f0e785dc303f..e919b4355307 100644
return;
}
print_preview_context_.InitWithFrame(frame);
@@ -1528,7 +1519,6 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
@@ -1526,7 +1517,6 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
void PrintRenderFrameHelper::OnClosePrintPreviewDialog() {
print_preview_context_.source_frame()->DispatchAfterPrintEvent();
}
@ -344,7 +344,7 @@ index f0e785dc303f..e919b4355307 100644
void PrintRenderFrameHelper::OnPrintFrameContent(
const PrintMsg_PrintFrame_Params& params) {
@@ -1612,11 +1602,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
@@ -1610,11 +1600,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
print_node_in_progress_ = true;
@ -357,7 +357,7 @@ index f0e785dc303f..e919b4355307 100644
} else {
// Make a copy of the node, in case RenderView::OnContextMenuClosed() resets
// its |context_menu_node_|.
@@ -1692,13 +1680,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
@@ -1690,13 +1678,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) {
int cookie =
print_pages_params_ ? print_pages_params_->params.document_cookie : 0;
@ -371,7 +371,7 @@ index f0e785dc303f..e919b4355307 100644
switch (result) {
case OK:
break;
@@ -1713,7 +1699,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) {
@@ -1711,7 +1697,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) {
}
break;
@ -379,7 +379,7 @@ index f0e785dc303f..e919b4355307 100644
case FAIL_PREVIEW:
if (!is_print_ready_metafile_sent_) {
if (notify_browser_of_print_failure_) {
@@ -1731,7 +1716,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) {
@@ -1729,7 +1714,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) {
cookie, ids));
print_preview_context_.Failed(false);
break;
@ -387,7 +387,7 @@ index f0e785dc303f..e919b4355307 100644
}
prep_frame_view_.reset();
print_pages_params_.reset();
@@ -1904,7 +1888,6 @@ bool PrintRenderFrameHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
@@ -1902,7 +1886,6 @@ bool PrintRenderFrameHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
return true;
}
@ -395,7 +395,7 @@ index f0e785dc303f..e919b4355307 100644
bool PrintRenderFrameHelper::SetOptionsFromPdfDocument(
PrintHostMsg_SetOptionsFromDocument_Params* options) {
blink::WebLocalFrame* source_frame = print_preview_context_.source_frame();
@@ -1989,7 +1972,6 @@ bool PrintRenderFrameHelper::UpdatePrintSettings(
@@ -1987,7 +1970,6 @@ bool PrintRenderFrameHelper::UpdatePrintSettings(
print_preview_context_.set_error(PREVIEW_ERROR_INVALID_PRINTER_SETTINGS);
return false;
}
@ -403,7 +403,7 @@ index f0e785dc303f..e919b4355307 100644
void PrintRenderFrameHelper::GetPrintSettingsFromUser(
blink::WebLocalFrame* frame,
@@ -2141,7 +2123,6 @@ bool PrintRenderFrameHelper::CopyMetafileDataToReadOnlySharedMem(
@@ -2139,7 +2121,6 @@ bool PrintRenderFrameHelper::CopyMetafileDataToReadOnlySharedMem(
return true;
}
@ -411,7 +411,7 @@ index f0e785dc303f..e919b4355307 100644
void PrintRenderFrameHelper::ShowScriptedPrintPreview() {
if (is_scripted_preview_delayed_) {
is_scripted_preview_delayed_ = false;
@@ -2267,7 +2248,6 @@ bool PrintRenderFrameHelper::PreviewPageRendered(
@@ -2265,7 +2246,6 @@ bool PrintRenderFrameHelper::PreviewPageRendered(
Send(new PrintHostMsg_DidPreviewPage(routing_id(), preview_page_params, ids));
return true;
}

View File

@ -1,8 +1,8 @@
diff --git build/config/compiler/compiler.gni build/config/compiler/compiler.gni
index 2074800ce409..d99fadd7e5c4 100644
index 3bdd85bf9758..b326e808f929 100644
--- build/config/compiler/compiler.gni
+++ build/config/compiler/compiler.gni
@@ -253,16 +253,6 @@ if (symbol_level == -1) {
@@ -250,18 +250,6 @@ if (symbol_level == -1) {
}
}
@ -10,11 +10,13 @@ index 2074800ce409..d99fadd7e5c4 100644
-# build times) and unsupported (some test binaries will fail with > 4 GB PDBs)
-# combination. This is only checked when current_toolchain == default_toolchain
-# because the is_component_build flag is set to false in various components of
-# the build (like nacl) and we don't want to assert on those. asan builds are
-# excluded because Mac ASAN Debug builds use this configuration.
-assert(symbol_level != 2 || current_toolchain != default_toolchain ||
- is_component_build || !is_debug || is_asan,
- "Can't do non-component debug builds at symbol_level=2")
-# the build (like nacl) and we don't want to assert on those.
-# iOS does not support component builds so add an exception for this platform.
-if (build_with_chromium) {
- assert(symbol_level != 2 || current_toolchain != default_toolchain ||
- is_component_build || !is_debug || is_ios,
- "Can't do non-component debug builds at symbol_level=2")
-}
-
# Assert that the configuration isn't going to hit https://crbug.com/648948.
# An exception is made when target_os == "chromeos" as we only use the Android

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 45c4dfa8d3e2..0be00ced462a 100644
index 8ab45cb1bb32..ddf13a935ee2 100644
--- content/browser/renderer_host/render_widget_host_view_aura.cc
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -741,10 +741,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const {
@@ -742,10 +742,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() {
void RenderWidgetHostViewAura::UpdateBackgroundColor() {
DCHECK(GetBackgroundColor());
@ -19,7 +19,7 @@ index 45c4dfa8d3e2..0be00ced462a 100644
}
void RenderWidgetHostViewAura::WindowTitleChanged() {
@@ -2078,6 +2080,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
@@ -2108,6 +2110,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
if (frame_sink_id_.is_valid())
window_->SetEmbedFrameSinkId(frame_sink_id_);

View File

@ -1,5 +1,5 @@
diff --git services/service_manager/embedder/main.cc services/service_manager/embedder/main.cc
index 0fbc2149df74..14f5bbb2579c 100644
index 2f1c18044c35..479cb45f09e1 100644
--- services/service_manager/embedder/main.cc
+++ services/service_manager/embedder/main.cc
@@ -233,22 +233,36 @@ int RunService(MainDelegate* delegate) {

View File

@ -35,10 +35,10 @@ index 2b24d1ac1b5b..6577495d87a9 100644
base_cache_path.Append(chrome::kCacheDirname);
network_context_params->http_cache_max_size =
diff --git chrome/browser/profiles/profile.h chrome/browser/profiles/profile.h
index c70a4c0f48ac..f76776fb39bf 100644
index e77d8abd6601..88331e9af5e0 100644
--- chrome/browser/profiles/profile.h
+++ chrome/browser/profiles/profile.h
@@ -310,6 +310,11 @@ class Profile : public content::BrowserContext {
@@ -321,6 +321,11 @@ class Profile : public content::BrowserContext {
virtual bool ShouldRestoreOldSessionCookies();
virtual bool ShouldPersistSessionCookies();
@ -50,11 +50,92 @@ index c70a4c0f48ac..f76776fb39bf 100644
// Creates NetworkContext for the specified isolated app (or for the profile
// itself, if |relative_path| is empty).
virtual network::mojom::NetworkContextPtr CreateNetworkContext(
diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc
index e7ad8df8817e..68ae3c88d6cc 100644
--- net/cookies/cookie_monster.cc
+++ net/cookies/cookie_monster.cc
@@ -508,6 +508,25 @@ void CookieMonster::SetCookieableSchemes(
MaybeRunCookieCallback(std::move(callback), true);
}
+void CookieMonster::AddCookieableSchemes(
+ const std::vector<std::string>& schemes,
+ SetCookieableSchemesCallback callback) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+
+ // Calls to this method will have no effect if made after a WebView or
+ // CookieManager instance has been created.
+ if (initialized_) {
+ MaybeRunCookieCallback(std::move(callback), false);
+ return;
+ }
+
+ if (!schemes.empty()) {
+ cookieable_schemes_.insert(cookieable_schemes_.begin(), schemes.begin(),
+ schemes.end());
+ }
+ MaybeRunCookieCallback(std::move(callback), true);
+}
+
// This function must be called before the CookieMonster is used.
void CookieMonster::SetPersistSessionCookies(bool persist_session_cookies) {
DCHECK(thread_checker_.CalledOnValidThread());
diff --git net/cookies/cookie_monster.h net/cookies/cookie_monster.h
index 747b3789374a..d70c75ade666 100644
--- net/cookies/cookie_monster.h
+++ net/cookies/cookie_monster.h
@@ -176,6 +176,8 @@ class NET_EXPORT CookieMonster : public CookieStore {
CookieChangeDispatcher& GetChangeDispatcher() override;
void SetCookieableSchemes(const std::vector<std::string>& schemes,
SetCookieableSchemesCallback callback) override;
+ void AddCookieableSchemes(const std::vector<std::string>& schemes,
+ SetCookieableSchemesCallback callback) override;
// 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 c1146a9e32f6..da1e54d423a7 100644
--- net/cookies/cookie_store.h
+++ net/cookies/cookie_store.h
@@ -145,6 +145,11 @@ class NET_EXPORT CookieStore {
virtual void SetCookieableSchemes(const std::vector<std::string>& schemes,
SetCookieableSchemesCallback callback) = 0;
+ // Adds to the list of cookieable schemes. Does nothing if called after first
+ // use of the instance (i.e. after the instance initialization process).
+ virtual void AddCookieableSchemes(const std::vector<std::string>& schemes,
+ SetCookieableSchemesCallback callback) = 0;
+
// Returns true if this cookie store is ephemeral, and false if it is backed
// by some sort of persistence layer.
// TODO(nharper): Remove this method once crbug.com/548423 has been closed.
diff --git services/network/cookie_manager.cc services/network/cookie_manager.cc
index 8be1b9dea5f7..30f23449ac51 100644
--- services/network/cookie_manager.cc
+++ services/network/cookie_manager.cc
@@ -214,14 +214,9 @@ void CookieManager::FlushCookieStore(FlushCookieStoreCallback callback) {
void CookieManager::AllowFileSchemeCookies(
bool allow,
AllowFileSchemeCookiesCallback callback) {
- std::vector<std::string> cookieable_schemes(
- net::CookieMonster::kDefaultCookieableSchemes,
- net::CookieMonster::kDefaultCookieableSchemes +
- net::CookieMonster::kDefaultCookieableSchemesCount);
- if (allow) {
- cookieable_schemes.push_back(url::kFileScheme);
- }
- cookie_store_->SetCookieableSchemes(cookieable_schemes, std::move(callback));
+ if (!allow)
+ return;
+ cookie_store_->AddCookieableSchemes({url::kFileScheme}, std::move(callback));
}
void CookieManager::SetForceKeepSessionState() {
diff --git services/network/network_context.cc services/network/network_context.cc
index b882aa825923..eedf167ee32b 100644
index 9d6f7b930e11..c16e5ca90c14 100644
--- services/network/network_context.cc
+++ services/network/network_context.cc
@@ -1733,6 +1733,7 @@ URLRequestContextOwner NetworkContext::ApplyContextParamsToBuilder(
@@ -1742,6 +1742,7 @@ URLRequestContextOwner NetworkContext::ApplyContextParamsToBuilder(
}
scoped_refptr<SessionCleanupCookieStore> session_cleanup_cookie_store;
@ -62,7 +143,7 @@ index b882aa825923..eedf167ee32b 100644
if (params_->cookie_path) {
scoped_refptr<base::SequencedTaskRunner> client_task_runner =
base::MessageLoopCurrent::Get()->task_runner();
@@ -1760,18 +1761,27 @@ URLRequestContextOwner NetworkContext::ApplyContextParamsToBuilder(
@@ -1769,18 +1770,27 @@ URLRequestContextOwner NetworkContext::ApplyContextParamsToBuilder(
session_cleanup_cookie_store =
base::MakeRefCounted<SessionCleanupCookieStore>(sqlite_store);
@ -94,10 +175,10 @@ index b882aa825923..eedf167ee32b 100644
std::make_unique<net::StaticHttpUserAgentSettings>(
params_->accept_language, params_->user_agent);
diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom
index 864e55731cdf..ef70c6f30168 100644
index 9e29276e0e4c..9d5588efe7cf 100644
--- services/network/public/mojom/network_context.mojom
+++ services/network/public/mojom/network_context.mojom
@@ -189,6 +189,9 @@ struct NetworkContextParams {
@@ -203,6 +203,9 @@ struct NetworkContextParams {
// cookies. Otherwise it should be false.
bool persist_session_cookies = false;

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 e64c679eccb4..85d0824e86b9 100644
index 3ec401eabdd3..49a3d5f9fd33 100644
--- ui/views/controls/native/native_view_host.cc
+++ ui/views/controls/native/native_view_host.cc
@@ -146,7 +146,7 @@ void NativeViewHost::OnPaint(gfx::Canvas* canvas) {
@@ -152,7 +152,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())

View File

@ -0,0 +1,49 @@
diff --git chrome/browser/profiles/profile_key.cc chrome/browser/profiles/profile_key.cc
index b225f2b..946403e 100644
--- chrome/browser/profiles/profile_key.cc
+++ chrome/browser/profiles/profile_key.cc
@@ -5,9 +5,12 @@
#include "chrome/browser/profiles/profile_key.h"
#include "base/logging.h"
+#include "components/keyed_service/core/simple_dependency_manager.h"
ProfileKey::ProfileKey(const base::FilePath& path, ProfileKey* original_key)
- : SimpleFactoryKey(path), prefs_(nullptr), original_key_(original_key) {}
+ : SimpleFactoryKey(path), prefs_(nullptr), original_key_(original_key) {
+ SimpleDependencyManager::GetInstance()->MarkContextLive(this);
+}
ProfileKey::~ProfileKey() = default;
diff --git components/keyed_service/core/simple_dependency_manager.cc components/keyed_service/core/simple_dependency_manager.cc
index 254c6ef..57d20b9 100644
--- components/keyed_service/core/simple_dependency_manager.cc
+++ components/keyed_service/core/simple_dependency_manager.cc
@@ -43,6 +43,10 @@
DependencyManager::CreateContextServices(key, true);
}
+void SimpleDependencyManager::MarkContextLive(SimpleFactoryKey* key) {
+ DependencyManager::MarkContextLive(key);
+}
+
SimpleDependencyManager::SimpleDependencyManager() = default;
SimpleDependencyManager::~SimpleDependencyManager() = default;
diff --git components/keyed_service/core/simple_dependency_manager.h components/keyed_service/core/simple_dependency_manager.h
index 72fa74c..480f971 100644
--- components/keyed_service/core/simple_dependency_manager.h
+++ components/keyed_service/core/simple_dependency_manager.h
@@ -35,6 +35,11 @@
// ServiceIsNULLWhileTesting().
void CreateServicesForTest(SimpleFactoryKey* key);
+ // Marks |context| as live (i.e., not stale). This method can be called as a
+ // safeguard against |AssertContextWasntDestroyed()| checks going off due to
+ // |context| aliasing an instance from a prior construction.
+ void MarkContextLive(SimpleFactoryKey* key);
+
private:
~SimpleDependencyManager() override;

View File

@ -52,10 +52,10 @@ index b2b3920da3b0..686afc464b42 100644
std::move(stats_db), BrowserFeatureProvider::GetFactoryCB());
decode_history = new_decode_history.get();
diff --git content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_impl.cc
index 9f2665f0587c..514ec596582d 100644
index f3a90e61f2b4..a9d322d66d86 100644
--- content/browser/renderer_host/render_process_host_impl.cc
+++ content/browser/renderer_host/render_process_host_impl.cc
@@ -2205,6 +2205,9 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
@@ -2203,6 +2203,9 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
plugin_registry_.reset(
new PluginRegistryImpl(GetBrowserContext()->GetResourceContext()));
}

View File

@ -1,5 +1,5 @@
diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h
index f65a2aeec12f..eac1f0d46692 100644
index 0a0fb37798bd..16f9ccdc669c 100644
--- base/trace_event/builtin_categories.h
+++ base/trace_event/builtin_categories.h
@@ -47,6 +47,8 @@

View File

@ -39,7 +39,7 @@ index cce16a111356..9f0a8b73adb5 100644
virtual void MenuWillShow() {}
diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc
index 68b99d49658d..a2f3a9c0819b 100644
index 9c38cd6d4fdb..dcd34308a8bc 100644
--- ui/gfx/render_text.cc
+++ ui/gfx/render_text.cc
@@ -514,6 +514,14 @@ void RenderText::SetElideBehavior(ElideBehavior elide_behavior) {
@ -115,7 +115,7 @@ index cb9ef740c6f3..aa7de6bb1924 100644
// Size used for the default SquareInkDropRipple.
static constexpr int kDefaultInkDropSize = 24;
diff --git ui/views/controls/button/label_button.cc ui/views/controls/button/label_button.cc
index 2be096ee8083..c5510fe90d9c 100644
index da6d3116cf1c..362610e5bc6f 100644
--- ui/views/controls/button/label_button.cc
+++ ui/views/controls/button/label_button.cc
@@ -184,6 +184,7 @@ gfx::Size LabelButton::CalculatePreferredSize() const {
@ -154,7 +154,7 @@ index 46f81be3d27a..249edf8cc5f8 100644
ImageView* image() const { return image_; }
Label* label() const;
diff --git ui/views/controls/label.cc ui/views/controls/label.cc
index 09c24be5fab2..c36455ea1f42 100644
index bba449033e54..f9545546d580 100644
--- ui/views/controls/label.cc
+++ ui/views/controls/label.cc
@@ -44,6 +44,22 @@ bool IsOpaque(SkColor color) {
@ -240,10 +240,10 @@ index 9df5c850d12d..e7007ffbb762 100644
std::unique_ptr<SelectionController> selection_controller_;
diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc
index cdbd697838bd..18d5d3273a18 100644
index 5e630a1a5f47..a3725641c2db 100644
--- ui/views/controls/menu/menu_controller.cc
+++ ui/views/controls/menu/menu_controller.cc
@@ -2573,8 +2573,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem(
@@ -2570,8 +2570,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem(
void MenuController::OpenSubmenuChangeSelectionIfCan() {
MenuItemView* item = pending_state_.item;
@ -256,9 +256,9 @@ index cdbd697838bd..18d5d3273a18 100644
return;
+ }
MenuItemView* to_select = nullptr;
if (item->GetSubmenu()->GetMenuItemCount() > 0)
if (!item->GetSubmenu()->GetMenuItems().empty())
to_select = FindInitialSelectableMenuItem(item, INCREMENT_SELECTION_DOWN);
@@ -2593,8 +2598,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
@@ -2590,8 +2595,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
void MenuController::CloseSubmenu() {
MenuItemView* item = state_.item;
DCHECK(item);
@ -310,10 +310,10 @@ index 921aef245bf3..4b7474c01c0e 100644
virtual int GetMaxWidthForMenu(MenuItemView* menu);
diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc
index 57962a8ba4ba..49d84f7c1497 100644
index 21379b8d3299..50bd688a01f3 100644
--- ui/views/controls/menu/menu_item_view.cc
+++ ui/views/controls/menu/menu_item_view.cc
@@ -1054,6 +1054,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas,
@@ -1060,6 +1060,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas,
spilling_rect.set_y(spilling_rect.y() - corner_radius_);
spilling_rect.set_height(spilling_rect.height() + corner_radius_);
canvas->DrawRoundRect(spilling_rect, corner_radius_, flags);
@ -329,7 +329,7 @@ index 57962a8ba4ba..49d84f7c1497 100644
} else if (render_selection) {
gfx::Rect item_bounds = GetLocalBounds();
if (type_ == ACTIONABLE_SUBMENU) {
@@ -1120,6 +1129,13 @@ void MenuItemView::PaintMinorIconAndText(
@@ -1126,6 +1135,13 @@ void MenuItemView::PaintMinorIconAndText(
}
SkColor MenuItemView::GetTextColor(bool minor, bool render_selection) const {
@ -344,10 +344,10 @@ index 57962a8ba4ba..49d84f7c1497 100644
minor ? ui::NativeTheme::kColorId_MenuItemMinorTextColor
: ui::NativeTheme::kColorId_EnabledMenuItemForegroundColor;
diff --git ui/views/controls/menu/menu_model_adapter.cc ui/views/controls/menu/menu_model_adapter.cc
index 8b75a57af027..9af49374fd4b 100644
index bae77a21e0d5..ac01a8a5c52c 100644
--- ui/views/controls/menu/menu_model_adapter.cc
+++ ui/views/controls/menu/menu_model_adapter.cc
@@ -223,6 +223,77 @@ bool MenuModelAdapter::IsItemChecked(int id) const {
@@ -225,6 +225,77 @@ bool MenuModelAdapter::IsItemChecked(int id) const {
return false;
}
@ -426,7 +426,7 @@ index 8b75a57af027..9af49374fd4b 100644
// Look up the menu model for this menu.
const std::map<MenuItemView*, ui::MenuModel*>::const_iterator map_iterator =
diff --git ui/views/controls/menu/menu_model_adapter.h ui/views/controls/menu/menu_model_adapter.h
index 2e4b8f9cdbe8..6b797f0b4dc8 100644
index 78f832fd3acf..cb030c991614 100644
--- ui/views/controls/menu/menu_model_adapter.h
+++ ui/views/controls/menu/menu_model_adapter.h
@@ -84,6 +84,20 @@ class VIEWS_EXPORT MenuModelAdapter : public MenuDelegate,
@ -451,7 +451,7 @@ index 2e4b8f9cdbe8..6b797f0b4dc8 100644
void WillHideMenu(MenuItemView* menu) override;
void OnMenuClosed(MenuItemView* menu) override;
diff --git ui/views/controls/menu/menu_scroll_view_container.cc ui/views/controls/menu/menu_scroll_view_container.cc
index 85ae4ec99e76..144c872ec894 100644
index f3ff29e3b7aa..12a8833b4fb3 100644
--- ui/views/controls/menu/menu_scroll_view_container.cc
+++ ui/views/controls/menu/menu_scroll_view_container.cc
@@ -181,6 +181,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view)
@ -467,10 +467,10 @@ index 85ae4ec99e76..144c872ec894 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 df718d54917a..43f53750879d 100644
index b251f90a2e24..f0986338d883 100644
--- ui/views/test/ui_controls_factory_desktop_aurax11.cc
+++ ui/views/test/ui_controls_factory_desktop_aurax11.cc
@@ -140,10 +140,6 @@ class UIControlsDesktopX11 : public UIControlsAura {
@@ -143,10 +143,6 @@ class UIControlsDesktopX11 : public UIControlsAura {
aura::test::QueryLatestMousePositionRequestInHost(host);
host->ConvertPixelsToDIP(&root_current_location);
@ -482,10 +482,10 @@ index df718d54917a..43f53750879d 100644
// Move the cursor because EnterNotify/LeaveNotify are generated with the
// current mouse position as a result of XGrabPointer()
diff --git ui/views/view.h ui/views/view.h
index a93aec7c4493..2d0126bc627d 100644
index b0d94c023392..20f671a0c35f 100644
--- ui/views/view.h
+++ ui/views/view.h
@@ -19,6 +19,7 @@
@@ -22,6 +22,7 @@
#include "base/i18n/rtl.h"
#include "base/logging.h"
#include "base/macros.h"
@ -493,12 +493,12 @@ index a93aec7c4493..2d0126bc627d 100644
#include "build/build_config.h"
#include "third_party/skia/include/core/SkPath.h"
#include "ui/accessibility/ax_enums.mojom.h"
@@ -148,7 +149,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
public ui::AcceleratorTarget,
@@ -270,7 +271,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
public ui::EventTarget,
public ui::EventHandler,
- public ui::PropertyHandler {
+ public ui::PropertyHandler,
public ui::PropertyHandler,
- public views::metadata::MetaDataProvider {
+ public views::metadata::MetaDataProvider,
+ public base::SupportsUserData {
public:
using Views = std::vector<View*>;

View File

@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
index e43c594742e8..63a16678ba83 100644
index 6986a9b55908..3045018adba0 100644
--- content/browser/renderer_host/render_widget_host_view_base.cc
+++ content/browser/renderer_host/render_widget_host_view_base.cc
@@ -585,6 +585,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() const {
@@ -585,6 +585,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() {
return screen_info.device_scale_factor;
}
@ -18,7 +18,7 @@ index e43c594742e8..63a16678ba83 100644
return renderer_frame_number_;
}
diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h
index 4535431ad0c9..3bf8658e5315 100644
index 11c2dcff17aa..b90626f0a3c3 100644
--- content/browser/renderer_host/render_widget_host_view_base.h
+++ content/browser/renderer_host/render_widget_host_view_base.h
@@ -83,6 +83,7 @@ class CursorManager;
@ -41,14 +41,14 @@ index 4535431ad0c9..3bf8658e5315 100644
RenderWidgetHostImpl* GetFocusedWidget() const;
@@ -138,6 +142,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
void DisableAutoResize(const gfx::Size& new_size) override;
bool IsScrollOffsetAtTop() const override;
float GetDeviceScaleFactor() const final;
bool IsScrollOffsetAtTop() override;
float GetDeviceScaleFactor() final;
+ void SetHasExternalParent(bool val) override;
+ bool HasExternalParent() const override;
TouchSelectionControllerClientManager*
GetTouchSelectionControllerClientManager() override;
void SetLastTabChangeStartTime(base::TimeTicks start_time) final;
@@ -490,6 +496,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
@@ -495,6 +501,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
// helps to position the full screen widget on the correct monitor.
virtual void InitAsFullscreen(RenderWidgetHostView* reference_host_view) = 0;
@ -61,7 +61,7 @@ index 4535431ad0c9..3bf8658e5315 100644
// Sets the cursor for this view to the one associated with the specified
// cursor_type.
virtual void UpdateCursor(const WebCursor& cursor) = 0;
@@ -686,6 +698,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
@@ -691,6 +703,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
bool is_currently_scrolling_viewport_ = false;
@ -73,7 +73,7 @@ index 4535431ad0c9..3bf8658e5315 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 c362e6be4c35..a63527310e05 100644
index 468561b429fc..960efc4945fb 100644
--- content/browser/renderer_host/render_widget_host_view_event_handler.cc
+++ content/browser/renderer_host/render_widget_host_view_event_handler.cc
@@ -32,6 +32,10 @@
@ -87,7 +87,7 @@ index c362e6be4c35..a63527310e05 100644
#if defined(OS_WIN)
#include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/public/common/context_menu_params.h"
@@ -878,6 +882,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() {
@@ -879,6 +883,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() {
::SetFocus(hwnd);
}
}
@ -103,12 +103,12 @@ index c362e6be4c35..a63527310e05 100644
// TODO(wjmaclean): can host_ ever be null?
if (host_ && set_focus_on_mouse_down_or_key_event_) {
diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h
index 300222fde149..2aa14a12eb20 100644
index ebe6ae74f316..321cbde15dcc 100644
--- content/public/browser/render_widget_host_view.h
+++ content/public/browser/render_widget_host_view.h
@@ -246,6 +246,14 @@ class CONTENT_EXPORT RenderWidgetHostView {
// This must always return the same device scale factor as GetScreenInfo.
virtual float GetDeviceScaleFactor() const = 0;
virtual float GetDeviceScaleFactor() = 0;
+ // Set whether the widget has a external parent view/window outside of the
+ // Chromium-controlled view/window hierarchy.
@ -194,26 +194,10 @@ index 4a87724d58d4..17c1e62b6585 100644
// a reference.
corewm::TooltipWin* tooltip_;
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
index 867867b53ff4..ca7d26a375f1 100644
index 423775286b42..bb2a8e0ac286 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
@@ -146,6 +146,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
use_native_frame_(false),
should_maximize_after_map_(false),
use_argb_visual_(false),
+ has_external_parent_(false),
drag_drop_client_(NULL),
native_widget_delegate_(native_widget_delegate),
desktop_native_widget_aura_(desktop_native_widget_aura),
@@ -159,6 +160,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
has_window_focus_(false),
has_pointer_focus_(false),
modal_dialog_counter_(0),
+ xwindow_destroyed_(false),
close_widget_factory_(this),
weak_factory_(this) {}
@@ -194,6 +196,8 @@ std::vector<aura::Window*> DesktopWindowTreeHostX11::GetAllOpenWindows() {
@@ -173,6 +173,8 @@ std::vector<aura::Window*> DesktopWindowTreeHostX11::GetAllOpenWindows() {
}
gfx::Rect DesktopWindowTreeHostX11::GetX11RootWindowBounds() const {
@ -222,7 +206,7 @@ index 867867b53ff4..ca7d26a375f1 100644
return bounds_in_pixels_;
}
@@ -504,7 +508,8 @@ void DesktopWindowTreeHostX11::CloseNow() {
@@ -483,7 +485,8 @@ void DesktopWindowTreeHostX11::CloseNow() {
// Actually free our native resources.
if (ui::PlatformEventSource::GetInstance())
ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this);
@ -232,7 +216,7 @@ index 867867b53ff4..ca7d26a375f1 100644
xwindow_ = x11::None;
desktop_native_widget_aura_->OnHostClosed();
@@ -649,6 +654,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement(
@@ -628,6 +631,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement(
}
gfx::Rect DesktopWindowTreeHostX11::GetWindowBoundsInScreen() const {
@ -241,7 +225,7 @@ index 867867b53ff4..ca7d26a375f1 100644
return ToDIPRect(bounds_in_pixels_);
}
@@ -1277,6 +1284,8 @@ void DesktopWindowTreeHostX11::SetBoundsInPixels(
@@ -1256,6 +1261,8 @@ void DesktopWindowTreeHostX11::SetBoundsInPixels(
}
gfx::Point DesktopWindowTreeHostX11::GetLocationOnScreenInPixels() const {
@ -250,7 +234,7 @@ index 867867b53ff4..ca7d26a375f1 100644
return bounds_in_pixels_.origin();
}
@@ -1417,7 +1426,6 @@ void DesktopWindowTreeHostX11::InitX11Window(
@@ -1396,7 +1403,6 @@ void DesktopWindowTreeHostX11::InitX11Window(
XAtom window_type;
switch (params.type) {
case Widget::InitParams::TYPE_MENU:
@ -258,7 +242,7 @@ index 867867b53ff4..ca7d26a375f1 100644
window_type = gfx::GetAtom("_NET_WM_WINDOW_TYPE_MENU");
break;
case Widget::InitParams::TYPE_TOOLTIP:
@@ -1474,9 +1482,15 @@ void DesktopWindowTreeHostX11::InitX11Window(
@@ -1453,9 +1459,15 @@ void DesktopWindowTreeHostX11::InitX11Window(
attribute_mask |= CWBorderPixel;
swa.border_pixel = 0;
@ -275,7 +259,7 @@ index 867867b53ff4..ca7d26a375f1 100644
bounds_in_pixels_.y(), bounds_in_pixels_.width(),
bounds_in_pixels_.height(),
0, // border width
@@ -2097,6 +2111,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
@@ -2077,6 +2089,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
}
break;
}
@ -287,7 +271,7 @@ index 867867b53ff4..ca7d26a375f1 100644
case x11::FocusOut:
OnFocusEvent(xev->type == x11::FocusIn, event->xfocus.mode,
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
index ca1a738ce019..3e4908b37f45 100644
index 4a3063c2af2c..9121a475949e 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
@@ -91,6 +91,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
@ -315,27 +299,27 @@ index ca1a738ce019..3e4908b37f45 100644
// |restored_bounds_in_pixels_|. Window managers tend to send a Configure
@@ -365,6 +374,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
// Whether we used an ARGB visual for our window.
bool use_argb_visual_;
bool use_argb_visual_ = false;
+ // True if the widget has a external parent view/window outside of the
+ // Chromium-controlled view/window hierarchy.
+ bool has_external_parent_;
+ bool has_external_parent_ = false;
+
DesktopDragDropClientAuraX11* drag_drop_client_;
DesktopDragDropClientAuraX11* drag_drop_client_ = nullptr;
std::unique_ptr<ui::EventHandler> x11_non_client_event_filter_;
@@ -458,6 +471,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
uint32_t modal_dialog_counter_;
uint32_t modal_dialog_counter_ = 0;
+ // True if the xwindow has already been destroyed.
+ bool xwindow_destroyed_;
+ bool xwindow_destroyed_ = false;
+
base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_;
base::WeakPtrFactory<DesktopWindowTreeHostX11> weak_factory_;
base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_{this};
base::WeakPtrFactory<DesktopWindowTreeHostX11> weak_factory_{this};
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
index 30cd8d62f5ee..21cabfd06228 100644
index 4e00aae2c6df..2b652017e35f 100644
--- ui/views/widget/widget.cc
+++ ui/views/widget/widget.cc
@@ -138,6 +138,7 @@ Widget::InitParams::InitParams(Type type)
@ -369,7 +353,7 @@ index 30cd8d62f5ee..21cabfd06228 100644
}
// This must come after SetContentsView() or it might not be able to find
// the correct NativeTheme (on Linux). See http://crbug.com/384492
@@ -1128,10 +1134,16 @@ void Widget::OnNativeWidgetDestroyed() {
@@ -1132,10 +1138,16 @@ void Widget::OnNativeWidgetDestroyed() {
}
gfx::Size Widget::GetMinimumSize() const {
@ -387,7 +371,7 @@ index 30cd8d62f5ee..21cabfd06228 100644
}
diff --git ui/views/widget/widget.h ui/views/widget/widget.h
index 6f1f45fed1b3..063e4c8ac778 100644
index d962e21208fa..0fa0ecfeab21 100644
--- ui/views/widget/widget.h
+++ ui/views/widget/widget.h
@@ -255,6 +255,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
@ -399,7 +383,7 @@ index 6f1f45fed1b3..063e4c8ac778 100644
// the NativeWidget may specify a default size. If the parent is specified,
// |bounds| is in the parent's coordinate system. If the parent is not
diff --git ui/views/widget/widget_delegate.h ui/views/widget/widget_delegate.h
index 75ace4b98cfa..257efbea2f42 100644
index 149f4798a445..5bfc9f32ec3b 100644
--- ui/views/widget/widget_delegate.h
+++ ui/views/widget/widget_delegate.h
@@ -190,6 +190,10 @@ class VIEWS_EXPORT WidgetDelegate {

View File

@ -1,8 +1,8 @@
diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc
index 249162757a03..070473ae57ab 100644
index 1491bf580c59..ab2c83357303 100644
--- content/browser/web_contents/web_contents_impl.cc
+++ content/browser/web_contents/web_contents_impl.cc
@@ -2067,21 +2067,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -2068,21 +2068,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
std::string unique_name;
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
@ -45,7 +45,7 @@ index 249162757a03..070473ae57ab 100644
CHECK(render_view_host_delegate_view_);
CHECK(view_.get());
@@ -2780,6 +2789,15 @@ void WebContentsImpl::CreateNewWindow(
@@ -2781,6 +2790,15 @@ void WebContentsImpl::CreateNewWindow(
create_params.renderer_initiated_creation =
main_frame_route_id != MSG_ROUTING_NONE;
@ -61,7 +61,7 @@ index 249162757a03..070473ae57ab 100644
std::unique_ptr<WebContents> new_contents;
if (!is_guest) {
create_params.context = view_->GetNativeView();
@@ -2812,7 +2830,7 @@ void WebContentsImpl::CreateNewWindow(
@@ -2813,7 +2831,7 @@ void WebContentsImpl::CreateNewWindow(
// TODO(brettw): It seems bogus that we have to call this function on the
// newly created object and give it one of its own member variables.
new_view->CreateViewForWidget(
@ -70,7 +70,7 @@ index 249162757a03..070473ae57ab 100644
}
// Save the created window associated with the route so we can show it
// later.
@@ -6374,7 +6392,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() {
@@ -6372,7 +6390,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() {
void WebContentsImpl::CreateRenderWidgetHostViewForRenderManager(
RenderViewHost* render_view_host) {
RenderWidgetHostViewBase* rwh_view =
@ -95,7 +95,7 @@ index df508da0aef2..f6f4bf42b108 100644
WebContents::CreateParams::CreateParams(const CreateParams& other) = default;
diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h
index 2fe0a25aed9f..6012449ffaee 100644
index 6cf2ca2a0ec5..bb29ed68f094 100644
--- content/public/browser/web_contents.h
+++ content/public/browser/web_contents.h
@@ -75,9 +75,11 @@ class BrowserPluginGuestDelegate;
@ -122,7 +122,7 @@ index 2fe0a25aed9f..6012449ffaee 100644
// the value that'll be returned by GetLastActiveTime(). If this is left
// default initialized then the value is not passed on to the WebContents
diff --git content/public/browser/web_contents_delegate.h content/public/browser/web_contents_delegate.h
index cb139112070d..aeabc47cf5f4 100644
index 3789137953ac..c8eb2dfb55ca 100644
--- content/public/browser/web_contents_delegate.h
+++ content/public/browser/web_contents_delegate.h
@@ -56,10 +56,12 @@ class FileSelectListener;

View File

@ -10,7 +10,7 @@ index 0cc3d5b6c9df..a4044788af10 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 ef373d2abdd3..bdf69253d070 100644
index 198d6649ef41..648b0bc20653 100644
--- third_party/blink/public/platform/platform.h
+++ third_party/blink/public/platform/platform.h
@@ -729,6 +729,11 @@ class BLINK_PLATFORM_EXPORT Platform {
@ -26,10 +26,10 @@ index ef373d2abdd3..bdf69253d070 100644
static void InitializeCommon(Platform* platform,
std::unique_ptr<Thread> main_thread);
diff --git third_party/blink/renderer/core/dom/dom_implementation.cc third_party/blink/renderer/core/dom/dom_implementation.cc
index 0c51c31103af..fa3b11014ae4 100644
index a616fafed51f..dae131dad5de 100644
--- third_party/blink/renderer/core/dom/dom_implementation.cc
+++ third_party/blink/renderer/core/dom/dom_implementation.cc
@@ -243,10 +243,11 @@ Document* DOMImplementation::createDocument(const String& type,
@@ -244,10 +244,11 @@ Document* DOMImplementation::createDocument(const String& type,
if (init.GetFrame()->IsMainFrame()) {
scoped_refptr<const SecurityOrigin> origin =
SecurityOrigin::Create(init.Url());
@ -44,10 +44,10 @@ index 0c51c31103af..fa3b11014ae4 100644
.Top()
.GetSecurityContext()
diff --git third_party/blink/renderer/core/frame/local_frame.cc third_party/blink/renderer/core/frame/local_frame.cc
index 9101b7bb1c66..c74746199c5d 100644
index dd0e2f0df7b5..3c3ff59f72a9 100644
--- third_party/blink/renderer/core/frame/local_frame.cc
+++ third_party/blink/renderer/core/frame/local_frame.cc
@@ -1318,7 +1318,7 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() {
@@ -1257,7 +1257,7 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() {
PluginData* LocalFrame::GetPluginData() const {
if (!Loader().AllowPlugins(kNotAboutToInstantiatePlugin))
return nullptr;
@ -57,18 +57,18 @@ index 9101b7bb1c66..c74746199c5d 100644
}
diff --git third_party/blink/renderer/core/inspector/devtools_session.cc third_party/blink/renderer/core/inspector/devtools_session.cc
index 13d28689750a..b7c710c747c3 100644
index 6435384652b7..79bd103df30d 100644
--- third_party/blink/renderer/core/inspector/devtools_session.cc
+++ third_party/blink/renderer/core/inspector/devtools_session.cc
@@ -4,6 +4,7 @@
@@ -5,6 +5,7 @@
#include "third_party/blink/renderer/core/inspector/devtools_session.h"
#include "base/containers/span.h"
+#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/bindings/core/v8/script_controller.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/use_counter.h"
@@ -152,6 +153,7 @@ DevToolsSession::DevToolsSession(
@@ -153,6 +154,7 @@ DevToolsSession::DevToolsSession(
for (wtf_size_t i = 0; i < agents_.size(); i++)
agents_[i]->Restore();
}
@ -76,7 +76,7 @@ index 13d28689750a..b7c710c747c3 100644
}
DevToolsSession::~DevToolsSession() {
@@ -190,6 +192,7 @@ void DevToolsSession::Detach() {
@@ -191,6 +193,7 @@ void DevToolsSession::Detach() {
agents_.clear();
v8_session_.reset();
agent_->client_->DebuggerTaskFinished();
@ -85,31 +85,31 @@ index 13d28689750a..b7c710c747c3 100644
void DevToolsSession::FlushProtocolNotifications() {
diff --git third_party/blink/renderer/core/page/page.cc third_party/blink/renderer/core/page/page.cc
index d10a5881d58e..7461e4ff47f8 100644
index 5480f0e29789..3bf2f35c9741 100644
--- third_party/blink/renderer/core/page/page.cc
+++ third_party/blink/renderer/core/page/page.cc
@@ -175,7 +175,8 @@ Page::Page(PageClients& page_clients)
overscroll_controller_(
OverscrollController::Create(GetVisualViewport(), GetChromeClient())),
link_highlights_(LinkHighlights::Create(*this)),
@@ -180,7 +180,8 @@ Page::Page(PageClients& page_clients)
MakeGarbageCollected<OverscrollController>(GetVisualViewport(),
GetChromeClient())),
link_highlights_(MakeGarbageCollected<LinkHighlights>(*this)),
- plugin_data_(nullptr),
+ plugin_data_main_frame_(nullptr),
+ plugin_data_sub_frame_(nullptr),
// TODO(pdr): Initialize |validation_message_client_| lazily.
validation_message_client_(ValidationMessageClientImpl::Create(*this)),
opened_by_dom_(false),
@@ -332,21 +333,40 @@ void Page::InitialStyleChanged() {
validation_message_client_(
MakeGarbageCollected<ValidationMessageClientImpl>(*this)),
@@ -337,21 +338,40 @@ void Page::InitialStyleChanged() {
}
}
-PluginData* Page::GetPluginData(const SecurityOrigin* main_frame_origin) {
- if (!plugin_data_)
- plugin_data_ = PluginData::Create();
- plugin_data_ = MakeGarbageCollected<PluginData>();
+PluginData* Page::GetPluginData(bool is_main_frame,
+ const SecurityOrigin* main_frame_origin) {
+ if (is_main_frame) {
+ if (!plugin_data_main_frame_)
+ plugin_data_main_frame_ = PluginData::Create();
+ plugin_data_main_frame_ = MakeGarbageCollected<PluginData>();
- if (!plugin_data_->Origin() ||
- !main_frame_origin->IsSameSchemeHostPort(plugin_data_->Origin()))
@ -123,7 +123,7 @@ index d10a5881d58e..7461e4ff47f8 100644
+ return plugin_data_main_frame_.Get();
+ } else {
+ if (!plugin_data_sub_frame_)
+ plugin_data_sub_frame_ = PluginData::Create();
+ plugin_data_sub_frame_ = MakeGarbageCollected<PluginData>();
- return plugin_data_.Get();
+ if (!plugin_data_sub_frame_->Origin() ||
@ -148,7 +148,7 @@ index d10a5881d58e..7461e4ff47f8 100644
page->NotifyPluginsChanged();
}
}
@@ -779,7 +799,8 @@ void Page::Trace(blink::Visitor* visitor) {
@@ -786,7 +806,8 @@ void Page::Trace(blink::Visitor* visitor) {
visitor->Trace(link_highlights_);
visitor->Trace(spatial_navigation_controller_);
visitor->Trace(main_frame_);
@ -159,7 +159,7 @@ index d10a5881d58e..7461e4ff47f8 100644
visitor->Trace(plugins_changed_observers_);
visitor->Trace(next_related_page_);
diff --git third_party/blink/renderer/core/page/page.h third_party/blink/renderer/core/page/page.h
index b782c201c08a..7e8334d55c97 100644
index f3d748e4a3e7..3750ba015d76 100644
--- third_party/blink/renderer/core/page/page.h
+++ third_party/blink/renderer/core/page/page.h
@@ -140,7 +140,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized<Page>,
@ -172,7 +172,7 @@ index b782c201c08a..7e8334d55c97 100644
// Resets the plugin data for all pages in the renderer process and notifies
// PluginsChangedObservers.
@@ -363,7 +364,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized<Page>,
@@ -364,7 +365,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized<Page>,
const Member<LinkHighlights> link_highlights_;
Member<SpatialNavigationController> spatial_navigation_controller_;
@ -183,7 +183,7 @@ index b782c201c08a..7e8334d55c97 100644
Member<ValidationMessageClient> validation_message_client_;
diff --git third_party/blink/renderer/core/page/plugin_data.cc third_party/blink/renderer/core/page/plugin_data.cc
index f333f38a88a8..b981b2234467 100644
index 3855e47147d5..c83cd67b93d8 100644
--- third_party/blink/renderer/core/page/plugin_data.cc
+++ third_party/blink/renderer/core/page/plugin_data.cc
@@ -90,10 +90,12 @@ void PluginData::RefreshBrowserSidePluginCache() {
@ -211,10 +211,10 @@ index f333f38a88a8..b981b2234467 100644
auto* plugin_info = MakeGarbageCollected<PluginInfo>(
plugin->name, FilePathToWebString(plugin->filename),
diff --git third_party/blink/renderer/core/page/plugin_data.h third_party/blink/renderer/core/page/plugin_data.h
index 47129faba0c0..8451e98eeaf5 100644
index 446cf8fbe161..299648db9c28 100644
--- third_party/blink/renderer/core/page/plugin_data.h
+++ third_party/blink/renderer/core/page/plugin_data.h
@@ -102,7 +102,8 @@ class CORE_EXPORT PluginData final
@@ -100,7 +100,8 @@ class CORE_EXPORT PluginData final
const HeapVector<Member<PluginInfo>>& Plugins() const { return plugins_; }
const HeapVector<Member<MimeClassInfo>>& Mimes() const { return mimes_; }
const SecurityOrigin* Origin() const { return main_frame_origin_.get(); }

View File

@ -1,8 +1,8 @@
diff --git third_party/blink/public/web/web_view.h third_party/blink/public/web/web_view.h
index 36d767e51b2f..4425dfeaa786 100644
index f831c084e1d3..80dd4ea3a154 100644
--- third_party/blink/public/web/web_view.h
+++ third_party/blink/public/web/web_view.h
@@ -358,6 +358,7 @@ class WebView {
@@ -363,6 +363,7 @@ class WebView {
// Sets whether select popup menus should be rendered by the browser.
BLINK_EXPORT static void SetUseExternalPopupMenus(bool);
@ -11,10 +11,10 @@ index 36d767e51b2f..4425dfeaa786 100644
// Cancels and hides the current popup (datetime, select...) if any.
virtual void CancelPagePopup() = 0;
diff --git third_party/blink/renderer/core/exported/web_view_impl.cc third_party/blink/renderer/core/exported/web_view_impl.cc
index 92529f378bb2..7ec3894f996c 100644
index fa2150289b4f..611dffb1ef7d 100644
--- third_party/blink/renderer/core/exported/web_view_impl.cc
+++ third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -234,8 +234,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
@@ -238,8 +238,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
g_should_use_external_popup_menus = use_external_popup_menus;
}
@ -31,7 +31,7 @@ index 92529f378bb2..7ec3894f996c 100644
namespace {
@@ -297,6 +302,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client,
chrome_client_(ChromeClientImpl::Create(this)),
chrome_client_(MakeGarbageCollected<ChromeClientImpl>(this)),
minimum_zoom_level_(ZoomFactorToZoomLevel(kMinTextSizeMultiplier)),
maximum_zoom_level_(ZoomFactorToZoomLevel(kMaxTextSizeMultiplier)),
+ should_use_external_popup_menus_(g_should_use_external_popup_menus),
@ -39,10 +39,10 @@ index 92529f378bb2..7ec3894f996c 100644
fullscreen_controller_(std::make_unique<FullscreenController>(this)) {
if (!AsView().client) {
diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h
index d161ab3cf8af..6b655c488a0a 100644
index aaa17462ee65..647b51d8fddc 100644
--- third_party/blink/renderer/core/exported/web_view_impl.h
+++ third_party/blink/renderer/core/exported/web_view_impl.h
@@ -106,7 +106,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -105,7 +105,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).
@ -50,9 +50,9 @@ index d161ab3cf8af..6b655c488a0a 100644
+ void SetUseExternalPopupMenusThisInstance(bool) override;
+ bool UseExternalPopupMenus() const;
// WebView methods:
void DidAttachLocalMainFrame(WebWidgetClient*) override;
@@ -616,6 +617,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
// Returns whether frames under this WebView are backed by a compositor. When
// false there may be no WebWidgetClient present. When true, there must be a
@@ -617,6 +618,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 d161ab3cf8af..6b655c488a0a 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 c9e907264bfe..4b4395144ba5 100644
index 4c326ba6d8d9..59f8ceb29958 100644
--- third_party/blink/renderer/core/page/chrome_client_impl.cc
+++ third_party/blink/renderer/core/page/chrome_client_impl.cc
@@ -823,7 +823,7 @@ bool ChromeClientImpl::HasOpenedPopup() const {
@@ -812,7 +812,7 @@ bool ChromeClientImpl::HasOpenedPopup() const {
PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
HTMLSelectElement& select) {
NotifyPopupOpeningObservers();

View File

@ -1,8 +1,8 @@
diff --git chrome/app/generated_resources.grd chrome/app/generated_resources.grd
index 563000c780b4..35f019c4d2de 100644
index 4989fa559ee6..c6859944e8b4 100644
--- chrome/app/generated_resources.grd
+++ chrome/app/generated_resources.grd
@@ -4581,7 +4581,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
@@ -4644,7 +4644,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

@ -1,5 +1,5 @@
diff --git services/service_manager/sandbox/win/sandbox_win.cc services/service_manager/sandbox/win/sandbox_win.cc
index f4c3eeda2285..7fbd7921be0b 100644
index 2d994b725cf7..b91459e5b559 100644
--- services/service_manager/sandbox/win/sandbox_win.cc
+++ services/service_manager/sandbox/win/sandbox_win.cc
@@ -917,8 +917,11 @@ sandbox::ResultCode SandboxWin::StartSandboxedProcess(