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

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

Issue 1124073006: Make BrowserCdmCast::Initialize() a virtual function so that a subclass can override the initializa… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comment Created 5 years, 7 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 "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
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
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 provide
204 // any key system specific initialization.
205 void BrowserCdmCast::InitializeInternal() {
206 }
207
201 } // namespace media 208 } // namespace media
202 } // namespace chromecast 209 } // 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