OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef MEDIA_BASE_ANDROID_MEDIA_CLIENT_ANDROID_H_ | |
6 #define MEDIA_BASE_ANDROID_MEDIA_CLIENT_ANDROID_H_ | |
7 | |
8 #include <string> | |
9 #include <utility> | |
10 #include <vector> | |
11 | |
12 #include "base/macros.h" | |
13 #include "media/base/media_export.h" | |
14 | |
15 namespace media { | |
16 | |
17 class MediaDrmBridgeDelegate; | |
18 class MediaClientAndroid; | |
xhwang
2015/04/24 04:52:23
nit: order
gunsch
2015/04/27 23:44:12
Done.
| |
19 | |
20 // Setter for MediaClientAndroid. This should be called early in embedder | |
21 // lifecycle, before any media playback could occur. | |
22 MEDIA_EXPORT void SetMediaClientAndroid(MediaClientAndroid* media_client); | |
23 | |
24 #if defined(MEDIA_IMPLEMENTATION) | |
25 // Getter for the client. Returns nullptr if no customized client is needed. | |
26 MediaClientAndroid* GetMediaClientAndroid(); | |
27 #endif | |
28 | |
29 // A client interface for embedders (e.g. content/browser) to provide customized | |
30 // additions to Android's browser-side media handling. | |
31 class MEDIA_EXPORT MediaClientAndroid { | |
32 public: | |
33 MediaClientAndroid(); | |
34 virtual ~MediaClientAndroid(); | |
35 | |
36 // Returns extra mappings from key-system name to Android UUID. | |
37 virtual std::vector<std::pair<std::string, std::vector<uint8_t>>> | |
xhwang
2015/04/24 04:52:23
How about:
using UUID = std::vector<uint8_t>;
us
gunsch
2015/04/27 23:44:12
Done.
| |
38 GetKeySystemUUIDMappings() const; | |
xhwang
2015/04/24 04:52:23
Returning a vector of string/vector involves copy
gunsch
2015/04/27 23:44:12
Not all implementations do, see the default MediaC
| |
39 // Returns a MediaDrmBridgeDelegate | |
40 virtual media::MediaDrmBridgeDelegate* GetMediaDrmBridgeDelegate( | |
41 const std::vector<uint8_t>& scheme_uuid) const; | |
xhwang
2015/04/24 04:52:23
If you follow the comment about, you can s/std::ve
gunsch
2015/04/27 23:44:12
Done.
| |
42 | |
43 private: | |
44 DISALLOW_COPY_AND_ASSIGN(MediaClientAndroid); | |
45 }; | |
46 | |
47 } // namespace media | |
48 | |
49 #endif // MEDIA_BASE_ANDROID_MEDIA_CLIENT_ANDROID_H_ | |
OLD | NEW |