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/media_session.h" |
| 9 |
| 10 namespace content { |
| 11 |
| 12 // MediaSessionDelegate is an interface abstracting audio focus handling for the |
| 13 // MediaSession class. |
| 14 class MediaSessionDelegate { |
| 15 public: |
| 16 // Factory method returning an implementation of MediaSessionDelegate. |
| 17 static scoped_ptr<MediaSessionDelegate> Create(MediaSession* media_session); |
| 18 |
| 19 virtual bool RequestAudioFocus(MediaSession::Type type) = 0; |
| 20 virtual void AbandonAudioFocus() = 0; |
| 21 }; |
| 22 |
| 23 } // namespace content |
| 24 |
| 25 #endif // CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_DELEGATE_H_ |
OLD | NEW |