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

Unified Diff: content/renderer/pepper/ppb_audio_impl.h

Issue 879403002: Plugin Power Saver: Mute throttled plugins. (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/renderer/pepper/ppb_audio_impl.h
diff --git a/content/renderer/pepper/ppb_audio_impl.h b/content/renderer/pepper/ppb_audio_impl.h
index 3348527028e7e327418c3bf2ed306adb3bd4cf3d..31e161572afdea52bd02e4f6880db42a35a7c0af 100644
--- a/content/renderer/pepper/ppb_audio_impl.h
+++ b/content/renderer/pepper/ppb_audio_impl.h
@@ -9,6 +9,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/shared_memory.h"
#include "base/sync_socket.h"
+#include "content/public/renderer/plugin_instance_throttler.h"
#include "content/renderer/pepper/audio_helper.h"
#include "ppapi/c/pp_completion_callback.h"
#include "ppapi/c/ppb_audio.h"
@@ -28,7 +29,8 @@ class PepperPlatformAudioOutput;
// to look more like typical HostResource implementations.
class PPB_Audio_Impl : public ppapi::Resource,
public ppapi::PPB_Audio_Shared,
- public AudioHelper {
+ public AudioHelper,
+ public PluginInstanceThrottler::Observer {
public:
explicit PPB_Audio_Impl(PP_Instance instance);
@@ -52,6 +54,10 @@ class PPB_Audio_Impl : public ppapi::Resource,
size_t shared_memory_size_,
base::SyncSocket::Handle socket) override;
+ // PluginInstanceThrottler::Observer implementation.
+ void OnPowerSaverStateChange(
+ PluginInstanceThrottler::PowerSaverState state) override;
+
// AudioConfig used for creating this Audio object. We own a ref.
ppapi::ScopedPPResource config_;

Powered by Google App Engine
This is Rietveld 408576698