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

Unified Diff: content/renderer/pepper/plugin_power_saver_helper.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: content/renderer/pepper/plugin_power_saver_helper.h
diff --git a/content/renderer/pepper/plugin_power_saver_helper.h b/content/renderer/pepper/plugin_power_saver_helper.h
index b962993525c9f2b180557aec68877e35a9200071..1b97006211400b3ff6cf00ad6364dbea9087e442 100644
--- a/content/renderer/pepper/plugin_power_saver_helper.h
+++ b/content/renderer/pepper/plugin_power_saver_helper.h
@@ -10,6 +10,7 @@
#include "base/callback.h"
#include "content/common/content_export.h"
+#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_frame_observer.h"
#include "url/origin.h"
@@ -18,6 +19,10 @@ struct WebPluginParams;
struct WebRect;
}
+namespace gfx {
+class Size;
+}
+
namespace content {
class CONTENT_EXPORT PluginPowerSaverHelper : public RenderFrameObserver {
@@ -40,11 +45,10 @@ class CONTENT_EXPORT PluginPowerSaverHelper : public RenderFrameObserver {
// See RenderFrame for documentation.
void RegisterPeripheralPlugin(const url::Origin& content_origin,
const base::Closure& unthrottle_callback);
- bool ShouldThrottleContent(const url::Origin& main_frame_origin,
- const url::Origin& content_origin,
- int width,
- int height,
- bool* cross_origin_main_content) const;
+ RenderFrame::PeripheralContentStatus GetPeripheralContentStatus(
+ const url::Origin& main_frame_origin,
+ const url::Origin& content_origin,
+ const gfx::Size& unobscured_size) const;
void WhitelistContentOrigin(const url::Origin& content_origin);
// RenderFrameObserver implementation.
« no previous file with comments | « content/renderer/pepper/plugin_instance_throttler_impl.cc ('k') | content/renderer/pepper/plugin_power_saver_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698