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

Unified Diff: content/public/renderer/render_frame.h

Issue 849723002: Plugin Power Saver: Make PepperPluginInstanceThrottler interface public. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: content/public/renderer/render_frame.h
diff --git a/content/public/renderer/render_frame.h b/content/public/renderer/render_frame.h
index 66cd7d211d2c57ffce208777427313bcd0ddbe41..a5add52ab9a7e8dd6d3aee458037695c3dffe59c 100644
--- a/content/public/renderer/render_frame.h
+++ b/content/public/renderer/render_frame.h
@@ -6,6 +6,7 @@
#define CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_
#include "base/callback_forward.h"
+#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
#include "content/common/content_export.h"
#include "ipc/ipc_listener.h"
@@ -36,6 +37,7 @@ class Isolate;
namespace content {
class ContextMenuClient;
+class PluginInstanceThrottler;
class RenderView;
class ServiceRegistry;
struct ContextMenuParams;
@@ -48,15 +50,6 @@ struct WebPreferences;
class CONTENT_EXPORT RenderFrame : public IPC::Listener,
public IPC::Sender {
public:
- enum PluginPowerSaverMode {
- // Plugin content is main content, and therefore never throttled.
- POWER_SAVER_MODE_ESSENTIAL = 0,
- // Plugin content is peripheral, but throttling is disabled.
- POWER_SAVER_MODE_PERIPHERAL_UNTHROTTLED = 1,
- // Plugin content is peripheral, and throttling is enabled.
- POWER_SAVER_MODE_PERIPHERAL_THROTTLED = 2
- };
-
// Returns the RenderFrame given a WebFrame.
static RenderFrame* FromWebFrame(blink::WebFrame* web_frame);
@@ -94,12 +87,12 @@ class CONTENT_EXPORT RenderFrame : public IPC::Listener,
virtual blink::WebNode GetContextMenuNode() const = 0;
// Create a new NPAPI/Pepper plugin depending on |info|. Returns NULL if no
- // plugin was found.
+ // plugin was found. |throttler| may be empty.
virtual blink::WebPlugin* CreatePlugin(
blink::WebFrame* frame,
const WebPluginInfo& info,
const blink::WebPluginParams& params,
- PluginPowerSaverMode power_saver_mode) = 0;
+ scoped_ptr<PluginInstanceThrottler> throttler) = 0;
// The client should handle the navigation externally.
virtual void LoadURLExternally(blink::WebLocalFrame* frame,
« no previous file with comments | « content/public/renderer/plugin_instance_throttler.cc ('k') | content/renderer/pepper/pepper_graphics_2d_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698