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

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: rebase conflicts with https://codereview.chromium.org/1166453002 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
« no previous file with comments | « chromecast/media/cdm/browser_cdm_cast.h ('k') | chromecast/renderer/key_systems_cast.cc » ('j') | 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/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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
« no previous file with comments | « chromecast/media/cdm/browser_cdm_cast.h ('k') | chromecast/renderer/key_systems_cast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698