| Index: components/plugins/renderer/loadable_plugin_placeholder.cc
|
| diff --git a/components/plugins/renderer/loadable_plugin_placeholder.cc b/components/plugins/renderer/loadable_plugin_placeholder.cc
|
| index 3719130a70f189e57fe16ef983c59acd1ee6a9e7..b0febbdbce67c0cbd3a2d8b16f28126957a2882d 100644
|
| --- a/components/plugins/renderer/loadable_plugin_placeholder.cc
|
| +++ b/components/plugins/renderer/loadable_plugin_placeholder.cc
|
| @@ -101,6 +101,7 @@ void LoadablePluginPlaceholder::MarkPluginEssential(
|
| return;
|
|
|
| plugin_marked_essential_ = true;
|
| + power_saver_enabled_ = false;
|
| if (premade_throttler_)
|
| premade_throttler_->MarkPluginEssential(method);
|
| else
|
| @@ -292,20 +293,7 @@ void LoadablePluginPlaceholder::LoadPlugin() {
|
| ReplacePlugin(premade_throttler_->GetWebPlugin());
|
| premade_throttler_ = nullptr;
|
| } else {
|
| - // TODO(mmenke): In the case of prerendering, feed into
|
| - // ChromeContentRendererClient::CreatePlugin instead, to
|
| - // reduce the chance of future regressions.
|
| - scoped_ptr<PluginInstanceThrottler> throttler;
|
| -#if defined(ENABLE_PLUGINS)
|
| - // If the plugin has already been marked essential in its placeholder form,
|
| - // we shouldn't create a new throttler and start the process all over again.
|
| - if (!plugin_marked_essential_ && power_saver_enabled_)
|
| - throttler = PluginInstanceThrottler::Create();
|
| -#endif
|
| - WebPlugin* plugin = render_frame()->CreatePlugin(
|
| - GetFrame(), plugin_info_, GetPluginParams(), throttler.Pass());
|
| -
|
| - ReplacePlugin(plugin);
|
| + ReplacePlugin(CreatePlugin());
|
| }
|
| }
|
|
|
| @@ -348,6 +336,10 @@ void LoadablePluginPlaceholder::SetIdentifier(const std::string& identifier) {
|
| identifier_ = identifier;
|
| }
|
|
|
| +const std::string& LoadablePluginPlaceholder::GetIdentifier() const {
|
| + return identifier_;
|
| +}
|
| +
|
| bool LoadablePluginPlaceholder::LoadingBlocked() const {
|
| DCHECK(allow_loading_);
|
| return is_blocked_for_background_tab_ || is_blocked_for_power_saver_poster_ ||
|
|
|