Commit 7a56b3cd authored by esum's avatar esum Committed by Commit bot

[Chromecast] Add method to CastCdm for the session expiration updating.

Allows derived classes to access/run the SessionExpirationUpdateCB that
gets passed in to Initialize(). This follows the same pattern as the
other session callbacks in CastCdm (OnSessionClosed(),
OnSessionKeysChange()).

BUG=

Review-Url: https://codereview.chromium.org/2847923002
Cr-Commit-Position: refs/heads/master@{#467825}
parent 5c25a63a
......@@ -132,6 +132,11 @@ void CastCdm::OnSessionKeysChange(const std::string& session_id,
player_tracker_impl_->NotifyNewKey();
}
void CastCdm::OnSessionExpirationUpdate(const std::string& session_id,
base::Time new_expiry_time) {
session_expiration_update_cb_.Run(session_id, new_expiry_time);
}
void CastCdm::KeyIdAndKeyPairsToInfo(const ::media::KeyIdAndKeyPairs& keys,
::media::CdmKeysInfo* keys_info) {
DCHECK(keys_info);
......
......@@ -16,6 +16,7 @@
#include "base/memory/ref_counted.h"
#include "base/sequenced_task_runner_helpers.h"
#include "base/threading/thread_checker.h"
#include "base/time/time.h"
#include "chromecast/media/base/media_resource_tracker.h"
#include "chromecast/media/cdm/cast_cdm_context.h"
#include "chromecast/public/media/cast_key_status.h"
......@@ -82,6 +83,8 @@ class CastCdm : public ::media::ContentDecryptionModule {
void OnSessionKeysChange(const std::string& session_id,
bool newly_usable_keys,
::media::CdmKeysInfo keys_info);
void OnSessionExpirationUpdate(const std::string& session_id,
base::Time new_expiry_time);
void KeyIdAndKeyPairsToInfo(const ::media::KeyIdAndKeyPairs& keys,
::media::CdmKeysInfo* key_info);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment