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