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

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

Issue 962793005: Adds MediaClientAndroid to support embedder/MediaDrmBridge interaction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename createSession to createSessionFromNative to avoid bug in FindBugs Created 5 years, 7 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/base/android/media_drm_bridge.cc ('k') | media/base/android/media_drm_bridge_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_DRM_BRIDGE_DELEGATE_H_
6 #define MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_DELEGATE_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/macros.h"
12 #include "media/base/android/media_client_android.h"
13 #include "media/base/eme_constants.h"
14 #include "media/base/media_export.h"
15
16 namespace media {
17
18 // Allows embedders to modify the Android MediaDrm flow. Delegates are
19 // registered to a specific key system.
20 class MEDIA_EXPORT MediaDrmBridgeDelegate {
21 public:
22 MediaDrmBridgeDelegate();
23 virtual ~MediaDrmBridgeDelegate();
24
25 // Returns the UUID of the DRM scheme that this delegate applies to.
26 virtual const UUID GetUUID() const = 0;
27
28 // Invoked from CreateSession.
29 // If |init_data_out| is filled, it replaces |init_data| to send to the
30 // MediaDrm instance.
31 // If |optional_parameters_out| is filled, it is expected to be an
32 // even-length list of (key, value) pairs to send to the MediaDrm instance.
33 // Returns false if the request should be rejected.
34 virtual bool OnCreateSession(
35 const EmeInitDataType init_data_type,
36 const std::vector<uint8_t>& init_data,
37 std::vector<uint8_t>* init_data_out,
38 std::vector<std::string>* optional_parameters_out);
39
40 private:
41 DISALLOW_COPY_AND_ASSIGN(MediaDrmBridgeDelegate);
42 };
43
44 } // namespace media
45
46 #endif // MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_DELEGATE_H_
OLDNEW
« no previous file with comments | « media/base/android/media_drm_bridge.cc ('k') | media/base/android/media_drm_bridge_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698