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

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

Issue 2583463002: [MediaSession] Add playbackState attribute to Blink MediaSession and use it to determine playback s… (Closed)
Patch Set: rebased 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_IMPL_H_ 5 #ifndef CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_IMPL_H_
6 #define CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_IMPL_H_ 6 #define CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 // MediaSessionService-related methods 170 // MediaSessionService-related methods
171 171
172 // Called when a MediaSessionService is created, which registers itself to 172 // Called when a MediaSessionService is created, which registers itself to
173 // this session. 173 // this session.
174 void OnServiceCreated(MediaSessionServiceImpl* service); 174 void OnServiceCreated(MediaSessionServiceImpl* service);
175 // Called when a MediaSessionService is destroyed, which unregisters itself 175 // Called when a MediaSessionService is destroyed, which unregisters itself
176 // from this session. 176 // from this session.
177 void OnServiceDestroyed(MediaSessionServiceImpl* service); 177 void OnServiceDestroyed(MediaSessionServiceImpl* service);
178 178
179 // Called when the playback state of a MediaSessionService has
180 // changed. Will notify observers of media session state change.
181 void OnMediaSessionPlaybackStateChanged(MediaSessionServiceImpl* service);
182
179 // Called when the metadata of a MediaSessionService has changed. Will notify 183 // Called when the metadata of a MediaSessionService has changed. Will notify
180 // observers if the service is currently routed. 184 // observers if the service is currently routed.
181 void OnMediaSessionMetadataChanged(MediaSessionServiceImpl* service); 185 void OnMediaSessionMetadataChanged(MediaSessionServiceImpl* service);
182 // Called when the actions of a MediaSessionService has changed. Will notify 186 // Called when the actions of a MediaSessionService has changed. Will notify
183 // observers if the service is currently routed. 187 // observers if the service is currently routed.
184 void OnMediaSessionActionsChanged(MediaSessionServiceImpl* service); 188 void OnMediaSessionActionsChanged(MediaSessionServiceImpl* service);
185 189
186 // Called when a MediaSessionAction is received. The action will be forwarded 190 // Called when a MediaSessionAction is received. The action will be forwarded
187 // to blink::MediaSession corresponding to the current routed service. 191 // to blink::MediaSession corresponding to the current routed service.
188 void DidReceiveAction(blink::mojom::MediaSessionAction action) override; 192 void DidReceiveAction(blink::mojom::MediaSessionAction action) override;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 ServicesMap services_; 311 ServicesMap services_;
308 // The currently routed service (non-owned pointer). 312 // The currently routed service (non-owned pointer).
309 MediaSessionServiceImpl* routed_service_; 313 MediaSessionServiceImpl* routed_service_;
310 314
311 DISALLOW_COPY_AND_ASSIGN(MediaSessionImpl); 315 DISALLOW_COPY_AND_ASSIGN(MediaSessionImpl);
312 }; 316 };
313 317
314 } // namespace content 318 } // namespace content
315 319
316 #endif // CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_IMPL_H_ 320 #endif // CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698