Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1891)

Unified Diff: chrome/renderer/plugins/chrome_plugin_placeholder.cc

Issue 866173002: Plugin Power Saver: Add UI Overlay to throttled plugin using placeholder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address bauerb and groby comments Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/plugins/chrome_plugin_placeholder.cc
diff --git a/chrome/renderer/plugins/chrome_plugin_placeholder.cc b/chrome/renderer/plugins/chrome_plugin_placeholder.cc
index 7be06986d65254978cda28c61c026457d13787b6..af7a8811cfa52e67a64580e75532ed4da96834b8 100644
--- a/chrome/renderer/plugins/chrome_plugin_placeholder.cc
+++ b/chrome/renderer/plugins/chrome_plugin_placeholder.cc
@@ -148,12 +148,14 @@ ChromePluginPlaceholder* ChromePluginPlaceholder::CreateBlockedPlugin(
content::RenderFrame* render_frame,
WebLocalFrame* frame,
const WebPluginParams& params,
- const content::WebPluginInfo& plugin,
+ const content::WebPluginInfo& info,
const std::string& identifier,
const base::string16& name,
int template_id,
const base::string16& message,
- const GURL& poster_url) {
+ const GURL& poster_url,
+ blink::WebPlugin* premade_plugin,
+ content::PluginInstanceThrottler* premade_throttler) {
base::DictionaryValue values;
values.SetString("message", message);
values.SetString("name", name);
@@ -177,7 +179,9 @@ ChromePluginPlaceholder* ChromePluginPlaceholder::CreateBlockedPlugin(
if (poster_url.is_valid())
blocked_plugin->BlockForPowerSaverPoster();
#endif
- blocked_plugin->SetPluginInfo(plugin);
+ if (premade_plugin && premade_throttler)
+ blocked_plugin->SetPremadePlugin(premade_plugin, premade_throttler);
+ blocked_plugin->SetPluginInfo(info);
blocked_plugin->SetIdentifier(identifier);
return blocked_plugin;
}

Powered by Google App Engine
This is Rietveld 408576698