Commit a9f0fa9d authored by Marshall Greenblatt's avatar Marshall Greenblatt
Browse files

Update to Chromium version 68.0.3416.0 (#554961)

parent 240ba800
......@@ -7,5 +7,5 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{
'chromium_checkout': 'refs/tags/68.0.3409.0',
'chromium_checkout': 'refs/tags/68.0.3416.0',
}
......@@ -164,6 +164,7 @@ typedef std::basic_string<char16, string16_char_traits> string16;
namespace base {
typedef cef::base::char16 char16;
typedef cef::base::string16 string16;
extern std::ostream& operator<<(std::ostream& out, const string16& str);
......
......@@ -352,13 +352,13 @@ CefRefPtr<CefBrowserHostImpl> CefBrowserHostImpl::Create(
&wc_create_params.view, &wc_create_params.delegate_view);
}
content::WebContents* web_contents =
std::unique_ptr<content::WebContents> web_contents =
content::WebContents::Create(wc_create_params);
DCHECK(web_contents);
CefRefPtr<CefBrowserHostImpl> browser = CefBrowserHostImpl::CreateInternal(
create_params.settings, create_params.client, web_contents, info,
create_params.devtools_opener, is_devtools_popup,
CefRefPtr<CefBrowserHostImpl> browser = CreateInternal(
create_params.settings, create_params.client, web_contents.release(),
true, info, create_params.devtools_opener, is_devtools_popup,
create_params.request_context, std::move(platform_delegate),
cef_extension);
if (!browser)
......@@ -366,7 +366,7 @@ CefRefPtr<CefBrowserHostImpl> CefBrowserHostImpl::Create(
if (create_params.extension) {
browser->CreateExtensionHost(create_params.extension, browser_context,
web_contents, create_params.url,
browser->web_contents(), create_params.url,
create_params.extension_host_type);
} else if (!create_params.url.is_empty()) {
browser->LoadURL(CefFrameHostImpl::kMainFrameId, create_params.url.spec(),
......@@ -382,6 +382,7 @@ CefRefPtr<CefBrowserHostImpl> CefBrowserHostImpl::CreateInternal(
const CefBrowserSettings& settings,
CefRefPtr<CefClient> client,
content::WebContents* web_contents,
bool own_web_contents,
scoped_refptr<CefBrowserInfo> browser_info,
CefRefPtr<CefBrowserHostImpl> opener,
bool is_devtools_popup,
......@@ -415,6 +416,8 @@ CefRefPtr<CefBrowserHostImpl> CefBrowserHostImpl::CreateInternal(
CefRefPtr<CefBrowserHostImpl> browser = new CefBrowserHostImpl(
settings, client, web_contents, browser_info, opener, request_context,
std::move(platform_delegate), extension);
if (own_web_contents)
browser->set_owned_web_contents(web_contents);
if (!browser->CreateHostWindow())
return nullptr;
......@@ -819,7 +822,7 @@ void CefBrowserHostImpl::Find(int identifier,
bool matchCase,
bool findNext) {
if (CEF_CURRENTLY_ON_UIT()) {
if (!web_contents_)
if (!web_contents())
return;
// Every find request must have a unique ID and these IDs must strictly
......@@ -844,7 +847,7 @@ void CefBrowserHostImpl::Find(int identifier,
void CefBrowserHostImpl::StopFinding(bool clearSelection) {
if (CEF_CURRENTLY_ON_UIT()) {
if (!web_contents_)
if (!web_contents())
return;
content::StopFindAction action =
......@@ -862,7 +865,7 @@ void CefBrowserHostImpl::ShowDevTools(const CefWindowInfo& windowInfo,
const CefBrowserSettings& settings,
const CefPoint& inspect_element_at) {
if (CEF_CURRENTLY_ON_UIT()) {
if (!web_contents_)
if (!web_contents())
return;
if (devtools_frontend_) {
......@@ -1281,8 +1284,8 @@ void CefBrowserHostImpl::GoBack() {
return;
}
if (web_contents_.get() && web_contents_->GetController().CanGoBack())
web_contents_->GetController().GoBack();
if (web_contents() && web_contents()->GetController().CanGoBack())
web_contents()->GetController().GoBack();
} else {
CEF_POST_TASK(CEF_UIT, base::Bind(&CefBrowserHostImpl::GoBack, this));
}
......@@ -1301,8 +1304,8 @@ void CefBrowserHostImpl::GoForward() {
return;
}
if (web_contents_.get() && web_contents_->GetController().CanGoForward())
web_contents_->GetController().GoForward();
if (web_contents() && web_contents()->GetController().CanGoForward())
web_contents()->GetController().GoForward();
} else {
CEF_POST_TASK(CEF_UIT, base::Bind(&CefBrowserHostImpl::GoForward, this));
}
......@@ -1321,8 +1324,8 @@ void CefBrowserHostImpl::Reload() {
return;
}
if (web_contents_.get())
web_contents_->GetController().Reload(content::ReloadType::NORMAL, true);
if (web_contents())
web_contents()->GetController().Reload(content::ReloadType::NORMAL, true);
} else {
CEF_POST_TASK(CEF_UIT, base::Bind(&CefBrowserHostImpl::Reload, this));
}
......@@ -1337,8 +1340,8 @@ void CefBrowserHostImpl::ReloadIgnoreCache() {
return;
}
if (web_contents_.get()) {
web_contents_->GetController().Reload(
if (web_contents()) {
web_contents()->GetController().Reload(
content::ReloadType::BYPASSING_CACHE, true);
}
} else {
......@@ -1355,8 +1358,8 @@ void CefBrowserHostImpl::StopLoad() {
return;
}
if (web_contents_.get())
web_contents_->Stop();
if (web_contents())
web_contents()->Stop();
} else {
CEF_POST_TASK(CEF_UIT, base::Bind(&CefBrowserHostImpl::StopLoad, this));
}
......@@ -1544,7 +1547,8 @@ void CefBrowserHostImpl::DestroyBrowser() {
registrar_.reset(NULL);
response_manager_.reset(NULL);
content::WebContentsObserver::Observe(NULL);
web_contents_.reset(NULL);
if (owned_web_contents_)
owned_web_contents_.reset(NULL);
// Delete objects created by the platform delegate that may be referenced by
// the WebContents.
......@@ -1654,7 +1658,7 @@ void CefBrowserHostImpl::LoadURL(int64 frame_id,
return;
}
if (web_contents_.get()) {
if (web_contents()) {
GURL gurl = GURL(url);
if (!gurl.is_valid() && !gurl.has_scheme()) {
......@@ -1669,8 +1673,8 @@ void CefBrowserHostImpl::LoadURL(int64 frame_id,
return;
}
web_contents_->GetController().LoadURL(gurl, referrer, transition,
extra_headers);
web_contents()->GetController().LoadURL(gurl, referrer, transition,
extra_headers);
OnSetFocus(FOCUS_SOURCE_NAVIGATION);
}
} else {
......@@ -1853,8 +1857,8 @@ int CefBrowserHostImpl::browser_id() const {
content::BrowserContext* CefBrowserHostImpl::GetBrowserContext() {
CEF_REQUIRE_UIT();
if (web_contents_)
return web_contents_->GetBrowserContext();
if (web_contents())
return web_contents()->GetBrowserContext();
return nullptr;
}
......@@ -2181,15 +2185,25 @@ bool CefBrowserHostImpl::ShouldTransferNavigation(
return true;
}
void CefBrowserHostImpl::AddNewContents(content::WebContents* source,
content::WebContents* new_contents,
WindowOpenDisposition disposition,
const gfx::Rect& initial_rect,
bool user_gesture,
bool* was_blocked) {
void CefBrowserHostImpl::AddNewContents(
content::WebContents* source,
std::unique_ptr<content::WebContents> new_contents,
WindowOpenDisposition disposition,
const gfx::Rect& initial_rect,
bool user_gesture,
bool* was_blocked) {
CefRefPtr<CefBrowserHostImpl> owner =
GetBrowserForContents(new_contents.get());
if (owner) {
// Taking ownership of |new_contents|.
owner->set_owned_web_contents(new_contents.release());
return;
}
if (extension_host_) {
extension_host_->AddNewContents(source, new_contents, disposition,
initial_rect, user_gesture, was_blocked);
extension_host_->AddNewContents(source, std::move(new_contents),
disposition, initial_rect, user_gesture,
was_blocked);
}
}
......@@ -2469,10 +2483,12 @@ void CefBrowserHostImpl::WebContentsCreated(
static_cast<CefBrowserContext*>(new_contents->GetBrowserContext());
DCHECK(browser_context);
CefRefPtr<CefBrowserHostImpl> browser = CefBrowserHostImpl::CreateInternal(
settings, client, new_contents, info, opener, false,
browser_context->GetCefRequestContext(), std::move(platform_delegate),
nullptr);
// We don't officially own |new_contents| until AddNewContents() is called.
// However, we need to install observers/delegates here.
CefRefPtr<CefBrowserHostImpl> browser =
CreateInternal(settings, client, new_contents, false, info, opener, false,
browser_context->GetCefRequestContext(),
std::move(platform_delegate), nullptr);
}
void CefBrowserHostImpl::DidNavigateMainFramePostCommit(
......@@ -3117,7 +3133,6 @@ CefBrowserHostImpl::CefBrowserHostImpl(
DCHECK(!browser_info_->browser().get());
browser_info_->set_browser(this);
web_contents_.reset(web_contents);
web_contents->SetDelegate(this);
// Associate the WebContents with this browser object.
......@@ -3136,15 +3151,15 @@ CefBrowserHostImpl::CefBrowserHostImpl(
response_manager_.reset(new CefResponseManager);
PrefsTabHelper::CreateForWebContents(web_contents_.get());
printing::CefPrintViewManager::CreateForWebContents(web_contents_.get());
PrefsTabHelper::CreateForWebContents(web_contents);
printing::CefPrintViewManager::CreateForWebContents(web_contents);
if (extensions::ExtensionsEnabled()) {
extensions::CefExtensionWebContentsObserver::CreateForWebContents(
web_contents_.get());
web_contents);
// Used by the tabs extension API.
zoom::ZoomController::CreateForWebContents(web_contents_.get());
zoom::ZoomController::CreateForWebContents(web_contents);
}
// Make sure RenderViewCreated is called at least one time.
......@@ -3154,6 +3169,15 @@ CefBrowserHostImpl::CefBrowserHostImpl(
platform_delegate_->BrowserCreated(this);
}
void CefBrowserHostImpl::set_owned_web_contents(
content::WebContents* owned_contents) {
// Should not currently own a WebContents.
CHECK(!owned_web_contents_);
// Should already be associated with |owned_contents|.
CHECK(web_contents() == owned_contents);
owned_web_contents_.reset(owned_contents);
}
bool CefBrowserHostImpl::CreateHostWindow() {
// |host_window_handle_| will not change after initial host creation for
// non-views-hosted browsers.
......
......@@ -400,7 +400,7 @@ class CefBrowserHostImpl : public CefBrowserHost,
const content::OpenURLParams& params) override;
bool ShouldTransferNavigation(bool is_main_frame_navigation) override;
void AddNewContents(content::WebContents* source,
content::WebContents* new_contents,
std::unique_ptr<content::WebContents> new_contents,
WindowOpenDisposition disposition,
const gfx::Rect& initial_rect,
bool user_gesture,
......@@ -527,6 +527,7 @@ class CefBrowserHostImpl : public CefBrowserHost,
const CefBrowserSettings& settings,
CefRefPtr<CefClient> client,
content::WebContents* web_contents,
bool own_web_contents,
scoped_refptr<CefBrowserInfo> browser_info,
CefRefPtr<CefBrowserHostImpl> opener,
bool is_devtools_popup,
......@@ -564,6 +565,8 @@ class CefBrowserHostImpl : public CefBrowserHost,
std::unique_ptr<CefBrowserPlatformDelegate> platform_delegate,
CefRefPtr<CefExtension> extension);
void set_owned_web_contents(content::WebContents* owned_contents);
// Give the platform delegate an opportunity to create the host window.
bool CreateHostWindow();
......@@ -635,7 +638,6 @@ class CefBrowserHostImpl : public CefBrowserHost,
CefBrowserSettings settings_;
CefRefPtr<CefClient> client_;
std::unique_ptr<content::WebContents> web_contents_;
scoped_refptr<CefBrowserInfo> browser_info_;
CefWindowHandle opener_;
CefRefPtr<CefRequestContext> request_context_;
......@@ -644,6 +646,12 @@ class CefBrowserHostImpl : public CefBrowserHost,
const bool is_views_hosted_;
CefWindowHandle host_window_handle_;
// Non-nullptr if this object owns the WebContents. Will be nullptr for popup
// browsers between the calls to WebContentsCreated() and AddNewContents(),
// and may never be set if the parent browser is destroyed during popup
// creation.
std::unique_ptr<content::WebContents> owned_web_contents_;
// Volatile state information. All access must be protected by the state lock.
base::Lock state_lock_;
bool is_loading_;
......
......@@ -30,10 +30,10 @@
#include "chrome/browser/chrome_browser_main_extra_parts.h"
#include "chrome/browser/plugins/plugin_finder.h"
#include "content/public/browser/gpu_data_manager.h"
#include "content/public/common/result_codes.h"
#include "extensions/browser/extension_system.h"
#include "extensions/common/constants.h"
#include "net/base/net_module.h"
#include "services/service_manager/embedder/result_codes.h"
#include "ui/base/resource/resource_bundle.h"
#if defined(USE_AURA)
......@@ -80,7 +80,7 @@ int CefBrowserMainParts::PreEarlyInitialization() {
for (size_t i = 0; i < chrome_extra_parts_.size(); ++i)
chrome_extra_parts_[i]->PreEarlyInitialization();
return content::RESULT_CODE_NORMAL_EXIT;
return service_manager::RESULT_CODE_NORMAL_EXIT;
}
void CefBrowserMainParts::PostEarlyInitialization() {
......
......@@ -86,6 +86,7 @@
#include "extensions/common/switches.h"
#include "net/ssl/ssl_cert_request_info.h"
#include "ppapi/host/ppapi_host.h"
#include "services/service_manager/embedder/switches.h"
#include "services/service_manager/public/mojom/connector.mojom.h"
#include "services/service_manager/sandbox/switches.h"
#include "storage/browser/quota/quota_settings.h"
......@@ -720,7 +721,7 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
}
#if defined(OS_LINUX)
if (process_type == switches::kZygoteProcess) {
if (process_type == service_manager::switches::kZygoteProcess) {
// Propagate the following switches to the zygote command line (along with
// any associated values) if present in the browser command line.
static const char* const kSwitchNames[] = {
......@@ -982,7 +983,7 @@ void CefContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
content::PosixFileDescriptorInfo* mappings) {
int crash_signal_fd = GetCrashSignalFD(command_line);
if (crash_signal_fd >= 0) {
mappings->Share(kCrashDumpSignal, crash_signal_fd);
mappings->Share(service_manager::kCrashDumpSignal, crash_signal_fd);
}
}
#endif // defined(OS_LINUX)
......
......@@ -7,6 +7,7 @@
#include "libcef/browser/extensions/extensions_browser_client.h"
#include "base/logging.h"
#include "content/public/browser/web_contents.h"
namespace extensions {
......@@ -28,11 +29,12 @@ CefExtensionHostDelegate::GetJavaScriptDialogManager() {
return NULL;
}
void CefExtensionHostDelegate::CreateTab(content::WebContents* web_contents,
const std::string& extension_id,
WindowOpenDisposition disposition,
const gfx::Rect& initial_rect,
bool user_gesture) {
void CefExtensionHostDelegate::CreateTab(
std::unique_ptr<content::WebContents> web_contents,
const std::string& extension_id,
WindowOpenDisposition disposition,
const gfx::Rect& initial_rect,
bool user_gesture) {
// TODO(cef): Add support for extensions opening popup windows.
NOTIMPLEMENTED();
}
......
......@@ -21,7 +21,7 @@ class CefExtensionHostDelegate : public ExtensionHostDelegate {
void OnExtensionHostCreated(content::WebContents* web_contents) override;
void OnRenderViewCreatedForBackgroundPage(ExtensionHost* host) override;
content::JavaScriptDialogManager* GetJavaScriptDialogManager() override;
void CreateTab(content::WebContents* web_contents,
void CreateTab(std::unique_ptr<content::WebContents> web_contents,
const std::string& extension_id,
WindowOpenDisposition disposition,
const gfx::Rect& initial_rect,
......
......@@ -9,6 +9,7 @@
#include "base/compiler_specific.h"
#import "base/mac/scoped_sending_event.h"
#include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_current.h"
#import "ui/base/cocoa/menu_controller.h"
#include "ui/gfx/geometry/point.h"
......@@ -33,8 +34,7 @@ bool CefMenuRunnerMac::RunContextMenu(
menu_controller_);
// Make sure events can be pumped while the menu is up.
base::MessageLoop::ScopedNestableTaskAllower allow(
base::MessageLoop::current());
base::MessageLoopCurrent::ScopedNestableTaskAllower allow;
// One of the events that could be pumped is |window.close()|.
// User-initiated event-tracking loops protect against this by
......
......@@ -8,6 +8,7 @@
#include "libcef/browser/native/menu_2.h"
#include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_current.h"
#include "ui/gfx/geometry/point.h"
CefMenuRunnerWin::CefMenuRunnerWin() {}
......@@ -21,8 +22,7 @@ bool CefMenuRunnerWin::RunContextMenu(
menu_->Rebuild(NULL);
// Make sure events can be pumped while the menu is up.
base::MessageLoop::ScopedNestableTaskAllower allow(
base::MessageLoop::current());
base::MessageLoopCurrent::ScopedNestableTaskAllower allow;
const gfx::Point& screen_point =
browser->GetScreenPoint(gfx::Point(params.x, params.y));
......
......@@ -13,6 +13,7 @@
#include "libcef/browser/osr/web_contents_view_osr.h"
#include "libcef/common/drag_data_impl.h"
#include "base/message_loop/message_loop_current.h"
#include "content/browser/renderer_host/render_widget_host_input_event_router.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/render_view_host.h"
......@@ -455,8 +456,7 @@ void CefBrowserPlatformDelegateOsr::StartDragging(
CefRefPtr<CefDragDataImpl> drag_data(
new CefDragDataImpl(drop_data, cef_image, cef_image_pos));
drag_data->SetReadOnly(true);
base::MessageLoop::ScopedNestableTaskAllower allow(
base::MessageLoop::current());
base::MessageLoopCurrent::ScopedNestableTaskAllower allow;
handled = handler->StartDragging(
browser_, drag_data.get(),
static_cast<CefRenderHandler::DragOperationsMask>(allowed_ops),
......
......@@ -61,13 +61,6 @@ class MacHelper : public content::BrowserCompositorMacClient,
return nil;
}
void AcceleratedWidgetGetVSyncParameters(
base::TimeTicks* timebase,
base::TimeDelta* interval) const override {
*timebase = base::TimeTicks();
*interval = base::TimeDelta();
}
void AcceleratedWidgetSwapCompleted() override {}
void DidReceiveFirstFrameAfterNavigation() override {
......
......@@ -13,6 +13,7 @@
#include "base/memory/ref_counted_memory.h"
#include "base/memory/shared_memory.h"
#include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_current.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/utf_string_conversions.h"
......@@ -485,8 +486,7 @@ bool CefPrintViewManagerBase::RunInnerMessageLoop() {
// Need to enable recursive task.
{
base::MessageLoop::ScopedNestableTaskAllower allow(
base::MessageLoop::current());
base::MessageLoopCurrent::ScopedNestableTaskAllower allow;
run_loop.Run();
}
......
......@@ -18,6 +18,7 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "components/crash/core/common/crash_key.h"
#include "services/service_manager/embedder/switches.h"
#include "third_party/crashpad/crashpad/client/annotation.h"
#if defined(OS_MACOSX)
......@@ -623,7 +624,7 @@ bool CefCrashReporterClient::EnableBreakpadForProcess(
const std::string& process_type) {
return process_type == switches::kRendererProcess ||
process_type == switches::kPpapiPluginProcess ||
process_type == switches::kZygoteProcess ||
process_type == service_manager::switches::kZygoteProcess ||
process_type == switches::kGpuProcess;
}
......
......@@ -16,6 +16,7 @@
#include "components/crash/core/common/crash_key.h"
#include "components/crash/core/common/crash_keys.h"
#include "content/public/common/content_switches.h"
#include "services/service_manager/embedder/switches.h"
#if defined(OS_MACOSX)
#include "base/mac/foundation_util.h"
......@@ -130,7 +131,7 @@ void InitCrashReporter(const base::CommandLine& command_line,
#else // !defined(OS_MACOSX)
breakpad::SetCrashServerURL(crash_client->GetCrashServerURL());
if (process_type != switches::kZygoteProcess) {
if (process_type != service_manager::switches::kZygoteProcess) {
// Crash reporting for subprocesses created using the zygote will be
// initialized in ZygoteForked.
breakpad::InitCrashReporter(process_type);
......
......@@ -25,6 +25,7 @@
#include "content/public/common/content_switches.h"
#include "media/cdm/cdm_host_file.h"
#include "media/cdm/supported_cdm_versions.h"
#include "services/service_manager/embedder/switches.h"
#include "services/service_manager/sandbox/switches.h"
namespace {
......@@ -355,7 +356,7 @@ void CefWidevineLoader::AddContentDecryptionModules(
// errors during plugin loading. This is because the Zygote process must pre-
// load all plugins before initializing the sandbox.
if (command_line.GetSwitchValueASCII(switches::kProcessType) !=
switches::kZygoteProcess ||
service_manager::switches::kZygoteProcess ||
command_line.HasSwitch(service_manager::switches::kNoSandbox)) {
return;
}
......
......@@ -17,10 +17,10 @@ index 6ad9f5fb334d..d7bf762314a4 100644
void DidCreateNewRendererCompositorFrameSink(
viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink);
diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm
index 13a7da672959..28b0ab2d0e1a 100644
index f8d3575e06dc..688aa7e5b117 100644
--- content/browser/renderer_host/browser_compositor_view_mac.mm
+++ content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -208,6 +208,12 @@ BrowserCompositorMac::~BrowserCompositorMac() {
@@ -206,6 +206,12 @@ BrowserCompositorMac::~BrowserCompositorMac() {
g_spare_recyclable_compositors.Get().clear();
}
......@@ -34,7 +34,7 @@ index 13a7da672959..28b0ab2d0e1a 100644
if (recyclable_compositor_) {
return recyclable_compositor_->accelerated_widget_mac()
diff --git ui/accelerated_widget_mac/accelerated_widget_mac.mm ui/accelerated_widget_mac/accelerated_widget_mac.mm
index 97e7b502f15d..44811edbda4c 100644
index 0de89795c461..3d46421491a9 100644
--- ui/accelerated_widget_mac/accelerated_widget_mac.mm
+++ ui/accelerated_widget_mac/accelerated_widget_mac.mm
@@ -71,6 +71,10 @@ void AcceleratedWidgetMac::SetNSView(AcceleratedWidgetMacNSView* view) {
......
diff --git content/browser/browser_plugin/browser_plugin_guest.cc content/browser/browser_plugin/browser_plugin_guest.cc
index 6508c1e0dacf..0241d11f664d 100644
index ab0b50b62aac..d17bc04e53bf 100644
--- content/browser/browser_plugin/browser_plugin_guest.cc
+++ content/browser/browser_plugin/browser_plugin_guest.cc
@@ -315,8 +315,11 @@ void BrowserPluginGuest::InitInternal(
......@@ -221,10 +221,10 @@ index 968c5157ab41..22aad9fbafa4 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 8a69fdb183bc..7fb05f4a755e 100644
index 8cd612e1f03a..5cf012b31bda 100644
--- content/browser/web_contents/web_contents_view_mac.mm
+++ content/browser/web_contents/web_contents_view_mac.mm
@@ -345,7 +345,8 @@ void WebContentsViewMac::CreateView(
@@ -348,7 +348,8 @@ void WebContentsViewMac::CreateView(
}
RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget(
......@@ -234,7 +234,7 @@ index 8a69fdb183bc..7fb05f4a755e 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
@@ -357,6 +358,7 @@ RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget(
@@ -360,6 +361,7 @@ RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget(
render_widget_host->GetView());
}
......@@ -266,19 +266,19 @@ index d05dd5421458..fa13775f0512 100644
// a BrowserPlugin even when we are using cross process frames for guests. It
// should be removed after resolving https://crbug.com/642826).
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
index 6861814915c2..766090cd3b06 100644
index 54c9b6320d9c..d474ead5f147 100644
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
@@ -192,6 +192,8 @@ void MimeHandlerViewGuest::CreateWebContents(
@@ -193,6 +193,8 @@ void MimeHandlerViewGuest::CreateWebContents(
WebContents::CreateParams params(browser_context(),
guest_site_instance.get());
params.guest_delegate = this;
+ if (delegate_)
+ delegate_->OverrideWebContentsCreateParams(&params);
callback.Run(WebContents::Create(params));
registry_.AddInterface(
@@ -225,6 +227,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const {
// TODO(erikchen): Fix ownership semantics for guest views.
// https://crbug.com/832879.
auto* web_contents = WebContents::Create(params).release();
@@ -230,6 +232,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const {
return true;
}
......
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn