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

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

Issue 2568463003: media: Rename MediaKeys to ContentDecryptionModule (Closed)
Patch Set: comments addressed Created 4 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <map> 11 #include <map>
12 #include <queue> 12 #include <queue>
13 #include <string> 13 #include <string>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/callback_helpers.h" 16 #include "base/callback_helpers.h"
17 #include "base/compiler_specific.h" 17 #include "base/compiler_specific.h"
18 #include "base/macros.h" 18 #include "base/macros.h"
19 #include "base/memory/ref_counted.h" 19 #include "base/memory/ref_counted.h"
20 #include "base/memory/weak_ptr.h" 20 #include "base/memory/weak_ptr.h"
21 #include "media/base/cdm_promise.h" 21 #include "media/base/cdm_promise.h"
22 #include "media/base/cdm_promise_adapter.h" 22 #include "media/base/cdm_promise_adapter.h"
23 #include "media/base/cdm_session_tracker.h" 23 #include "media/base/cdm_session_tracker.h"
24 #include "media/base/channel_layout.h" 24 #include "media/base/channel_layout.h"
25 #include "media/base/content_decryption_module.h"
25 #include "media/base/decryptor.h" 26 #include "media/base/decryptor.h"
26 #include "media/base/media_keys.h"
27 #include "media/base/sample_format.h" 27 #include "media/base/sample_format.h"
28 #include "ppapi/c/pp_time.h" 28 #include "ppapi/c/pp_time.h"
29 #include "ppapi/c/private/pp_content_decryptor.h" 29 #include "ppapi/c/private/pp_content_decryptor.h"
30 #include "ppapi/c/private/ppp_content_decryptor_private.h" 30 #include "ppapi/c/private/ppp_content_decryptor_private.h"
31 #include "ui/gfx/geometry/size.h" 31 #include "ui/gfx/geometry/size.h"
32 32
33 namespace media { 33 namespace media {
34 class AudioDecoderConfig; 34 class AudioDecoderConfig;
35 class DecoderBuffer; 35 class DecoderBuffer;
36 class VideoDecoderConfig; 36 class VideoDecoderConfig;
(...skipping 24 matching lines...) Expand all
61 const media::SessionExpirationUpdateCB& session_expiration_update_cb, 61 const media::SessionExpirationUpdateCB& session_expiration_update_cb,
62 const base::Closure& fatal_plugin_error_cb, 62 const base::Closure& fatal_plugin_error_cb,
63 std::unique_ptr<media::SimpleCdmPromise> promise); 63 std::unique_ptr<media::SimpleCdmPromise> promise);
64 64
65 void InstanceCrashed(); 65 void InstanceCrashed();
66 66
67 // Provides access to PPP_ContentDecryptor_Private. 67 // Provides access to PPP_ContentDecryptor_Private.
68 void SetServerCertificate(const std::vector<uint8_t>& certificate, 68 void SetServerCertificate(const std::vector<uint8_t>& certificate,
69 std::unique_ptr<media::SimpleCdmPromise> promise); 69 std::unique_ptr<media::SimpleCdmPromise> promise);
70 void CreateSessionAndGenerateRequest( 70 void CreateSessionAndGenerateRequest(
71 media::MediaKeys::SessionType session_type, 71 media::ContentDecryptionModule::SessionType session_type,
72 media::EmeInitDataType init_data_type, 72 media::EmeInitDataType init_data_type,
73 const std::vector<uint8_t>& init_data, 73 const std::vector<uint8_t>& init_data,
74 std::unique_ptr<media::NewSessionCdmPromise> promise); 74 std::unique_ptr<media::NewSessionCdmPromise> promise);
75 void LoadSession(media::MediaKeys::SessionType session_type, 75 void LoadSession(media::ContentDecryptionModule::SessionType session_type,
76 const std::string& session_id, 76 const std::string& session_id,
77 std::unique_ptr<media::NewSessionCdmPromise> promise); 77 std::unique_ptr<media::NewSessionCdmPromise> promise);
78 void UpdateSession(const std::string& session_id, 78 void UpdateSession(const std::string& session_id,
79 const std::vector<uint8_t>& response, 79 const std::vector<uint8_t>& response,
80 std::unique_ptr<media::SimpleCdmPromise> promise); 80 std::unique_ptr<media::SimpleCdmPromise> promise);
81 void CloseSession(const std::string& session_id, 81 void CloseSession(const std::string& session_id,
82 std::unique_ptr<media::SimpleCdmPromise> promise); 82 std::unique_ptr<media::SimpleCdmPromise> promise);
83 void RemoveSession(const std::string& session_id, 83 void RemoveSession(const std::string& session_id,
84 std::unique_ptr<media::SimpleCdmPromise> promise); 84 std::unique_ptr<media::SimpleCdmPromise> promise);
85 bool Decrypt(media::Decryptor::StreamType stream_type, 85 bool Decrypt(media::Decryptor::StreamType stream_type,
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 245
246 base::WeakPtr<ContentDecryptorDelegate> weak_this_; 246 base::WeakPtr<ContentDecryptorDelegate> weak_this_;
247 base::WeakPtrFactory<ContentDecryptorDelegate> weak_ptr_factory_; 247 base::WeakPtrFactory<ContentDecryptorDelegate> weak_ptr_factory_;
248 248
249 DISALLOW_COPY_AND_ASSIGN(ContentDecryptorDelegate); 249 DISALLOW_COPY_AND_ASSIGN(ContentDecryptorDelegate);
250 }; 250 };
251 251
252 } // namespace content 252 } // namespace content
253 253
254 #endif // CONTENT_RENDERER_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_ 254 #endif // CONTENT_RENDERER_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/renderer/media/cdm/render_cdm_factory.cc ('k') | content/renderer/pepper/content_decryptor_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698