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

Side by Side Diff: content/browser/media/session/audio_focus_delegate.h

Issue 2453623003: Decouple MediaSession messages from WebContents (full patch) (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
Zhiqiang Zhang (Slow) 2016/10/26 12:50:37 Changes to audio_focus_delegate* are just a result
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_AUDIO_FOCUS_DELEGATE_H_ 5 #ifndef CONTENT_BROWSER_MEDIA_SESSION_AUDIO_FOCUS_DELEGATE_H_
6 #define CONTENT_BROWSER_MEDIA_SESSION_AUDIO_FOCUS_DELEGATE_H_ 6 #define CONTENT_BROWSER_MEDIA_SESSION_AUDIO_FOCUS_DELEGATE_H_
7 7
8 #include "content/browser/media/session/audio_focus_manager.h" 8 #include "content/browser/media/session/audio_focus_manager.h"
9 #include "content/browser/media/session/media_session.h"
10 9
11 namespace content { 10 namespace content {
12 11
12 class MediaSessionImpl;
13
13 // AudioFocusDelegate is an interface abstracting audio focus handling for the 14 // AudioFocusDelegate is an interface abstracting audio focus handling for the
14 // MediaSession class. 15 // MediaSession class.
15 class AudioFocusDelegate { 16 class AudioFocusDelegate {
16 public: 17 public:
17 // Factory method returning an implementation of AudioFocusDelegate. 18 // Factory method returning an implementation of AudioFocusDelegate.
18 static std::unique_ptr<AudioFocusDelegate> Create( 19 static std::unique_ptr<AudioFocusDelegate> Create(
19 MediaSession* media_session); 20 MediaSessionImpl* media_session);
20 21
21 virtual ~AudioFocusDelegate() = default; 22 virtual ~AudioFocusDelegate() = default;
22 23
23 virtual bool RequestAudioFocus( 24 virtual bool RequestAudioFocus(
24 AudioFocusManager::AudioFocusType audio_focus_type) = 0; 25 AudioFocusManager::AudioFocusType audio_focus_type) = 0;
25 virtual void AbandonAudioFocus() = 0; 26 virtual void AbandonAudioFocus() = 0;
26 }; 27 };
27 28
28 } // namespace content 29 } // namespace content
29 30
30 #endif // CONTENT_BROWSER_MEDIA_SESSION_AUDIO_FOCUS_DELEGATE_H_ 31 #endif // CONTENT_BROWSER_MEDIA_SESSION_AUDIO_FOCUS_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698