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

Side by Side Diff: chromecast/media/cdm/browser_cdm_cast.cc

Issue 984693002: Chromecast: implement other MediaKeys interfaces in BrowserCdmCast. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change to NOTREACHED Created 5 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
« no previous file with comments | « chromecast/media/cdm/browser_cdm_cast.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chromecast/media/cdm/browser_cdm_cast.h" 5 #include "chromecast/media/cdm/browser_cdm_cast.h"
6 6
7 #include "media/base/cdm_key_information.h" 7 #include "media/base/cdm_key_information.h"
8 8
9 namespace chromecast { 9 namespace chromecast {
10 namespace media { 10 namespace media {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 51
52 void BrowserCdmCast::UnregisterPlayer(int registration_id) { 52 void BrowserCdmCast::UnregisterPlayer(int registration_id) {
53 base::AutoLock auto_lock(callback_lock_); 53 base::AutoLock auto_lock(callback_lock_);
54 DCHECK(ContainsKey(new_key_callbacks_, registration_id)); 54 DCHECK(ContainsKey(new_key_callbacks_, registration_id));
55 DCHECK(ContainsKey(cdm_unset_callbacks_, registration_id)); 55 DCHECK(ContainsKey(cdm_unset_callbacks_, registration_id));
56 new_key_callbacks_.erase(registration_id); 56 new_key_callbacks_.erase(registration_id);
57 cdm_unset_callbacks_.erase(registration_id); 57 cdm_unset_callbacks_.erase(registration_id);
58 } 58 }
59 59
60 void BrowserCdmCast::LoadSession(
61 ::media::MediaKeys::SessionType session_type,
62 const std::string& session_id,
63 scoped_ptr<::media::NewSessionCdmPromise> promise) {
64 NOTREACHED() << "LoadSession not supported";
65 session_error_cb_.Run(session_id,
66 ::media::MediaKeys::Exception::NOT_SUPPORTED_ERROR,
67 0,
68 std::string());
69 }
70
71 ::media::CdmContext* BrowserCdmCast::GetCdmContext() {
72 NOTREACHED();
73 return nullptr;
74 }
75
60 void BrowserCdmCast::OnSessionMessage(const std::string& session_id, 76 void BrowserCdmCast::OnSessionMessage(const std::string& session_id,
61 const std::vector<uint8>& message, 77 const std::vector<uint8>& message,
62 const GURL& destination_url) { 78 const GURL& destination_url) {
63 // Note: Message type is not supported in Chromecast. Do our best guess here. 79 // Note: Message type is not supported in Chromecast. Do our best guess here.
64 ::media::MediaKeys::MessageType message_type = 80 ::media::MediaKeys::MessageType message_type =
65 destination_url.is_empty() ? ::media::MediaKeys::LICENSE_REQUEST 81 destination_url.is_empty() ? ::media::MediaKeys::LICENSE_REQUEST
66 : ::media::MediaKeys::LICENSE_RENEWAL; 82 : ::media::MediaKeys::LICENSE_RENEWAL;
67 session_message_cb_.Run(session_id, 83 session_message_cb_.Run(session_id,
68 message_type, 84 message_type,
69 message, 85 message,
(...skipping 21 matching lines...) Expand all
91 base::AutoLock auto_lock(callback_lock_); 107 base::AutoLock auto_lock(callback_lock_);
92 for (std::map<uint32_t, base::Closure>::const_iterator it = 108 for (std::map<uint32_t, base::Closure>::const_iterator it =
93 new_key_callbacks_.begin(); it != new_key_callbacks_.end(); ++it) { 109 new_key_callbacks_.begin(); it != new_key_callbacks_.end(); ++it) {
94 it->second.Run(); 110 it->second.Run();
95 } 111 }
96 } 112 }
97 } 113 }
98 114
99 } // namespace media 115 } // namespace media
100 } // namespace chromecast 116 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/media/cdm/browser_cdm_cast.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698