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

Side by Side Diff: media/cdm/proxy_decryptor.h

Issue 1132323004: Pass video overlay renderer preference to ProxyDecryptor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/blink/encrypted_media_player_support.cc ('k') | media/cdm/proxy_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 MEDIA_CDM_PROXY_DECRYPTOR_H_ 5 #ifndef MEDIA_CDM_PROXY_DECRYPTOR_H_
6 #define MEDIA_CDM_PROXY_DECRYPTOR_H_ 6 #define MEDIA_CDM_PROXY_DECRYPTOR_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // session ID rather than the internal session ID. 42 // session ID rather than the internal session ID.
43 typedef base::Callback<void(const std::string& session_id)> KeyAddedCB; 43 typedef base::Callback<void(const std::string& session_id)> KeyAddedCB;
44 typedef base::Callback<void(const std::string& session_id, 44 typedef base::Callback<void(const std::string& session_id,
45 MediaKeys::KeyError error_code, 45 MediaKeys::KeyError error_code,
46 uint32 system_code)> KeyErrorCB; 46 uint32 system_code)> KeyErrorCB;
47 typedef base::Callback<void(const std::string& session_id, 47 typedef base::Callback<void(const std::string& session_id,
48 const std::vector<uint8>& message, 48 const std::vector<uint8>& message,
49 const GURL& destination_url)> KeyMessageCB; 49 const GURL& destination_url)> KeyMessageCB;
50 50
51 ProxyDecryptor(MediaPermission* media_permission, 51 ProxyDecryptor(MediaPermission* media_permission,
52 bool use_hw_secure_codecs,
52 const KeyAddedCB& key_added_cb, 53 const KeyAddedCB& key_added_cb,
53 const KeyErrorCB& key_error_cb, 54 const KeyErrorCB& key_error_cb,
54 const KeyMessageCB& key_message_cb); 55 const KeyMessageCB& key_message_cb);
55 virtual ~ProxyDecryptor(); 56 virtual ~ProxyDecryptor();
56 57
57 // Creates the CDM and fires |cdm_created_cb|. This method should only be 58 // Creates the CDM and fires |cdm_created_cb|. This method should only be
58 // called once. If CDM creation failed, all following GenerateKeyRequest, 59 // called once. If CDM creation failed, all following GenerateKeyRequest,
59 // AddKey and CancelKeyRequest calls will result in a KeyError. 60 // AddKey and CancelKeyRequest calls will result in a KeyError.
60 void CreateCdm(CdmFactory* cdm_factory, 61 void CreateCdm(CdmFactory* cdm_factory,
61 const std::string& key_system, 62 const std::string& key_system,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 const EmeInitDataType init_data_type; 125 const EmeInitDataType init_data_type;
125 const std::vector<uint8> init_data; 126 const std::vector<uint8> init_data;
126 }; 127 };
127 128
128 bool is_creating_cdm_; 129 bool is_creating_cdm_;
129 130
130 // The real MediaKeys that manages key operations for the ProxyDecryptor. 131 // The real MediaKeys that manages key operations for the ProxyDecryptor.
131 scoped_ptr<MediaKeys> media_keys_; 132 scoped_ptr<MediaKeys> media_keys_;
132 133
133 MediaPermission* media_permission_; 134 MediaPermission* media_permission_;
135 bool use_hw_secure_codecs_;
134 136
135 // Callbacks for firing key events. 137 // Callbacks for firing key events.
136 KeyAddedCB key_added_cb_; 138 KeyAddedCB key_added_cb_;
137 KeyErrorCB key_error_cb_; 139 KeyErrorCB key_error_cb_;
138 KeyMessageCB key_message_cb_; 140 KeyMessageCB key_message_cb_;
139 141
140 std::string key_system_; 142 std::string key_system_;
141 GURL security_origin_; 143 GURL security_origin_;
142 144
143 // Keep track of both persistent and non-persistent sessions. 145 // Keep track of both persistent and non-persistent sessions.
144 base::hash_map<std::string, bool> active_sessions_; 146 base::hash_map<std::string, bool> active_sessions_;
145 147
146 bool is_clear_key_; 148 bool is_clear_key_;
147 149
148 ScopedVector<PendingGenerateKeyRequestData> pending_requests_; 150 ScopedVector<PendingGenerateKeyRequestData> pending_requests_;
149 151
150 // NOTE: Weak pointers must be invalidated before all other member variables. 152 // NOTE: Weak pointers must be invalidated before all other member variables.
151 base::WeakPtrFactory<ProxyDecryptor> weak_ptr_factory_; 153 base::WeakPtrFactory<ProxyDecryptor> weak_ptr_factory_;
152 154
153 DISALLOW_COPY_AND_ASSIGN(ProxyDecryptor); 155 DISALLOW_COPY_AND_ASSIGN(ProxyDecryptor);
154 }; 156 };
155 157
156 } // namespace media 158 } // namespace media
157 159
158 #endif // MEDIA_CDM_PROXY_DECRYPTOR_H_ 160 #endif // MEDIA_CDM_PROXY_DECRYPTOR_H_
OLDNEW
« no previous file with comments | « media/blink/encrypted_media_player_support.cc ('k') | media/cdm/proxy_decryptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698