Update to Chromium revision 2b3ae3b8 (#394939)

This commit is contained in:
Marshall Greenblatt
2016-05-24 19:35:43 -04:00
parent 582ce074aa
commit ab2636b012
125 changed files with 619 additions and 626 deletions

View File

@ -59,7 +59,8 @@ CefPluginPlaceholder::CefPluginPlaceholder(
status_(CefViewHostMsg_GetPluginInfo_Status::kAllowed),
title_(title),
has_host_(false),
context_menu_request_id_(0) {
context_menu_request_id_(0),
ignore_updates_(false) {
RenderThread::Get()->AddObserver(this);
}
@ -285,6 +286,31 @@ blink::WebPlugin* CefPluginPlaceholder::CreatePlugin() {
GetPluginParams(), std::move(throttler));
}
void CefPluginPlaceholder::OnLoadedRectUpdate(
const gfx::Rect& unobscured_rect,
content::RenderFrame::PeripheralContentStatus status) {
// If the placeholder is in the blocked state, do nothing.
if (ignore_updates_)
return;
// This should only be called once.
set_delayed(false);
// block tiny cross-origin - simply by not continuing the load chain.
if (status ==
content::RenderFrame::CONTENT_STATUS_ESSENTIAL_CROSS_ORIGIN_TINY) {
ignore_updates_ = true;
return;
}
// For essential content, powersaver can be turned off.
if (status != content::RenderFrame::CONTENT_STATUS_PERIPHERAL)
set_power_saver_enabled(false);
AllowLoading();
LoadPlugin();
}
gin::ObjectTemplateBuilder CefPluginPlaceholder::GetObjectTemplateBuilder(
v8::Isolate* isolate) {
gin::ObjectTemplateBuilder builder =