| Index: content/renderer/pepper/plugin_instance_throttler_impl.cc
|
| diff --git a/content/renderer/pepper/plugin_instance_throttler_impl.cc b/content/renderer/pepper/plugin_instance_throttler_impl.cc
|
| index 5a153b79b095503b2c05873c489bcaad1a5fcc3d..22bfec87c01a169bd070ab9f36feb7e1246c2572 100644
|
| --- a/content/renderer/pepper/plugin_instance_throttler_impl.cc
|
| +++ b/content/renderer/pepper/plugin_instance_throttler_impl.cc
|
| @@ -139,17 +139,18 @@
|
|
|
| // |frame| may be nullptr in tests.
|
| if (frame) {
|
| + bool cross_origin_main_content = false;
|
| float zoom_factor = GetWebPlugin()->container()->pageZoomFactor();
|
| - auto status = frame->GetPeripheralContentStatus(
|
| - frame->GetWebFrame()->top()->securityOrigin(), content_origin,
|
| - gfx::Size(roundf(unobscured_size.width() / zoom_factor),
|
| - roundf(unobscured_size.height() / zoom_factor)));
|
| - if (status != RenderFrame::CONTENT_STATUS_PERIPHERAL) {
|
| + if (!frame->ShouldThrottleContent(
|
| + frame->GetWebFrame()->top()->securityOrigin(), content_origin,
|
| + roundf(unobscured_size.width() / zoom_factor),
|
| + roundf(unobscured_size.height() / zoom_factor),
|
| + &cross_origin_main_content)) {
|
| DCHECK_NE(THROTTLER_STATE_MARKED_ESSENTIAL, state_);
|
| state_ = THROTTLER_STATE_MARKED_ESSENTIAL;
|
| FOR_EACH_OBSERVER(Observer, observer_list_, OnPeripheralStateChange());
|
|
|
| - if (status == RenderFrame::CONTENT_STATUS_ESSENTIAL_CROSS_ORIGIN_BIG)
|
| + if (cross_origin_main_content)
|
| frame->WhitelistContentOrigin(content_origin);
|
|
|
| return;
|
|
|