| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_DELEGATE_H_ | |
| 6 #define CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_DELEGATE_H_ | |
| 7 | |
| 8 #include "content/browser/media/session/audio_focus_manager.h" | |
| 9 #include "content/browser/media/session/media_session.h" | |
| 10 | |
| 11 namespace content { | |
| 12 | |
| 13 // MediaSessionDelegate is an interface abstracting audio focus handling for the | |
| 14 // MediaSession class. | |
| 15 class MediaSessionDelegate { | |
| 16 public: | |
| 17 // Factory method returning an implementation of MediaSessionDelegate. | |
| 18 static std::unique_ptr<MediaSessionDelegate> Create( | |
| 19 MediaSession* media_session); | |
| 20 | |
| 21 virtual ~MediaSessionDelegate() = default; | |
| 22 | |
| 23 virtual bool RequestAudioFocus( | |
| 24 AudioFocusManager::AudioFocusType audio_focus_type) = 0; | |
| 25 virtual void AbandonAudioFocus() = 0; | |
| 26 }; | |
| 27 | |
| 28 } // namespace content | |
| 29 | |
| 30 #endif // CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_DELEGATE_H_ | |
| OLD | NEW |