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

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

Issue 2065513004: Expose flash playback status and volume control to content renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@audio_focus_manager
Patch Set: addressing nits Created 4 years, 6 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/pepper_plugin_instance_impl.h
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.h b/content/renderer/pepper/pepper_plugin_instance_impl.h
index 1cc9ef8450981e4faae840f7dfd313a029a7e9af..f3089f0504256c6742bc4bc847c86754276a687a 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.h
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.h
@@ -106,6 +106,7 @@ namespace content {
class ContentDecryptorDelegate;
class FullscreenContainer;
class MessageChannel;
+class PepperAudioController;
class PepperCompositorHost;
class PepperGraphics2DHost;
class PluginInstanceThrottlerImpl;
@@ -557,6 +558,10 @@ class CONTENT_EXPORT PepperPluginInstanceImpl
void OnThrottleStateChange() override;
void OnHiddenForPlaceholder(bool hidden) override;
+ PepperAudioController& audio_controller() {
+ return *audio_controller_;
+ }
+
private:
friend class base::RefCounted<PepperPluginInstanceImpl>;
friend class PpapiPluginInstanceTest;
@@ -977,6 +982,9 @@ class CONTENT_EXPORT PepperPluginInstanceImpl
bool initialized_;
+ // The controller for all active audios of this pepper instance.
+ std::unique_ptr<PepperAudioController> audio_controller_;
+
// We use a weak ptr factory for scheduling DidChangeView events so that we
// can tell whether updates are pending and consolidate them. When there's
// already a weak ptr pending (HasWeakPtrs is true), code should update the

Powered by Google App Engine
This is Rietveld 408576698