Commit a60bb077 authored by Marshall Greenblatt's avatar Marshall Greenblatt

Update to Chromium revision 68623971 (#403382)

parent d0a2e217
......@@ -1367,7 +1367,24 @@ if (is_mac) {
":libcef_static",
]
ldflags = [ "-Wl,-install_name,@executable_path/../Frameworks/$output_name.framework/$output_name" ]
# Both the main app executable and helper executables need to link the
# framework. Because they are at different directory depths, using
# @executable_path as the install_name would require using install_name_tool
# on one of the executables. However install_name_tool only operates
# in-place, which is problematic to express in GN. Instead, use rpath-based
# loading.
ldflags = [ "-Wl,-install_name,@rpath/Frameworks/$output_name.framework/$output_name" ]
if (is_component_build) {
# Set up the rpath for the framework so that it can find dylibs in the
# root output directory. The framework is at
# $app_name.app/Contents/Frameworks/$output_name.framework/$output_name
# so use loader_path to go back to the root output directory.
ldflags += [
"-rpath",
"@loader_path/../../../..",
]
}
info_plist_target = ":cef_framework_plist"
}
......@@ -1560,56 +1577,14 @@ if (is_mac) {
ldflags = [
# The helper is in $app_name.app/Contents/Frameworks/$app_name Helper.app/Contents/MacOS/
# so set rpath up to the base.
# so set rpath up to Contents/ so that the loader can find Frameworks/.
"-rpath",
"@loader_path/../../../../../..",
"@executable_path/../../../..",
]
info_plist_target = ":${app_name}_helper_plist"
}
# The install_name_tool can only operate in-place, rather than producing a
# unique output. Use the xcrun wrapper script to write a fake stamp output
# file. After :cef_helper_app has been built and bundled, this
# will run, modifying the executable in the bundle and writing out the
# --stamp specified. This will change the mtime on the executable, but
# because the stamp will also be updated, the
# :cef_framework_bundle_data will re-copy the output. This only
# works because nothing else depends on the output of
# :cef_helper_app.
# TODO(rsesek): After GYP is gone, re-write cef_main to be like
# chrome_main and use dlopen() instead of a linked framework.
action("${app_name}_fix_helper_link_framework") {
testonly = app_testonly
script = "//build/config/mac/xcrun.py"
inputs = [
"$root_out_dir/$app_helper_name.app/Contents/MacOS/$app_helper_name",
]
stamp_file = "$target_out_dir/xcrun_$target_name.stamp"
outputs = [
stamp_file,
]
# TODO(rsesek): Figure out something like GYP's postbuilds to allow
# install_name_tool to operate in-place <https://crbug.com/607292>.
args = [
"--stamp",
rebase_path(stamp_file, root_build_dir),
# xcrun arguments:
"install_name_tool",
"-change",
"@executable_path/../Frameworks/$cef_framework_name.framework/$cef_framework_name",
"@executable_path/../../../$cef_framework_name.framework/$cef_framework_name",
] + rebase_path(inputs, root_build_dir)
public_deps = [
":${app_name}_helper_app",
]
}
bundle_data("${app_name}_framework_bundle_data") {
testonly = app_testonly
sources = [
......@@ -1619,7 +1594,7 @@ if (is_mac) {
public_deps = [
":cef_framework+link",
":${app_name}_fix_helper_link_framework",
":${app_name}_helper_app",
]
outputs = [
......@@ -1654,6 +1629,13 @@ if (is_mac) {
libs = invoker.libs
}
ldflags = [
# The main app is at $app_name.app/Contents/MacOS/$app_name
# so set rpath up to Contents/ so that the loader can find Frameworks/.
"-rpath",
"@executable_path/../",
]
info_plist_target = ":${app_name}_plist"
}
}
......
......@@ -7,5 +7,5 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{
'chromium_checkout': '318e6f543c58eeeac93b122030041139da7e1e6a',
'chromium_checkout': '68623971be0cfc492a2cb0427d7f478e7b214c24',
}
......@@ -208,6 +208,12 @@ safe_browsing::ClientSideDetectionService*
return NULL;
}
subresource_filter::RulesetService*
ChromeBrowserProcessStub::subresource_filter_ruleset_service() {
NOTIMPLEMENTED();
return NULL;
}
#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
void ChromeBrowserProcessStub::StartAutoupdateTimer() {
}
......
......@@ -72,6 +72,8 @@ class ChromeBrowserProcessStub : public BrowserProcess {
safe_browsing::SafeBrowsingService* safe_browsing_service() override;
safe_browsing::ClientSideDetectionService*
safe_browsing_detection_service() override;
subresource_filter::RulesetService*
subresource_filter_ruleset_service() override;
#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
void StartAutoupdateTimer() override;
......
......@@ -51,6 +51,7 @@
#include "content/public/browser/browser_url_handler.h"
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/client_certificate_delegate.h"
#include "content/public/browser/geolocation_delegate.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/page_navigator.h"
#include "content/public/browser/quota_permission_context.h"
......@@ -116,6 +117,23 @@ class CefAccessTokenStore : public content::AccessTokenStore {
DISALLOW_COPY_AND_ASSIGN(CefAccessTokenStore);
};
// A provider of services for geolocation.
class CefGeolocationDelegate : public content::GeolocationDelegate {
public:
explicit CefGeolocationDelegate(net::URLRequestContextGetter* system_context)
: system_context_(system_context) {}
content::AccessTokenStore* CreateAccessTokenStore() override {
return new CefAccessTokenStore(system_context_);
}
private:
net::URLRequestContextGetter* system_context_;
DISALLOW_COPY_AND_ASSIGN(CefGeolocationDelegate);
};
class CefQuotaCallbackImpl : public CefRequestCallback {
public:
explicit CefQuotaCallbackImpl(
......@@ -674,8 +692,9 @@ void CefContentBrowserClient::SelectClientCertificate(
}
}
content::AccessTokenStore* CefContentBrowserClient::CreateAccessTokenStore() {
return new CefAccessTokenStore(
content::GeolocationDelegate*
CefContentBrowserClient::CreateGeolocationDelegate() {
return new CefGeolocationDelegate(
browser_main_parts_->browser_context()->request_context().get());
}
......
......@@ -66,7 +66,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
content::WebContents* web_contents,
net::SSLCertRequestInfo* cert_request_info,
std::unique_ptr<content::ClientCertificateDelegate> delegate) override;
content::AccessTokenStore* CreateAccessTokenStore() override;
content::GeolocationDelegate* CreateGeolocationDelegate() override;
bool CanCreateWindow(const GURL& opener_url,
const GURL& opener_top_level_frame_url,
const GURL& source_origin,
......
......@@ -170,12 +170,6 @@ bool CefExtensionsBrowserClient::IsLoggedInAsPublicAccount() {
return false;
}
ApiActivityMonitor* CefExtensionsBrowserClient::GetApiActivityMonitor(
BrowserContext* context) {
// CEF doesn't monitor API function calls or events.
return NULL;
}
ExtensionSystemProvider*
CefExtensionsBrowserClient::GetExtensionSystemFactory() {
return CefExtensionSystemFactory::GetInstance();
......
......@@ -64,8 +64,6 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient {
void PermitExternalProtocolHandler() override;
bool IsRunningInForcedAppMode() override;
bool IsLoggedInAsPublicAccount() override;
ApiActivityMonitor* GetApiActivityMonitor(
content::BrowserContext* context) override;
ExtensionSystemProvider* GetExtensionSystemFactory() override;
void RegisterExtensionFunctions(
ExtensionFunctionRegistry* registry) const override;
......
......@@ -21,6 +21,11 @@
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/common/renderer_preferences.h"
#include "ui/events/keycodes/dom/dom_key.h"
#include "ui/events/keycodes/dom/keycode_converter.h"
#include "ui/events/keycodes/keyboard_code_conversion_x.h"
#include "ui/events/keycodes/keyboard_code_conversion_xkb.h"
#include "ui/events/keycodes/keysym_to_unicode.h"
#include "ui/gfx/font_render_params.h"
#include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h"
#include "ui/views/widget/widget.h"
......@@ -268,6 +273,17 @@ void CefBrowserPlatformDelegateNativeLinux::TranslateKeyEvent(
NOTREACHED();
}
// Populate DOM values that will be passed to JavaScript handlers via
// KeyboardEvent.
result.domCode =
static_cast<int>(ui::KeycodeConverter::NativeKeycodeToDomCode(
key_event.native_key_code));
int keysym = ui::XKeysymForWindowsKeyCode(
static_cast<ui::KeyboardCode>(key_event.windows_key_code),
!!(key_event.modifiers & EVENTFLAG_SHIFT_DOWN));
base::char16 ch = ui::GetUnicodeCharacterFromXKeySym(keysym);
result.domKey = static_cast<int>(ui::XKeySymToDomKey(keysym, ch));
result.text[0] = key_event.character;
result.unmodifiedText[0] = key_event.unmodified_character;
......
......@@ -25,6 +25,10 @@
#include "ui/base/win/shell.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
#include "ui/events/keycodes/dom/dom_key.h"
#include "ui/events/keycodes/dom/keycode_converter.h"
#include "ui/events/keycodes/keyboard_code_conversion_win.h"
#include "ui/events/keycodes/platform_key_map_win.h"
#include "ui/gfx/win/hwnd_util.h"
#include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h"
#include "ui/views/widget/widget.h"
......@@ -382,6 +386,21 @@ void CefBrowserPlatformDelegateNativeWin::TranslateKeyEvent(
NOTREACHED();
}
// Populate DOM values that will be passed to JavaScript handlers via
// KeyboardEvent.
result.domCode =
static_cast<int>(ui::KeycodeConverter::NativeKeycodeToDomCode(
key_event.native_key_code));
if (result.type == blink::WebInputEvent::Char) {
result.domKey = ui::DomKey::FromCharacter(key_event.windows_key_code);
} else {
// TODO(cef): CefKeyEvent does not currently pass extended key status (see
// WM_KEYDOWN docs) which would be necessary to pass EF_IS_EXTENDED_KEY as
// the |flags| parameter to DomKeyFromKeyboardCode().
result.domKey = ui::PlatformKeyMap::DomKeyFromKeyboardCode(
ui::KeyboardCodeForWindowsKeyCode(key_event.windows_key_code), 0);
}
if (result.type == blink::WebInputEvent::Char ||
result.type == blink::WebInputEvent::RawKeyDown) {
result.text[0] = result.windowsKeyCode;
......
......@@ -34,6 +34,8 @@
#include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.h"
#include "net/cert/cert_verifier.h"
#include "net/cert/ct_policy_enforcer.h"
#include "net/cert/multi_log_ct_verifier.h"
#include "net/cookies/cookie_monster.h"
#include "net/extras/sqlite/sqlite_persistent_cookie_store.h"
#include "net/dns/host_resolver.h"
......@@ -207,6 +209,10 @@ net::URLRequestContext* CefURLRequestContextGetterImpl::GetURLRequestContext() {
storage_->set_cert_verifier(net::CertVerifier::CreateDefault());
storage_->set_transport_security_state(
base::WrapUnique(new net::TransportSecurityState));
storage_->set_cert_transparency_verifier(
base::WrapUnique(new net::MultiLogCTVerifier));
storage_->set_ct_policy_enforcer(
base::WrapUnique(new net::CTPolicyEnforcer));
std::unique_ptr<net::ProxyService> system_proxy_service =
ProxyServiceFactory::CreateProxyService(
......@@ -257,6 +263,10 @@ net::URLRequestContext* CefURLRequestContextGetterImpl::GetURLRequestContext() {
url_request_context_->cert_verifier();
network_session_params.transport_security_state =
url_request_context_->transport_security_state();
network_session_params.cert_transparency_verifier =
url_request_context_->cert_transparency_verifier();
network_session_params.ct_policy_enforcer =
url_request_context_->ct_policy_enforcer();
network_session_params.channel_id_service =
url_request_context_->channel_id_service();
network_session_params.proxy_service =
......
......@@ -120,9 +120,8 @@ class CefRenderWidgetHostViewOSR
#endif // defined(OS_MACOSX)
// RenderWidgetHostViewBase implementation.
void OnSwapCompositorFrame(
uint32_t output_surface_id,
std::unique_ptr<cc::CompositorFrame> frame) override;
void OnSwapCompositorFrame(uint32_t output_surface_id,
cc::CompositorFrame frame) override;
void ClearCompositorFrame() override;
void InitAsPopup(content::RenderWidgetHostView* parent_host_view,
const gfx::Rect& pos) override;
......@@ -163,7 +162,6 @@ class CefRenderWidgetHostViewOSR
void EndFrameSubscription() override;
bool HasAcceleratedSurface(const gfx::Size& desired_size) override;
void GetScreenInfo(blink::WebScreenInfo* results) override;
bool GetScreenColorProfile(std::vector<char>* color_profile) override;
gfx::Rect GetBoundsInRootWindow() override;
content::BrowserAccessibilityManager*
CreateBrowserAccessibilityManager(
......@@ -266,11 +264,14 @@ class CefRenderWidgetHostViewOSR
child_host_view_ = popup_view;
}
ui::Compositor* compositor() const { return compositor_.get(); }
ui::Compositor* GetCompositor() const;
content::RenderWidgetHostImpl* render_widget_host() const
{ return render_widget_host_; }
private:
content::DelegatedFrameHost* GetDelegatedFrameHost() const;
ui::Layer* GetRootLayer() const;
void SetFrameRate();
void SetDeviceScaleFactor();
void ResizeRootLayer();
......@@ -323,10 +324,12 @@ class CefRenderWidgetHostViewOSR
float scale_factor_;
int frame_rate_threshold_ms_;
std::unique_ptr<content::DelegatedFrameHost> delegated_frame_host_;
#if !defined(OS_MACOSX)
std::unique_ptr<ui::Compositor> compositor_;
gfx::AcceleratedWidget compositor_widget_;
std::unique_ptr<content::DelegatedFrameHost> delegated_frame_host_;
std::unique_ptr<ui::Layer> root_layer_;
#endif
#if defined(OS_WIN)
std::unique_ptr<gfx::WindowImpl> window_;
......
......@@ -63,7 +63,7 @@ class AcceleratedWidgetMacNSViewHelper : public ui::AcceleratedWidgetMacNSView {
ui::AcceleratedWidgetMac* CefRenderWidgetHostViewOSR::GetAcceleratedWidgetMac()
const {
if (browser_compositor_)
return browser_compositor_->accelerated_widget_mac();
return browser_compositor_->GetAcceleratedWidgetMac();
return nullptr;
}
......@@ -307,6 +307,19 @@ void CefRenderWidgetHostViewOSR::DestroyNSTextInputOSR() {
text_input_context_osr_mac_ = NULL;
}
ui::Compositor* CefRenderWidgetHostViewOSR::GetCompositor() const {
return browser_compositor_->GetCompositor();
}
content::DelegatedFrameHost* CefRenderWidgetHostViewOSR::GetDelegatedFrameHost()
const {
return browser_compositor_->GetDelegatedFrameHost();
}
ui::Layer* CefRenderWidgetHostViewOSR::GetRootLayer() const {
return browser_compositor_->GetRootLayer();
}
void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget() {
// Create a borderless non-visible 1x1 window.
window_ = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 1, 1)
......@@ -321,39 +334,23 @@ void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget() {
[content_view setLayer:background_layer_];
[content_view setWantsLayer:YES];
browser_compositor_ = content::BrowserCompositorMac::Create();
accelerated_widget_helper_ = new AcceleratedWidgetMacNSViewHelper(this);
compositor_.reset(browser_compositor_->compositor());
compositor_->SetRootLayer(root_layer_.get());
browser_compositor_->accelerated_widget_mac()->SetNSView(
accelerated_widget_helper_);
browser_compositor_->compositor()->SetVisible(true);
// CEF needs the browser compositor to remain responsive whereas normal
// rendering on OS X does not. This effectively reverts the changes from
// https://crbug.com/463988#c6
compositor_->SetLocksWillTimeOut(true);
browser_compositor_->Unsuspend();
browser_compositor_.reset(new content::BrowserCompositorMac(
accelerated_widget_helper_, this, render_widget_host_->is_hidden(),
true));
}
void CefRenderWidgetHostViewOSR::PlatformDestroyCompositorWidget() {
DCHECK(window_);
// Compositor is owned by and will be freed by BrowserCompositorMac.
ui::Compositor* compositor = compositor_.release();
ALLOW_UNUSED_LOCAL(compositor);
browser_compositor_->Destroy();
[window_ close];
window_ = nil;
[background_layer_ release];
background_layer_ = nil;
browser_compositor_->accelerated_widget_mac()->ResetNSView();
browser_compositor_->compositor()->SetVisible(false);
browser_compositor_->compositor()->SetScaleAndSize(1.0, gfx::Size(0, 0));
browser_compositor_->compositor()->SetRootLayer(NULL);
content::BrowserCompositorMac::Recycle(std::move(browser_compositor_));
browser_compositor_.reset();
delete accelerated_widget_helper_;
accelerated_widget_helper_ = nullptr;
......
......@@ -11,6 +11,7 @@
#include "base/auto_reset.h"
#include "base/bind.h"
#include "base/location.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
......@@ -428,7 +429,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
{
base::MessageLoop::ScopedNestableTaskAllower allow(
base::MessageLoop::current());
base::MessageLoop::current()->Run();
base::RunLoop().Run();
}
bool success = true;
......
......@@ -54,7 +54,8 @@ net::URLRequestContext* CefResourceContext::GetRequestContext() {
return getter_->GetURLRequestContext();
}
std::unique_ptr<net::ClientCertStore> CefResourceContext::CreateClientCertStore() {
std::unique_ptr<net::ClientCertStore>
CefResourceContext::CreateClientCertStore() {
#if defined(USE_NSS_CERTS)
return std::unique_ptr<net::ClientCertStore>(new net::ClientCertStoreNSS(
net::ClientCertStoreNSS::PasswordDelegateFactory()));
......
......@@ -10,6 +10,7 @@
#include "content/public/browser/resource_context.h"
#include "extensions/browser/info_map.h"
#include "net/ssl/client_cert_store.h"
class CefURLRequestContextGetter;
......@@ -31,7 +32,8 @@ class CefResourceContext : public content::ResourceContext {
// ResourceContext implementation.
net::HostResolver* GetHostResolver() override;
net::URLRequestContext* GetRequestContext() override;
std::unique_ptr<net::ClientCertStore> CreateClientCertStore() override;
std::unique_ptr<net::ClientCertStore> CreateClientCertStore();
void set_url_request_context_getter(
scoped_refptr<CefURLRequestContextGetter> getter);
......
......@@ -208,3 +208,10 @@ void CefResourceDispatcherHostDelegate::OnRequestRedirected(
response->head.headers->AddHeader("Access-Control-Allow-Credentials: true");
}
}
std::unique_ptr<net::ClientCertStore>
CefResourceDispatcherHostDelegate::CreateClientCertStore(
content::ResourceContext* resource_context) {
return static_cast<CefResourceContext*>(resource_context)->
CreateClientCertStore();
}
......@@ -42,6 +42,8 @@ class CefResourceDispatcherHostDelegate
net::URLRequest* request,
content::ResourceContext* resource_context,
content::ResourceResponse* response) override;
std::unique_ptr<net::ClientCertStore> CreateClientCertStore(
content::ResourceContext* resource_context) override;
private:
struct StreamTargetInfo {
......
......@@ -162,7 +162,7 @@ bool CefTextfieldImpl::IsCommandEnabled(int command_id) {
void CefTextfieldImpl::ExecuteCommand(int command_id) {
CEF_REQUIRE_VALID_RETURN_VOID();
if (root_view()->IsCommandIdEnabled(command_id))
root_view()->ExecuteCommand(command_id);
root_view()->ExecuteCommand(command_id, ui::EF_NONE);
}
void CefTextfieldImpl::ClearEditHistory() {
......
......@@ -438,6 +438,14 @@ void CefRequestImpl::Set(net::URLRequest* request) {
case net::URLRequest::NEVER_CLEAR_REFERRER:
referrer_policy_ = REFERRER_POLICY_ALWAYS;
break;
case net::URLRequest::ORIGIN:
referrer_policy_ = REFERRER_POLICY_ORIGIN;
break;
case net::URLRequest::NO_REFERRER:
referrer_policy_ = REFERRER_POLICY_NEVER;
break;
case net::URLRequest::MAX_REFERRER_POLICY:
break;
}
}
......
......@@ -17,8 +17,6 @@
#include "media/base/eme_constants.h"
#include "media/base/key_system_properties.h"
#include "media/media_features.h"
#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
// The following must be after widevine_cdm_version.h.
......@@ -118,10 +116,8 @@ static void AddPepperBasedWidevine(
#if defined(USE_PROPRIETARY_CODECS)
if (codecs[i] == kCdmSupportedCodecAvc1)
supported_codecs |= media::EME_CODEC_MP4_AVC1;
#if BUILDFLAG(ENABLE_MP4_VP9_DEMUXING)
if (codecs[i] == kCdmSupportedCodecVp9)
supported_codecs |= media::EME_CODEC_MP4_VP9;
#endif
#endif // defined(USE_PROPRIETARY_CODECS)
}
......
......@@ -10,8 +10,8 @@
#include "build/build_config.h"
#include "chrome/common/chrome_utility_messages.h"
#include "chrome/utility/utility_message_handler.h"
#include "content/public/common/service_registry.h"
#include "net/proxy/mojo_proxy_resolver_factory_impl.h"
#include "services/shell/public/cpp/interface_registry.h"
#if defined(OS_WIN)
#include "libcef/utility/printing_handler.h"
......@@ -51,8 +51,8 @@ bool CefContentUtilityClient::OnMessageReceived(
return handled;
}
void CefContentUtilityClient::RegisterMojoServices(
content::ServiceRegistry* registry) {
registry->AddService<net::interfaces::ProxyResolverFactory>(
void CefContentUtilityClient::ExposeInterfacesToBrowser(
shell::InterfaceRegistry* registry) {
registry->AddInterface<net::interfaces::ProxyResolverFactory>(
base::Bind(CreateProxyResolverFactory));
}
......@@ -17,7 +17,7 @@ class CefContentUtilityClient : public content::ContentUtilityClient {
~CefContentUtilityClient() override;
bool OnMessageReceived(const IPC::Message& message) override;
void RegisterMojoServices(content::ServiceRegistry* registry) override;
void ExposeInterfacesToBrowser(shell::InterfaceRegistry* registry) override;
private:
typedef ScopedVector<UtilityMessageHandler> Handlers;
......
......@@ -25,9 +25,6 @@ patches = [
# Use a unique output path for the compile_xibs template on Mac.
# https://bugs.chromium.org/p/chromium/issues/detail?id=623237
#
# Fix broken GN configuration for enable_print_preview = false on Mac.
# https://bugs.chromium.org/p/chromium/issues/detail?id=617477
#
# Support custom VS toolchain on Windows.
# https://bugs.chromium.org/p/chromium/issues/detail?id=623342
'name': 'gn_config',
......@@ -275,4 +272,16 @@ patches = [
'name': 'render_view_host_impl_1392',
'path': '../content/browser/renderer_host/',
},
{
# Fix GYP build error on Linux.
# https://bugs.chromium.org/p/chromium/issues/detail?id=626150
# TODO(cef): Remove this patch when GYP support is removed.
'name': 'gyp_build_626150',
'path': '../',
},
{
# Expose ui::Compositor via BrowserCompositorMac for OSR.
'name': 'browser_compositor_mac',
'path': '../',
},
]
diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h
index 552a56b..2a817d8 100644
--- content/browser/renderer_host/browser_compositor_view_mac.h
+++ content/browser/renderer_host/browser_compositor_view_mac.h
@@ -52,6 +52,7 @@ class BrowserCompositorMac {
// This may return nullptr, if this has detached itself from its
// ui::Compositor.
+ ui::Compositor* GetCompositor();
ui::AcceleratedWidgetMac* GetAcceleratedWidgetMac();
void SwapCompositorFrame(uint32_t output_surface_id,
diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm
index e9faa0a..931a92f 100644
--- content/browser/renderer_host/browser_compositor_view_mac.mm
+++ content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -186,6 +186,12 @@ void BrowserCompositorMac::Destroy() {
g_spare_recyclable_compositor.Get().reset();
}
+ui::Compositor* BrowserCompositorMac::GetCompositor() {