OLD | NEW |
---|---|
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 static const int kDefaultMediaSessionID = 0; | |
DaleCurtis
2016/02/26 19:14:30
No static const in header files since each include
DaleCurtis
2016/02/26 19:16:44
Discussion here https://groups.google.com/a/chromi
davve
2016/02/29 09:04:01
Thanks for looking! An enum looks like the appropr
| |
14 | |
13 using WebMediaSessionActivateCallback = WebCallbacks<void, const WebMediaSession Error&>; | 15 using WebMediaSessionActivateCallback = WebCallbacks<void, const WebMediaSession Error&>; |
14 using WebMediaSessionDeactivateCallback = WebCallbacks<void, void>; | 16 using WebMediaSessionDeactivateCallback = WebCallbacks<void, void>; |
15 | 17 |
16 struct WebMediaMetadata; | 18 struct WebMediaMetadata; |
17 | 19 |
18 class WebMediaSession { | 20 class WebMediaSession { |
19 public: | 21 public: |
20 virtual ~WebMediaSession() = default; | 22 virtual ~WebMediaSession() = default; |
21 | 23 |
22 // Tries to activate the session by requesting audio focus from | 24 // Tries to activate the session by requesting audio focus from |
(...skipping 10 matching lines...) Expand all Loading... | |
33 | 35 |
34 // Updates the metadata associated with the WebMediaSession. The metadata | 36 // Updates the metadata associated with the WebMediaSession. The metadata |
35 // can be a nullptr in which case the associated metadata should be reset. | 37 // can be a nullptr in which case the associated metadata should be reset. |
36 // The pointer is not owned by the WebMediaSession implementation. | 38 // The pointer is not owned by the WebMediaSession implementation. |
37 virtual void setMetadata(const WebMediaMetadata*) = 0; | 39 virtual void setMetadata(const WebMediaMetadata*) = 0; |
38 }; | 40 }; |
39 | 41 |
40 } // namespace blink | 42 } // namespace blink |
41 | 43 |
42 #endif // WebMediaSession_h | 44 #endif // WebMediaSession_h |
OLD | NEW |