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

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

Issue 1497623002: Plugin Power Saver: Improve Poster behavior for essential plugins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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.h
diff --git a/chrome/renderer/plugins/chrome_plugin_placeholder.h b/chrome/renderer/plugins/chrome_plugin_placeholder.h
index 85d49b7f3fb923f28b15f8415d052c07df67f945..236a607460f13c01624e23c15c50c3ea0447229d 100644
--- a/chrome/renderer/plugins/chrome_plugin_placeholder.h
+++ b/chrome/renderer/plugins/chrome_plugin_placeholder.h
@@ -15,9 +15,17 @@ class Size;
enum class ChromeViewHostMsg_GetPluginInfo_Status;
-// This contains information specifying the poster image of plugin placeholders.
-// The default constructor specifies no poster image.
-struct PlaceholderPosterInfo {
+// This contains information specifying the plugin's Power Saver behavior.
+// The default constructor has Plugin Power Saver disabled.
+struct PowerSaverInfo {
+ PowerSaverInfo();
+
+ // Whether power saver should be enabled.
+ bool power_saver_enabled;
+
+ // Whether the plugin should be deferred because it is in a background tab.
+ bool blocked_for_background_tab;
+
// The poster image specified in image 'srcset' attribute format.
std::string poster_attribute;
@@ -45,7 +53,7 @@ class ChromePluginPlaceholder final
const base::string16& name,
int resource_id,
const base::string16& message,
- const PlaceholderPosterInfo& poster_info);
+ const PowerSaverInfo& power_saver_info);
// Creates a new WebViewPlugin with a MissingPlugin as a delegate.
static ChromePluginPlaceholder* CreateLoadableMissingPlugin(

Powered by Google App Engine
This is Rietveld 408576698