OLD | NEW |
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 #include "content/renderer/media/android/renderer_media_player_manager.h" | 5 #include "content/renderer/media/android/renderer_media_player_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "content/common/media/cdm_messages.h" | 9 #include "content/common/media/cdm_messages.h" |
10 #include "content/common/media/media_player_messages_android.h" | 10 #include "content/common/media/media_player_messages_android.h" |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 uint32 session_id, | 315 uint32 session_id, |
316 const std::vector<uint8>& message, | 316 const std::vector<uint8>& message, |
317 const GURL& destination_url) { | 317 const GURL& destination_url) { |
318 if (message.size() > kMaxSessionMessageLength) { | 318 if (message.size() > kMaxSessionMessageLength) { |
319 OnSessionError(cdm_id, session_id, media::MediaKeys::kUnknownError, 0); | 319 OnSessionError(cdm_id, session_id, media::MediaKeys::kUnknownError, 0); |
320 return; | 320 return; |
321 } | 321 } |
322 | 322 |
323 ProxyMediaKeys* media_keys = GetMediaKeys(cdm_id); | 323 ProxyMediaKeys* media_keys = GetMediaKeys(cdm_id); |
324 if (media_keys) | 324 if (media_keys) |
325 media_keys->OnSessionMessage(session_id, message, destination_url.spec()); | 325 media_keys->OnSessionMessage(session_id, message, destination_url); |
326 } | 326 } |
327 | 327 |
328 void RendererMediaPlayerManager::OnSessionReady(int cdm_id, uint32 session_id) { | 328 void RendererMediaPlayerManager::OnSessionReady(int cdm_id, uint32 session_id) { |
329 ProxyMediaKeys* media_keys = GetMediaKeys(cdm_id); | 329 ProxyMediaKeys* media_keys = GetMediaKeys(cdm_id); |
330 if (media_keys) | 330 if (media_keys) |
331 media_keys->OnSessionReady(session_id); | 331 media_keys->OnSessionReady(session_id); |
332 } | 332 } |
333 | 333 |
334 void RendererMediaPlayerManager::OnSessionClosed(int cdm_id, | 334 void RendererMediaPlayerManager::OnSessionClosed(int cdm_id, |
335 uint32 session_id) { | 335 uint32 session_id) { |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 | 451 |
452 bool | 452 bool |
453 RendererMediaPlayerManager::ShouldUseVideoOverlayForEmbeddedEncryptedVideo() { | 453 RendererMediaPlayerManager::ShouldUseVideoOverlayForEmbeddedEncryptedVideo() { |
454 const RendererPreferences& prefs = static_cast<RenderFrameImpl*>( | 454 const RendererPreferences& prefs = static_cast<RenderFrameImpl*>( |
455 render_frame())->render_view()->renderer_preferences(); | 455 render_frame())->render_view()->renderer_preferences(); |
456 return prefs.use_video_overlay_for_embedded_encrypted_video; | 456 return prefs.use_video_overlay_for_embedded_encrypted_video; |
457 } | 457 } |
458 #endif // defined(VIDEO_HOLE) | 458 #endif // defined(VIDEO_HOLE) |
459 | 459 |
460 } // namespace content | 460 } // namespace content |
OLD | NEW |