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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 680193002: Plugin Power Saver: Implement size-based heuristic for peripheral content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change mechanism to look at top level navigation instead of renderframe lifecycle Created 6 years, 2 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: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 63ab694e12698d2fc7483b90c10e6358d8559c8a..d5d7858184cffc6239adda5c712c7ae264932201 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -134,6 +134,7 @@
#include "content/renderer/pepper/pepper_plugin_instance_impl.h"
#include "content/renderer/pepper/pepper_webplugin_impl.h"
#include "content/renderer/pepper/plugin_module.h"
+#include "content/renderer/pepper/plugin_power_saver_helper.h"
#endif
#if defined(ENABLE_WEBRTC)
@@ -546,6 +547,9 @@ RenderFrameImpl::RenderFrameImpl(RenderViewImpl* render_view, int routing_id)
is_swapped_out_(false),
render_frame_proxy_(NULL),
is_detaching_(false),
+#if defined(ENABLE_PLUGINS)
+ plugin_power_saver_helper_(NULL),
+#endif
cookie_jar_(this),
selection_text_offset_(0),
selection_range_(gfx::Range::InvalidRange()),
@@ -582,6 +586,10 @@ RenderFrameImpl::RenderFrameImpl(RenderViewImpl* render_view, int routing_id)
new GinJavaBridgeDispatcher(this);
#endif
+#if defined(ENABLE_PLUGINS)
+ plugin_power_saver_helper_ = new PluginPowerSaverHelper(this);
+#endif
+
#if defined(ENABLE_NOTIFICATIONS)
notification_provider_ = new NotificationProvider(this);
#endif
@@ -812,6 +820,11 @@ void RenderFrameImpl::OnImeConfirmComposition(
pepper_composition_text_.clear();
}
+PluginPowerSaverHelper* RenderFrameImpl::plugin_power_saver_helper() {
+ DCHECK(plugin_power_saver_helper_);
+ return plugin_power_saver_helper_;
+}
+
#endif // ENABLE_PLUGINS
MediaStreamDispatcher* RenderFrameImpl::GetMediaStreamDispatcher() {
« content/renderer/pepper/plugin_power_saver_helper.cc ('K') | « content/renderer/render_frame_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698