OLD | NEW |
---|---|
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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
10 #include "media/base/cdm_key_information.h" | 10 #include "media/base/cdm_key_information.h" |
(...skipping 21 matching lines...) Expand all Loading... | |
32 const ::media::SessionExpirationUpdateCB& session_expiration_update_cb) { | 32 const ::media::SessionExpirationUpdateCB& session_expiration_update_cb) { |
33 DCHECK(thread_checker_.CalledOnValidThread()); | 33 DCHECK(thread_checker_.CalledOnValidThread()); |
34 | 34 |
35 player_tracker_impl_.reset(new ::media::PlayerTrackerImpl); | 35 player_tracker_impl_.reset(new ::media::PlayerTrackerImpl); |
36 | 36 |
37 session_message_cb_ = session_message_cb; | 37 session_message_cb_ = session_message_cb; |
38 session_closed_cb_ = session_closed_cb; | 38 session_closed_cb_ = session_closed_cb; |
39 legacy_session_error_cb_ = legacy_session_error_cb; | 39 legacy_session_error_cb_ = legacy_session_error_cb; |
40 session_keys_change_cb_ = session_keys_change_cb; | 40 session_keys_change_cb_ = session_keys_change_cb; |
41 session_expiration_update_cb_ = session_expiration_update_cb; | 41 session_expiration_update_cb_ = session_expiration_update_cb; |
42 | |
43 InitializeInternal(); | |
42 } | 44 } |
43 | 45 |
44 int BrowserCdmCast::RegisterPlayer(const base::Closure& new_key_cb, | 46 int BrowserCdmCast::RegisterPlayer(const base::Closure& new_key_cb, |
45 const base::Closure& cdm_unset_cb) { | 47 const base::Closure& cdm_unset_cb) { |
46 DCHECK(thread_checker_.CalledOnValidThread()); | 48 DCHECK(thread_checker_.CalledOnValidThread()); |
47 return player_tracker_impl_->RegisterPlayer(new_key_cb, cdm_unset_cb); | 49 return player_tracker_impl_->RegisterPlayer(new_key_cb, cdm_unset_cb); |
48 } | 50 } |
49 | 51 |
50 void BrowserCdmCast::UnregisterPlayer(int registration_id) { | 52 void BrowserCdmCast::UnregisterPlayer(int registration_id) { |
51 DCHECK(thread_checker_.CalledOnValidThread()); | 53 DCHECK(thread_checker_.CalledOnValidThread()); |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
191 scoped_ptr<::media::SimpleCdmPromise> promise) { | 193 scoped_ptr<::media::SimpleCdmPromise> promise) { |
192 DCHECK(thread_checker_.CalledOnValidThread()); | 194 DCHECK(thread_checker_.CalledOnValidThread()); |
193 FORWARD_ON_CDM_THREAD(RemoveSession, session_id, base::Passed(&promise)); | 195 FORWARD_ON_CDM_THREAD(RemoveSession, session_id, base::Passed(&promise)); |
194 } | 196 } |
195 | 197 |
196 ::media::CdmContext* BrowserCdmCastUi::GetCdmContext() { | 198 ::media::CdmContext* BrowserCdmCastUi::GetCdmContext() { |
197 NOTREACHED(); | 199 NOTREACHED(); |
198 return nullptr; | 200 return nullptr; |
199 } | 201 } |
200 | 202 |
203 // A default empty implementation for subclasses that don't need to any | |
gunsch-google
2015/05/15 17:48:26
missing a word: "don't need to any"
lcwu1
2015/05/15 18:01:20
Done.
| |
204 // key system specific initialization. | |
gunsch-google
2015/05/15 17:48:27
style nit: method comments go with declaration, no
lcwu1
2015/05/15 18:01:20
There is already a function comment in the declara
| |
205 void BrowserCdmCast::InitializeInternal() { | |
206 } | |
207 | |
201 } // namespace media | 208 } // namespace media |
202 } // namespace chromecast | 209 } // namespace chromecast |
OLD | NEW |