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

Side by Side Diff: third_party/WebKit/public/platform/modules/mediasession/WebMediaSession.h

Issue 1641993003: Pass media session id over IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@possible-next-split
Patch Set: Enumify constant Created 4 years, 9 months 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
« no previous file with comments | « media/blink/webmediaplayer_cast_android.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 WebMediaSession_h 5 #ifndef WebMediaSession_h
6 #define WebMediaSession_h 6 #define WebMediaSession_h
7 7
8 #include "public/platform/WebCallbacks.h" 8 #include "public/platform/WebCallbacks.h"
9 #include "public/platform/modules/mediasession/WebMediaSessionError.h" 9 #include "public/platform/modules/mediasession/WebMediaSessionError.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 using WebMediaSessionActivateCallback = WebCallbacks<void, const WebMediaSession Error&>; 13 using WebMediaSessionActivateCallback = WebCallbacks<void, const WebMediaSession Error&>;
14 using WebMediaSessionDeactivateCallback = WebCallbacks<void, void>; 14 using WebMediaSessionDeactivateCallback = WebCallbacks<void, void>;
15 15
16 struct WebMediaMetadata; 16 struct WebMediaMetadata;
17 17
18 class WebMediaSession { 18 class WebMediaSession {
19 public: 19 public:
20 enum {
21 DefaultID = 0
22 };
23
20 virtual ~WebMediaSession() = default; 24 virtual ~WebMediaSession() = default;
21 25
22 // Tries to activate the session by requesting audio focus from 26 // Tries to activate the session by requesting audio focus from
23 // the system. May fail if audio focus is denied by the 27 // the system. May fail if audio focus is denied by the
24 // system. The ownership of the pointer is transferred to the 28 // system. The ownership of the pointer is transferred to the
25 // WebMediaSession implementation. 29 // WebMediaSession implementation.
26 virtual void activate(WebMediaSessionActivateCallback*) = 0; 30 virtual void activate(WebMediaSessionActivateCallback*) = 0;
27 31
28 // Deactivates the session by abandoning audio focus. Will not 32 // Deactivates the session by abandoning audio focus. Will not
29 // fail in way visible to the user of the WebMediaSession. The 33 // fail in way visible to the user of the WebMediaSession. The
30 // ownership of the pointer is transferred to the WebMediaSession 34 // ownership of the pointer is transferred to the WebMediaSession
31 // implementation. 35 // implementation.
32 virtual void deactivate(WebMediaSessionDeactivateCallback*) = 0; 36 virtual void deactivate(WebMediaSessionDeactivateCallback*) = 0;
33 37
34 // Updates the metadata associated with the WebMediaSession. The metadata 38 // Updates the metadata associated with the WebMediaSession. The metadata
35 // can be a nullptr in which case the associated metadata should be reset. 39 // can be a nullptr in which case the assouciated metadata should be reset.
36 // The pointer is not owned by the WebMediaSession implementation. 40 // The pointer is not owned by the WebMediaSession implementation.
37 virtual void setMetadata(const WebMediaMetadata*) = 0; 41 virtual void setMetadata(const WebMediaMetadata*) = 0;
38 }; 42 };
39 43
40 } // namespace blink 44 } // namespace blink
41 45
42 #endif // WebMediaSession_h 46 #endif // WebMediaSession_h
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_cast_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698