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

Side by Side Diff: content/renderer/pepper/content_decryptor_delegate.h

Issue 105383002: Rename EME WD call parameters (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nit Created 7 years 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_
6 #define CONTENT_RENDERER_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_ 6 #define CONTENT_RENDERER_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <string> 9 #include <string>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 void Initialize(const std::string& key_system); 42 void Initialize(const std::string& key_system);
43 43
44 void SetSessionEventCallbacks( 44 void SetSessionEventCallbacks(
45 const media::SessionCreatedCB& session_created_cb, 45 const media::SessionCreatedCB& session_created_cb,
46 const media::SessionMessageCB& session_message_cb, 46 const media::SessionMessageCB& session_message_cb,
47 const media::SessionReadyCB& session_ready_cb, 47 const media::SessionReadyCB& session_ready_cb,
48 const media::SessionClosedCB& session_closed_cb, 48 const media::SessionClosedCB& session_closed_cb,
49 const media::SessionErrorCB& session_error_cb); 49 const media::SessionErrorCB& session_error_cb);
50 50
51 // Provides access to PPP_ContentDecryptor_Private. 51 // Provides access to PPP_ContentDecryptor_Private.
52 bool CreateSession(uint32 reference_id, 52 bool CreateSession(uint32 session_id,
53 const std::string& type, 53 const std::string& type,
54 const uint8* init_data, 54 const uint8* init_data,
55 int init_data_length); 55 int init_data_length);
56 bool UpdateSession(uint32 reference_id, 56 bool UpdateSession(uint32 session_id,
57 const uint8* response, 57 const uint8* response,
58 int response_length); 58 int response_length);
59 bool ReleaseSession(uint32 reference_id); 59 bool ReleaseSession(uint32 session_id);
60 bool Decrypt(media::Decryptor::StreamType stream_type, 60 bool Decrypt(media::Decryptor::StreamType stream_type,
61 const scoped_refptr<media::DecoderBuffer>& encrypted_buffer, 61 const scoped_refptr<media::DecoderBuffer>& encrypted_buffer,
62 const media::Decryptor::DecryptCB& decrypt_cb); 62 const media::Decryptor::DecryptCB& decrypt_cb);
63 bool CancelDecrypt(media::Decryptor::StreamType stream_type); 63 bool CancelDecrypt(media::Decryptor::StreamType stream_type);
64 bool InitializeAudioDecoder( 64 bool InitializeAudioDecoder(
65 const media::AudioDecoderConfig& decoder_config, 65 const media::AudioDecoderConfig& decoder_config,
66 const media::Decryptor::DecoderInitCB& decoder_init_cb); 66 const media::Decryptor::DecoderInitCB& decoder_init_cb);
67 bool InitializeVideoDecoder( 67 bool InitializeVideoDecoder(
68 const media::VideoDecoderConfig& decoder_config, 68 const media::VideoDecoderConfig& decoder_config,
69 const media::Decryptor::DecoderInitCB& decoder_init_cb); 69 const media::Decryptor::DecoderInitCB& decoder_init_cb);
70 // TODO(tomfinegan): Add callback args for DeinitializeDecoder() and 70 // TODO(tomfinegan): Add callback args for DeinitializeDecoder() and
71 // ResetDecoder() 71 // ResetDecoder()
72 bool DeinitializeDecoder(media::Decryptor::StreamType stream_type); 72 bool DeinitializeDecoder(media::Decryptor::StreamType stream_type);
73 bool ResetDecoder(media::Decryptor::StreamType stream_type); 73 bool ResetDecoder(media::Decryptor::StreamType stream_type);
74 // Note: These methods can be used with unencrypted data. 74 // Note: These methods can be used with unencrypted data.
75 bool DecryptAndDecodeAudio( 75 bool DecryptAndDecodeAudio(
76 const scoped_refptr<media::DecoderBuffer>& encrypted_buffer, 76 const scoped_refptr<media::DecoderBuffer>& encrypted_buffer,
77 const media::Decryptor::AudioDecodeCB& audio_decode_cb); 77 const media::Decryptor::AudioDecodeCB& audio_decode_cb);
78 bool DecryptAndDecodeVideo( 78 bool DecryptAndDecodeVideo(
79 const scoped_refptr<media::DecoderBuffer>& encrypted_buffer, 79 const scoped_refptr<media::DecoderBuffer>& encrypted_buffer,
80 const media::Decryptor::VideoDecodeCB& video_decode_cb); 80 const media::Decryptor::VideoDecodeCB& video_decode_cb);
81 81
82 // PPB_ContentDecryptor_Private dispatching methods. 82 // PPB_ContentDecryptor_Private dispatching methods.
83 void OnSessionCreated(uint32 reference_id, PP_Var session_id_var); 83 void OnSessionCreated(uint32 session_id, PP_Var web_session_id_var);
84 void OnSessionMessage(uint32 reference_id, 84 void OnSessionMessage(uint32 session_id,
85 PP_Var message, 85 PP_Var message,
86 PP_Var destination_url); 86 PP_Var destination_url);
87 void OnSessionReady(uint32 reference_id); 87 void OnSessionReady(uint32 session_id);
88 void OnSessionClosed(uint32 reference_id); 88 void OnSessionClosed(uint32 session_id);
89 void OnSessionError(uint32 reference_id, 89 void OnSessionError(uint32 session_id,
90 int32_t media_error, 90 int32_t media_error,
91 int32_t system_code); 91 int32_t system_code);
92 void DeliverBlock(PP_Resource decrypted_block, 92 void DeliverBlock(PP_Resource decrypted_block,
93 const PP_DecryptedBlockInfo* block_info); 93 const PP_DecryptedBlockInfo* block_info);
94 void DecoderInitializeDone(PP_DecryptorStreamType decoder_type, 94 void DecoderInitializeDone(PP_DecryptorStreamType decoder_type,
95 uint32_t request_id, 95 uint32_t request_id,
96 PP_Bool success); 96 PP_Bool success);
97 void DecoderDeinitializeDone(PP_DecryptorStreamType decoder_type, 97 void DecoderDeinitializeDone(PP_DecryptorStreamType decoder_type,
98 uint32_t request_id); 98 uint32_t request_id);
99 void DecoderResetDone(PP_DecryptorStreamType decoder_type, 99 void DecoderResetDone(PP_DecryptorStreamType decoder_type,
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 184
185 base::WeakPtr<ContentDecryptorDelegate> weak_this_; 185 base::WeakPtr<ContentDecryptorDelegate> weak_this_;
186 base::WeakPtrFactory<ContentDecryptorDelegate> weak_ptr_factory_; 186 base::WeakPtrFactory<ContentDecryptorDelegate> weak_ptr_factory_;
187 187
188 DISALLOW_COPY_AND_ASSIGN(ContentDecryptorDelegate); 188 DISALLOW_COPY_AND_ASSIGN(ContentDecryptorDelegate);
189 }; 189 };
190 190
191 } // namespace content 191 } // namespace content
192 192
193 #endif // CONTENT_RENDERER_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_ 193 #endif // CONTENT_RENDERER_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698