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

Side by Side Diff: content/renderer/media/android/proxy_media_keys.cc

Issue 185993004: Encrypted Media: Confine UUID code to MediaDrmBridge. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated tests Created 6 years, 9 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 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/proxy_media_keys.h" 5 #include "content/renderer/media/android/proxy_media_keys.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 19 matching lines...) Expand all
30 session_error_cb_(session_error_cb) { 30 session_error_cb_(session_error_cb) {
31 DCHECK(manager_); 31 DCHECK(manager_);
32 } 32 }
33 33
34 ProxyMediaKeys::~ProxyMediaKeys() { 34 ProxyMediaKeys::~ProxyMediaKeys() {
35 manager_->DestroyCdm(cdm_id_); 35 manager_->DestroyCdm(cdm_id_);
36 } 36 }
37 37
38 void ProxyMediaKeys::InitializeCdm(const std::string& key_system, 38 void ProxyMediaKeys::InitializeCdm(const std::string& key_system,
39 const GURL& frame_url) { 39 const GURL& frame_url) {
40 #if defined(ENABLE_PEPPER_CDMS) 40 #if defined(ENABLE_PEPPER_CDMS)
ddorwin 2014/03/04 20:00:56 Do we need any of these ifdefs? This is only Andro
xhwang 2014/03/05 21:52:33 Done.
41 NOTIMPLEMENTED(); 41 NOTIMPLEMENTED();
42 #elif defined(OS_ANDROID) 42 #elif defined(OS_ANDROID)
43 std::vector<uint8> uuid = GetUUID(key_system); 43 manager_->InitializeCdm(cdm_id_, this, key_system, frame_url);
44 DCHECK(!uuid.empty());
45 manager_->InitializeCdm(cdm_id_, this, uuid, frame_url);
46 #endif 44 #endif
47 } 45 }
48 46
49 bool ProxyMediaKeys::CreateSession(uint32 session_id, 47 bool ProxyMediaKeys::CreateSession(uint32 session_id,
50 const std::string& content_type, 48 const std::string& content_type,
51 const uint8* init_data, 49 const uint8* init_data,
52 int init_data_length) { 50 int init_data_length) {
53 // TODO(xhwang): Move these checks up to blink and DCHECK here. 51 // TODO(xhwang): Move these checks up to blink and DCHECK here.
54 // See http://crbug.com/342510 52 // See http://crbug.com/342510
55 CdmHostMsg_CreateSession_ContentType session_type; 53 CdmHostMsg_CreateSession_ContentType session_type;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 session_closed_cb_.Run(session_id); 109 session_closed_cb_.Run(session_id);
112 } 110 }
113 111
114 void ProxyMediaKeys::OnSessionError(uint32 session_id, 112 void ProxyMediaKeys::OnSessionError(uint32 session_id,
115 media::MediaKeys::KeyError error_code, 113 media::MediaKeys::KeyError error_code,
116 uint32 system_code) { 114 uint32 system_code) {
117 session_error_cb_.Run(session_id, error_code, system_code); 115 session_error_cb_.Run(session_id, error_code, system_code);
118 } 116 }
119 117
120 } // namespace content 118 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698