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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 uint32 session_id, | 308 uint32 session_id, |
309 const std::vector<uint8>& message, | 309 const std::vector<uint8>& message, |
310 const GURL& destination_url) { | 310 const GURL& destination_url) { |
311 if (message.size() > kMaxSessionMessageLength) { | 311 if (message.size() > kMaxSessionMessageLength) { |
312 OnSessionError(cdm_id, session_id, media::MediaKeys::kUnknownError, 0); | 312 OnSessionError(cdm_id, session_id, media::MediaKeys::kUnknownError, 0); |
313 return; | 313 return; |
314 } | 314 } |
315 | 315 |
316 ProxyMediaKeys* media_keys = GetMediaKeys(cdm_id); | 316 ProxyMediaKeys* media_keys = GetMediaKeys(cdm_id); |
317 if (media_keys) | 317 if (media_keys) |
318 media_keys->OnSessionMessage(session_id, message, destination_url.spec()); | 318 media_keys->OnSessionMessage(session_id, message, destination_url); |
319 } | 319 } |
320 | 320 |
321 void RendererMediaPlayerManager::OnSessionReady(int cdm_id, uint32 session_id) { | 321 void RendererMediaPlayerManager::OnSessionReady(int cdm_id, uint32 session_id) { |
322 ProxyMediaKeys* media_keys = GetMediaKeys(cdm_id); | 322 ProxyMediaKeys* media_keys = GetMediaKeys(cdm_id); |
323 if (media_keys) | 323 if (media_keys) |
324 media_keys->OnSessionReady(session_id); | 324 media_keys->OnSessionReady(session_id); |
325 } | 325 } |
326 | 326 |
327 void RendererMediaPlayerManager::OnSessionClosed(int cdm_id, | 327 void RendererMediaPlayerManager::OnSessionClosed(int cdm_id, |
328 uint32 session_id) { | 328 uint32 session_id) { |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 | 444 |
445 bool | 445 bool |
446 RendererMediaPlayerManager::ShouldUseVideoOverlayForEmbeddedEncryptedVideo() { | 446 RendererMediaPlayerManager::ShouldUseVideoOverlayForEmbeddedEncryptedVideo() { |
447 const RendererPreferences& prefs = static_cast<RenderViewImpl*>( | 447 const RendererPreferences& prefs = static_cast<RenderViewImpl*>( |
448 render_view())->renderer_preferences(); | 448 render_view())->renderer_preferences(); |
449 return prefs.use_video_overlay_for_embedded_encrypted_video; | 449 return prefs.use_video_overlay_for_embedded_encrypted_video; |
450 } | 450 } |
451 #endif // defined(VIDEO_HOLE) | 451 #endif // defined(VIDEO_HOLE) |
452 | 452 |
453 } // namespace content | 453 } // namespace content |
OLD | NEW |