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

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: 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
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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 } 250 }
251 251
252 void WebMediaPlayerProxy::KeyAdded(const std::string& key_system, 252 void WebMediaPlayerProxy::KeyAdded(const std::string& key_system,
253 const std::string& session_id) { 253 const std::string& session_id) {
254 render_loop_->PostTask(FROM_HERE, base::Bind( 254 render_loop_->PostTask(FROM_HERE, base::Bind(
255 &WebMediaPlayerProxy::KeyAddedTask, this, key_system, session_id)); 255 &WebMediaPlayerProxy::KeyAddedTask, this, key_system, session_id));
256 } 256 }
257 257
258 void WebMediaPlayerProxy::KeyError(const std::string& key_system, 258 void WebMediaPlayerProxy::KeyError(const std::string& key_system,
259 const std::string& session_id, 259 const std::string& session_id,
260 media::AesDecryptor::KeyError error_code, 260 media::Decryptor::KeyError error_code,
261 int system_code) { 261 int system_code) {
262 render_loop_->PostTask(FROM_HERE, base::Bind( 262 render_loop_->PostTask(FROM_HERE, base::Bind(
263 &WebMediaPlayerProxy::KeyErrorTask, this, key_system, session_id, 263 &WebMediaPlayerProxy::KeyErrorTask, this, key_system, session_id,
264 error_code, system_code)); 264 error_code, system_code));
265 } 265 }
266 266
267 void WebMediaPlayerProxy::KeyMessage(const std::string& key_system, 267 void WebMediaPlayerProxy::KeyMessage(const std::string& key_system,
268 const std::string& session_id, 268 const std::string& session_id,
269 scoped_array<uint8> message, 269 scoped_array<uint8> message,
270 int message_length, 270 int message_length,
(...skipping 14 matching lines...) Expand all
285 285
286 void WebMediaPlayerProxy::KeyAddedTask(const std::string& key_system, 286 void WebMediaPlayerProxy::KeyAddedTask(const std::string& key_system,
287 const std::string& session_id) { 287 const std::string& session_id) {
288 DCHECK(render_loop_->BelongsToCurrentThread()); 288 DCHECK(render_loop_->BelongsToCurrentThread());
289 if (webmediaplayer_) 289 if (webmediaplayer_)
290 webmediaplayer_->OnKeyAdded(key_system, session_id); 290 webmediaplayer_->OnKeyAdded(key_system, session_id);
291 } 291 }
292 292
293 void WebMediaPlayerProxy::KeyErrorTask(const std::string& key_system, 293 void WebMediaPlayerProxy::KeyErrorTask(const std::string& key_system,
294 const std::string& session_id, 294 const std::string& session_id,
295 media::AesDecryptor::KeyError error_code, 295 media::Decryptor::KeyError error_code,
296 int system_code) { 296 int system_code) {
297 DCHECK(render_loop_->BelongsToCurrentThread()); 297 DCHECK(render_loop_->BelongsToCurrentThread());
298 if (webmediaplayer_) 298 if (webmediaplayer_)
299 webmediaplayer_->OnKeyError(key_system, session_id, 299 webmediaplayer_->OnKeyError(key_system, session_id,
300 error_code, system_code); 300 error_code, system_code);
301 } 301 }
302 302
303 void WebMediaPlayerProxy::KeyMessageTask(const std::string& key_system, 303 void WebMediaPlayerProxy::KeyMessageTask(const std::string& key_system,
304 const std::string& session_id, 304 const std::string& session_id,
305 scoped_array<uint8> message, 305 scoped_array<uint8> message,
306 int message_length, 306 int message_length,
307 const std::string& default_url) { 307 const std::string& default_url) {
308 DCHECK(render_loop_->BelongsToCurrentThread()); 308 DCHECK(render_loop_->BelongsToCurrentThread());
309 if (webmediaplayer_) 309 if (webmediaplayer_)
310 webmediaplayer_->OnKeyMessage(key_system, session_id, 310 webmediaplayer_->OnKeyMessage(key_system, session_id,
311 message.Pass(), message_length, default_url); 311 message.Pass(), message_length, default_url);
312 } 312 }
313 313
314 void WebMediaPlayerProxy::NeedKeyTask(const std::string& key_system, 314 void WebMediaPlayerProxy::NeedKeyTask(const std::string& key_system,
315 const std::string& session_id, 315 const std::string& session_id,
316 scoped_array<uint8> init_data, 316 scoped_array<uint8> init_data,
317 int init_data_size) { 317 int init_data_size) {
318 DCHECK(render_loop_->BelongsToCurrentThread()); 318 DCHECK(render_loop_->BelongsToCurrentThread());
319 if (webmediaplayer_) 319 if (webmediaplayer_)
320 webmediaplayer_->OnNeedKey(key_system, session_id, 320 webmediaplayer_->OnNeedKey(key_system, session_id,
321 init_data.Pass(), init_data_size); 321 init_data.Pass(), init_data_size);
322 } 322 }
323 323
324 } // namespace webkit_media 324 } // namespace webkit_media
OLDNEW
« media/crypto/decryptor.h ('K') | « webkit/media/webmediaplayer_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698