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

Side by Side Diff: media/base/android/media_client_android.h

Issue 962793005: Adds MediaClientAndroid to support embedder/MediaDrmBridge interaction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: overhaul: creates MediaClientAndroid (browser-side client), eliminates Java-based MediaDrmBridge ke… Created 5 years, 8 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
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698