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

Side by Side Diff: webkit/media/webmediaplayer_proxy.cc

Issue 10539150: Add Decryptor interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « webkit/media/webmediaplayer_proxy.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "webkit/media/webmediaplayer_proxy.h" 5 #include "webkit/media/webmediaplayer_proxy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "media/base/pipeline_status.h" 10 #include "media/base/pipeline_status.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 } 238 }
239 239
240 void WebMediaPlayerProxy::KeyAdded(const std::string& key_system, 240 void WebMediaPlayerProxy::KeyAdded(const std::string& key_system,
241 const std::string& session_id) { 241 const std::string& session_id) {
242 render_loop_->PostTask(FROM_HERE, base::Bind( 242 render_loop_->PostTask(FROM_HERE, base::Bind(
243 &WebMediaPlayerProxy::KeyAddedTask, this, key_system, session_id)); 243 &WebMediaPlayerProxy::KeyAddedTask, this, key_system, session_id));
244 } 244 }
245 245
246 void WebMediaPlayerProxy::KeyError(const std::string& key_system, 246 void WebMediaPlayerProxy::KeyError(const std::string& key_system,
247 const std::string& session_id, 247 const std::string& session_id,
248 media::AesDecryptor::KeyError error_code, 248 media::Decryptor::KeyError error_code,
249 int system_code) { 249 int system_code) {
250 render_loop_->PostTask(FROM_HERE, base::Bind( 250 render_loop_->PostTask(FROM_HERE, base::Bind(
251 &WebMediaPlayerProxy::KeyErrorTask, this, key_system, session_id, 251 &WebMediaPlayerProxy::KeyErrorTask, this, key_system, session_id,
252 error_code, system_code)); 252 error_code, system_code));
253 } 253 }
254 254
255 void WebMediaPlayerProxy::KeyMessage(const std::string& key_system, 255 void WebMediaPlayerProxy::KeyMessage(const std::string& key_system,
256 const std::string& session_id, 256 const std::string& session_id,
257 scoped_array<uint8> message, 257 scoped_array<uint8> message,
258 int message_length, 258 int message_length,
(...skipping 14 matching lines...) Expand all
273 273
274 void WebMediaPlayerProxy::KeyAddedTask(const std::string& key_system, 274 void WebMediaPlayerProxy::KeyAddedTask(const std::string& key_system,
275 const std::string& session_id) { 275 const std::string& session_id) {
276 DCHECK(render_loop_->BelongsToCurrentThread()); 276 DCHECK(render_loop_->BelongsToCurrentThread());
277 if (webmediaplayer_) 277 if (webmediaplayer_)
278 webmediaplayer_->OnKeyAdded(key_system, session_id); 278 webmediaplayer_->OnKeyAdded(key_system, session_id);
279 } 279 }
280 280
281 void WebMediaPlayerProxy::KeyErrorTask(const std::string& key_system, 281 void WebMediaPlayerProxy::KeyErrorTask(const std::string& key_system,
282 const std::string& session_id, 282 const std::string& session_id,
283 media::AesDecryptor::KeyError error_code, 283 media::Decryptor::KeyError error_code,
284 int system_code) { 284 int system_code) {
285 DCHECK(render_loop_->BelongsToCurrentThread()); 285 DCHECK(render_loop_->BelongsToCurrentThread());
286 if (webmediaplayer_) 286 if (webmediaplayer_)
287 webmediaplayer_->OnKeyError(key_system, session_id, 287 webmediaplayer_->OnKeyError(key_system, session_id,
288 error_code, system_code); 288 error_code, system_code);
289 } 289 }
290 290
291 void WebMediaPlayerProxy::KeyMessageTask(const std::string& key_system, 291 void WebMediaPlayerProxy::KeyMessageTask(const std::string& key_system,
292 const std::string& session_id, 292 const std::string& session_id,
293 scoped_array<uint8> message, 293 scoped_array<uint8> message,
294 int message_length, 294 int message_length,
295 const std::string& default_url) { 295 const std::string& default_url) {
296 DCHECK(render_loop_->BelongsToCurrentThread()); 296 DCHECK(render_loop_->BelongsToCurrentThread());
297 if (webmediaplayer_) 297 if (webmediaplayer_)
298 webmediaplayer_->OnKeyMessage(key_system, session_id, 298 webmediaplayer_->OnKeyMessage(key_system, session_id,
299 message.Pass(), message_length, default_url); 299 message.Pass(), message_length, default_url);
300 } 300 }
301 301
302 void WebMediaPlayerProxy::NeedKeyTask(const std::string& key_system, 302 void WebMediaPlayerProxy::NeedKeyTask(const std::string& key_system,
303 const std::string& session_id, 303 const std::string& session_id,
304 scoped_array<uint8> init_data, 304 scoped_array<uint8> init_data,
305 int init_data_size) { 305 int init_data_size) {
306 DCHECK(render_loop_->BelongsToCurrentThread()); 306 DCHECK(render_loop_->BelongsToCurrentThread());
307 if (webmediaplayer_) 307 if (webmediaplayer_)
308 webmediaplayer_->OnNeedKey(key_system, session_id, 308 webmediaplayer_->OnNeedKey(key_system, session_id,
309 init_data.Pass(), init_data_size); 309 init_data.Pass(), init_data_size);
310 } 310 }
311 311
312 } // namespace webkit_media 312 } // namespace webkit_media
OLDNEW
« no previous file with comments | « webkit/media/webmediaplayer_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698