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

Side by Side Diff: content/renderer/media/crypto/encrypted_media_player_support.h

Issue 495353003: Move WebMediaPlayerImpl and its dependencies to media/blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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 2014 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 CONTENT_RENDERER_MEDIA_CRYPTO_ENCRYPTED_MEDIA_PLAYER_SUPPORT_H_
6 #define CONTENT_RENDERER_MEDIA_CRYPTO_ENCRYPTED_MEDIA_PLAYER_SUPPORT_H_
7
8 #include "media/base/decryptor.h"
9 #include "media/base/demuxer.h"
10 #include "third_party/WebKit/public/platform/WebMediaPlayer.h"
11
12 namespace blink {
13 class WebContentDecryptionModule;
14 class WebContentDecryptionModuleResult;
15 class WebLocalFrame;
16 class WebMediaPlayerClient;
17 class WebString;
18 }
19
20 namespace content {
21
22 class EncryptedMediaPlayerSupport {
23 public:
24 EncryptedMediaPlayerSupport();
25 virtual ~EncryptedMediaPlayerSupport();
26
27 // Prefixed API methods.
28 virtual blink::WebMediaPlayer::MediaKeyException GenerateKeyRequest(
29 blink::WebLocalFrame* frame,
30 const blink::WebString& key_system,
31 const unsigned char* init_data,
32 unsigned init_data_length) = 0;
33
34 virtual blink::WebMediaPlayer::MediaKeyException AddKey(
35 const blink::WebString& key_system,
36 const unsigned char* key,
37 unsigned key_length,
38 const unsigned char* init_data,
39 unsigned init_data_length,
40 const blink::WebString& session_id) = 0;
41
42 virtual blink::WebMediaPlayer::MediaKeyException CancelKeyRequest(
43 const blink::WebString& key_system,
44 const blink::WebString& session_id) = 0;
45
46
47 // Unprefixed API methods.
48 virtual void SetContentDecryptionModule(
49 blink::WebContentDecryptionModule* cdm) = 0;
50 virtual void SetContentDecryptionModule(
51 blink::WebContentDecryptionModule* cdm,
52 blink::WebContentDecryptionModuleResult result) = 0;
53 virtual void SetContentDecryptionModuleSync(
54 blink::WebContentDecryptionModule* cdm) = 0;
55
56
57 // Callback factory and notification methods used by WebMediaPlayerImpl.
58
59 // Creates a callback that Demuxers can use to signal that the content
60 // requires a key. This method make sure the callback returned can be safely
61 // invoked from any thread.
62 virtual media::Demuxer::NeedKeyCB CreateNeedKeyCB() = 0;
63
64 // Creates a callback that renderers can use to set decryptor
65 // ready callback. This method make sure the callback returned can be safely
66 // invoked from any thread.
67 virtual media::SetDecryptorReadyCB CreateSetDecryptorReadyCB() = 0;
68
69 // Called to inform this object that the media pipeline encountered
70 // and handled a decryption error.
71 virtual void OnPipelineDecryptError() = 0;
72
73 private:
74 DISALLOW_COPY_AND_ASSIGN(EncryptedMediaPlayerSupport);
75 };
76
77 } // namespace content
78
79 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_ENCRYPTED_MEDIA_PLAYER_SUPPORT_H_
OLDNEW
« no previous file with comments | « content/renderer/media/cache_util_unittest.cc ('k') | content/renderer/media/crypto/encrypted_media_player_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698