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

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

Issue 1160983002: Allows support for persistent session types in BrowserCdm. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removes session_type TODO Created 5 years, 6 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
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/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "media/base/cdm_key_information.h" 10 #include "media/base/cdm_key_information.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 int BrowserCdmCast::RegisterPlayer(const base::Closure& new_key_cb, 46 int BrowserCdmCast::RegisterPlayer(const base::Closure& new_key_cb,
47 const base::Closure& cdm_unset_cb) { 47 const base::Closure& cdm_unset_cb) {
48 DCHECK(thread_checker_.CalledOnValidThread()); 48 DCHECK(thread_checker_.CalledOnValidThread());
49 return player_tracker_impl_->RegisterPlayer(new_key_cb, cdm_unset_cb); 49 return player_tracker_impl_->RegisterPlayer(new_key_cb, cdm_unset_cb);
50 } 50 }
51 51
52 void BrowserCdmCast::UnregisterPlayer(int registration_id) { 52 void BrowserCdmCast::UnregisterPlayer(int registration_id) {
53 DCHECK(thread_checker_.CalledOnValidThread()); 53 DCHECK(thread_checker_.CalledOnValidThread());
54 player_tracker_impl_->UnregisterPlayer(registration_id); 54 player_tracker_impl_->UnregisterPlayer(registration_id);
55 } 55 }
56 56
ddorwin 2015/05/28 23:51:50 Why are you deleting LoadSession()? This won't com
gunsch 2015/05/28 23:59:12 We have internal implementations that subclass Bro
ddorwin 2015/05/29 02:13:59 Oh, I thought it was possible to build Cast, albei
gunsch 2015/05/29 16:40:10 It is. We don't instantiate any BrowserCdmCast ins
57 void BrowserCdmCast::LoadSession(
58 ::media::MediaKeys::SessionType session_type,
59 const std::string& session_id,
60 scoped_ptr<::media::NewSessionCdmPromise> promise) {
61 NOTREACHED() << "LoadSession not supported";
62 legacy_session_error_cb_.Run(
63 session_id, ::media::MediaKeys::Exception::NOT_SUPPORTED_ERROR, 0,
64 std::string());
65 }
66
67 ::media::CdmContext* BrowserCdmCast::GetCdmContext() { 57 ::media::CdmContext* BrowserCdmCast::GetCdmContext() {
68 NOTREACHED(); 58 NOTREACHED();
69 return nullptr; 59 return nullptr;
70 } 60 }
71 61
72 void BrowserCdmCast::OnSessionMessage(const std::string& session_id, 62 void BrowserCdmCast::OnSessionMessage(const std::string& session_id,
73 const std::vector<uint8_t>& message, 63 const std::vector<uint8_t>& message,
74 const GURL& destination_url) { 64 const GURL& destination_url) {
75 // Note: Message type is not supported in Chromecast. Do our best guess here. 65 // Note: Message type is not supported in Chromecast. Do our best guess here.
76 ::media::MediaKeys::MessageType message_type = 66 ::media::MediaKeys::MessageType message_type =
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 return nullptr; 188 return nullptr;
199 } 189 }
200 190
201 // A default empty implementation for subclasses that don't need to provide 191 // A default empty implementation for subclasses that don't need to provide
202 // any key system specific initialization. 192 // any key system specific initialization.
203 void BrowserCdmCast::InitializeInternal() { 193 void BrowserCdmCast::InitializeInternal() {
204 } 194 }
205 195
206 } // namespace media 196 } // namespace media
207 } // namespace chromecast 197 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698