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

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

Issue 985113003: Block platform verification and file IO in the CDM adapter if the CDM configuration disallows them. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix DCHECK types. Created 5 years, 9 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 | « no previous file | content/renderer/media/crypto/ppapi_decryptor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CONTENT_RENDERER_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_
6 #define CONTENT_RENDERER_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ 6 #define CONTENT_RENDERER_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 18 matching lines...) Expand all
29 29
30 // PpapiDecryptor implements media::MediaKeys and media::Decryptor and forwards 30 // PpapiDecryptor implements media::MediaKeys and media::Decryptor and forwards
31 // all calls to the PluginInstance. 31 // all calls to the PluginInstance.
32 // This class should always be created & destroyed on the main renderer thread. 32 // This class should always be created & destroyed on the main renderer thread.
33 class PpapiDecryptor : public media::MediaKeys, 33 class PpapiDecryptor : public media::MediaKeys,
34 public media::CdmContext, 34 public media::CdmContext,
35 public media::Decryptor { 35 public media::Decryptor {
36 public: 36 public:
37 static scoped_ptr<PpapiDecryptor> Create( 37 static scoped_ptr<PpapiDecryptor> Create(
38 const std::string& key_system, 38 const std::string& key_system,
39 bool allow_distinctive_identifier,
40 bool allow_persistent_state,
39 const GURL& security_origin, 41 const GURL& security_origin,
40 const CreatePepperCdmCB& create_pepper_cdm_cb, 42 const CreatePepperCdmCB& create_pepper_cdm_cb,
41 const media::SessionMessageCB& session_message_cb, 43 const media::SessionMessageCB& session_message_cb,
42 const media::SessionClosedCB& session_closed_cb, 44 const media::SessionClosedCB& session_closed_cb,
43 const media::SessionErrorCB& session_error_cb, 45 const media::SessionErrorCB& session_error_cb,
44 const media::SessionKeysChangeCB& session_keys_change_cb, 46 const media::SessionKeysChangeCB& session_keys_change_cb,
45 const media::SessionExpirationUpdateCB& session_expiration_update_cb); 47 const media::SessionExpirationUpdateCB& session_expiration_update_cb);
46 48
47 ~PpapiDecryptor() override; 49 ~PpapiDecryptor() override;
48 50
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 const AudioDecodeCB& audio_decode_cb) override; 91 const AudioDecodeCB& audio_decode_cb) override;
90 void DecryptAndDecodeVideo( 92 void DecryptAndDecodeVideo(
91 const scoped_refptr<media::DecoderBuffer>& encrypted, 93 const scoped_refptr<media::DecoderBuffer>& encrypted,
92 const VideoDecodeCB& video_decode_cb) override; 94 const VideoDecodeCB& video_decode_cb) override;
93 void ResetDecoder(StreamType stream_type) override; 95 void ResetDecoder(StreamType stream_type) override;
94 void DeinitializeDecoder(StreamType stream_type) override; 96 void DeinitializeDecoder(StreamType stream_type) override;
95 97
96 private: 98 private:
97 PpapiDecryptor( 99 PpapiDecryptor(
98 const std::string& key_system, 100 const std::string& key_system,
101 bool allow_distinctive_identifier,
102 bool allow_persistent_state,
99 scoped_ptr<PepperCdmWrapper> pepper_cdm_wrapper, 103 scoped_ptr<PepperCdmWrapper> pepper_cdm_wrapper,
100 const media::SessionMessageCB& session_message_cb, 104 const media::SessionMessageCB& session_message_cb,
101 const media::SessionClosedCB& session_closed_cb, 105 const media::SessionClosedCB& session_closed_cb,
102 const media::SessionErrorCB& session_error_cb, 106 const media::SessionErrorCB& session_error_cb,
103 const media::SessionKeysChangeCB& session_keys_change_cb, 107 const media::SessionKeysChangeCB& session_keys_change_cb,
104 const media::SessionExpirationUpdateCB& session_expiration_update_cb); 108 const media::SessionExpirationUpdateCB& session_expiration_update_cb);
105 109
106 void OnDecoderInitialized(StreamType stream_type, bool success); 110 void OnDecoderInitialized(StreamType stream_type, bool success);
107 111
108 // Callbacks for |plugin_cdm_delegate_| to fire session events. 112 // Callbacks for |plugin_cdm_delegate_| to fire session events.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 154
151 // NOTE: Weak pointers must be invalidated before all other member variables. 155 // NOTE: Weak pointers must be invalidated before all other member variables.
152 base::WeakPtrFactory<PpapiDecryptor> weak_ptr_factory_; 156 base::WeakPtrFactory<PpapiDecryptor> weak_ptr_factory_;
153 157
154 DISALLOW_COPY_AND_ASSIGN(PpapiDecryptor); 158 DISALLOW_COPY_AND_ASSIGN(PpapiDecryptor);
155 }; 159 };
156 160
157 } // namespace content 161 } // namespace content
158 162
159 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ 163 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/crypto/ppapi_decryptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698