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

Unified Diff: content/browser/media/session/audio_focus_manager.h

Issue 2274013005: Flash joining MediaSession (non-stack implementation) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@media_session_type
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | content/browser/media/session/audio_focus_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/session/audio_focus_manager.h
diff --git a/content/browser/media/session/audio_focus_manager.h b/content/browser/media/session/audio_focus_manager.h
index 6844ae767c402324872af4f787b100f3722e0222..360f0a4e5ba3d7664dbd1f18d0e860db24ed7a2d 100644
--- a/content/browser/media/session/audio_focus_manager.h
+++ b/content/browser/media/session/audio_focus_manager.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_MEDIA_SESSION_AUDIO_FOCUS_MANAGER_H_
#define CONTENT_BROWSER_MEDIA_SESSION_AUDIO_FOCUS_MANAGER_H_
+#include <list>
#include <unordered_map>
#include "base/memory/singleton.h"
@@ -27,8 +28,9 @@ class CONTENT_EXPORT AudioFocusManager {
static AudioFocusManager* GetInstance();
void RequestAudioFocus(MediaSession* media_session, AudioFocusType type);
-
+ void RequestPepperAudioFocus(MediaSession* media_session);
void AbandonAudioFocus(MediaSession* media_session);
+ void AbandonPepperAudioFocus(MediaSession* media_session);
private:
friend struct base::DefaultSingletonTraits<AudioFocusManager>;
@@ -86,9 +88,14 @@ class CONTENT_EXPORT AudioFocusManager {
// Removes the focused session if it is associated with |web_contents|.
void MaybeRemoveFocusEntry(WebContents* web_contents);
+ void MaybeRemovePepperEntry(WebContents* web_contents);
+
+ void UpdatePepperFocus() const;
+
std::unordered_map<WebContents*, std::unique_ptr<AudioFocusEntry>>
transient_entries_;
std::unique_ptr<AudioFocusEntry> focus_entry_;
+ std::list<std::unique_ptr<AudioFocusEntry>> pepper_entries_;
};
} // namespace content
« no previous file with comments | « no previous file | content/browser/media/session/audio_focus_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698