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 fdd7de3a64ae9bd9ef274e2a9b9ef3de50bf668a..2b95411068d14966222966c97f38239830919beb 100644 |
--- a/content/renderer/pepper/plugin_instance_throttler_impl.cc |
+++ b/content/renderer/pepper/plugin_instance_throttler_impl.cc |
@@ -9,7 +9,6 @@ |
#include "content/public/common/content_constants.h" |
#include "content/public/renderer/render_thread.h" |
#include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
-#include "content/renderer/peripheral_content_heuristic.h" |
#include "content/renderer/render_frame_impl.h" |
#include "ppapi/shared_impl/ppapi_constants.h" |
#include "third_party/WebKit/public/platform/WebRect.h" |
@@ -53,11 +52,6 @@ void PluginInstanceThrottler::RecordUnthrottleMethodMetric( |
PluginInstanceThrottler::UNTHROTTLE_METHOD_NUM_ITEMS); |
} |
-// static |
-bool PluginInstanceThrottler::IsLargeContent(int width, int height) { |
- return PeripheralContentHeuristic::IsLargeContent(width, height); |
-} |
- |
PluginInstanceThrottlerImpl::PluginInstanceThrottlerImpl() |
: state_(THROTTLER_STATE_AWAITING_KEYFRAME), |
is_hidden_for_placeholder_(false), |
@@ -145,10 +139,9 @@ void PluginInstanceThrottlerImpl::Initialize( |
// |frame| may be nullptr in tests. |
if (frame) { |
- PluginPowerSaverHelper* helper = frame->plugin_power_saver_helper(); |
bool cross_origin_main_content = false; |
float zoom_factor = GetWebPlugin()->container()->pageZoomFactor(); |
- if (!helper->ShouldThrottleContent( |
+ if (!frame->ShouldThrottleContent( |
frame->GetWebFrame()->top()->securityOrigin(), content_origin, |
plugin_module_name, roundf(unobscured_size.width() / zoom_factor), |
roundf(unobscured_size.height() / zoom_factor), |
@@ -158,14 +151,14 @@ void PluginInstanceThrottlerImpl::Initialize( |
FOR_EACH_OBSERVER(Observer, observer_list_, OnPeripheralStateChange()); |
if (cross_origin_main_content) |
- helper->WhitelistContentOrigin(content_origin); |
+ frame->WhitelistContentOrigin(content_origin); |
return; |
} |
// To collect UMAs, register peripheral content even if power saver mode |
// is disabled. |
- helper->RegisterPeripheralPlugin( |
+ frame->RegisterPeripheralPlugin( |
content_origin, |
base::Bind(&PluginInstanceThrottlerImpl::MarkPluginEssential, |
weak_factory_.GetWeakPtr(), UNTHROTTLE_METHOD_BY_WHITELIST)); |