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

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

Issue 2526533002: Allow MediaSession in iframes to be routed (Closed)
Patch Set: nits Created 4 years 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_PLAYER_OBSERVER_H_ 5 #ifndef CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_PLAYER_OBSERVER_H_
6 #define CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_PLAYER_OBSERVER_H_ 6 #define CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_PLAYER_OBSERVER_H_
7 7
8 namespace content { 8 namespace content {
9 9
10 class RenderFrameHost;
11
10 class MediaSessionPlayerObserver { 12 class MediaSessionPlayerObserver {
11 public: 13 public:
12 MediaSessionPlayerObserver() = default; 14 MediaSessionPlayerObserver() = default;
13 virtual ~MediaSessionPlayerObserver() = default; 15 virtual ~MediaSessionPlayerObserver() = default;
14 16
15 // The given |player_id| has been suspended by the MediaSession. 17 // The given |player_id| has been suspended by the MediaSession.
16 virtual void OnSuspend(int player_id) = 0; 18 virtual void OnSuspend(int player_id) = 0;
17 19
18 // The given |player_id| has been resumed by the MediaSession. 20 // The given |player_id| has been resumed by the MediaSession.
19 virtual void OnResume(int player_id) = 0; 21 virtual void OnResume(int player_id) = 0;
20 22
21 // The given |player_id| has been set a new volume multiplier by 23 // The given |player_id| has been set a new volume multiplier by
22 // the MediaSession. 24 // the MediaSession.
23 virtual void OnSetVolumeMultiplier(int player_id, 25 virtual void OnSetVolumeMultiplier(int player_id,
24 double volume_multiplier) = 0; 26 double volume_multiplier) = 0;
27
28 // Returns the RenderFrameHost this player observer belongs to. Returns
29 // nullptr if unavailable.
30 virtual RenderFrameHost* GetRenderFrameHost() const = 0;
25 }; 31 };
26 32
27 } // namespace content 33 } // namespace content
28 34
29 #endif // CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_PLAYER_OBSERVER_H_ 35 #endif // CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_PLAYER_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698