Commit f440ca2e authored by xhwang's avatar xhwang Committed by Commit bot

Move CdmResultPromise to media/blink.

BUG=422730

Review URL: https://codereview.chromium.org/651113002

Cr-Commit-Position: refs/heads/master@{#299912}
parent cf850d36
......@@ -246,8 +246,6 @@
'renderer/media/audio_message_filter.h',
'renderer/media/audio_renderer_mixer_manager.cc',
'renderer/media/audio_renderer_mixer_manager.h',
'renderer/media/cdm_result_promise.cc',
'renderer/media/cdm_result_promise.h',
'renderer/media/cdm_session_adapter.cc',
'renderer/media/cdm_session_adapter.h',
'renderer/media/crypto/content_decryption_module_factory.cc',
......
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/renderer/media/cdm_result_promise.h"
#include "base/logging.h"
#include "base/metrics/histogram.h"
#include "third_party/WebKit/public/platform/WebString.h"
namespace content {
namespace {
// A superset of media::MediaKeys::Exception for UMA reporting. These values
// should never be changed as it will affect existing reporting, and must match
// the values for CdmPromiseResult in tools/metrics/histograms/histograms.xml.
enum ResultCodeForUMA {
SUCCESS = 0,
NOT_SUPPORTED_ERROR = 1,
INVALID_STATE_ERROR = 2,
INVALID_ACCESS_ERROR = 3,
QUOTA_EXCEEDED_ERROR = 4,
UNKNOWN_ERROR = 5,
CLIENT_ERROR = 6,
OUTPUT_ERROR = 7,
NUM_RESULT_CODES
};
static blink::WebContentDecryptionModuleException ConvertException(
media::MediaKeys::Exception exception_code) {
switch (exception_code) {
case media::MediaKeys::NOT_SUPPORTED_ERROR:
return blink::WebContentDecryptionModuleExceptionNotSupportedError;
case media::MediaKeys::INVALID_STATE_ERROR:
return blink::WebContentDecryptionModuleExceptionInvalidStateError;
case media::MediaKeys::INVALID_ACCESS_ERROR:
return blink::WebContentDecryptionModuleExceptionInvalidAccessError;
case media::MediaKeys::QUOTA_EXCEEDED_ERROR:
return blink::WebContentDecryptionModuleExceptionQuotaExceededError;
case media::MediaKeys::UNKNOWN_ERROR:
return blink::WebContentDecryptionModuleExceptionUnknownError;
case media::MediaKeys::CLIENT_ERROR:
return blink::WebContentDecryptionModuleExceptionClientError;
case media::MediaKeys::OUTPUT_ERROR:
return blink::WebContentDecryptionModuleExceptionOutputError;
}
NOTREACHED();
return blink::WebContentDecryptionModuleExceptionUnknownError;
}
static ResultCodeForUMA ConvertExceptionToUMAResult(
media::MediaKeys::Exception exception_code) {
switch (exception_code) {
case media::MediaKeys::NOT_SUPPORTED_ERROR:
return NOT_SUPPORTED_ERROR;
case media::MediaKeys::INVALID_STATE_ERROR:
return INVALID_STATE_ERROR;
case media::MediaKeys::INVALID_ACCESS_ERROR:
return INVALID_ACCESS_ERROR;
case media::MediaKeys::QUOTA_EXCEEDED_ERROR:
return QUOTA_EXCEEDED_ERROR;
case media::MediaKeys::UNKNOWN_ERROR:
return UNKNOWN_ERROR;
case media::MediaKeys::CLIENT_ERROR:
return CLIENT_ERROR;
case media::MediaKeys::OUTPUT_ERROR:
return OUTPUT_ERROR;
}
NOTREACHED();
return UNKNOWN_ERROR;
}
static void ReportUMA(std::string uma_name, ResultCodeForUMA result) {
if (uma_name.empty())
return;
base::LinearHistogram::FactoryGet(
uma_name,
1,
NUM_RESULT_CODES,
NUM_RESULT_CODES + 1,
base::HistogramBase::kUmaTargetedHistogramFlag)->Add(result);
}
} // namespace
template <typename... T>
CdmResultPromise<T...>::CdmResultPromise(
const blink::WebContentDecryptionModuleResult& result,
const std::string& uma_name)
: web_cdm_result_(result), uma_name_(uma_name) {
}
template <typename... T>
CdmResultPromise<T...>::~CdmResultPromise() {
}
template <>
void CdmResultPromise<>::resolve() {
MarkPromiseSettled();
ReportUMA(uma_name_, SUCCESS);
web_cdm_result_.complete();
}
template <>
void CdmResultPromise<media::KeyIdsVector>::resolve(
const media::KeyIdsVector& result) {
// TODO(jrummell): Update blink::WebContentDecryptionModuleResult to
// handle the set of keys.
reject(media::MediaKeys::NOT_SUPPORTED_ERROR, 0, "Not implemented.");
}
template <typename... T>
void CdmResultPromise<T...>::reject(media::MediaKeys::Exception exception_code,
uint32 system_code,
const std::string& error_message) {
MarkPromiseSettled();
ReportUMA(uma_name_, ConvertExceptionToUMAResult(exception_code));
web_cdm_result_.completeWithError(ConvertException(exception_code),
system_code,
blink::WebString::fromUTF8(error_message));
}
NewSessionCdmResultPromise::NewSessionCdmResultPromise(
const blink::WebContentDecryptionModuleResult& result,
const std::string& uma_name,
const SessionInitializedCB& new_session_created_cb)
: web_cdm_result_(result),
uma_name_(uma_name),
new_session_created_cb_(new_session_created_cb) {
}
NewSessionCdmResultPromise::~NewSessionCdmResultPromise() {
}
void NewSessionCdmResultPromise::resolve(const std::string& web_session_id) {
MarkPromiseSettled();
ReportUMA(uma_name_, SUCCESS);
blink::WebContentDecryptionModuleResult::SessionStatus status =
new_session_created_cb_.Run(web_session_id);
web_cdm_result_.completeWithSession(status);
}
void NewSessionCdmResultPromise::reject(
media::MediaKeys::Exception exception_code,
uint32 system_code,
const std::string& error_message) {
MarkPromiseSettled();
ReportUMA(uma_name_, ConvertExceptionToUMAResult(exception_code));
web_cdm_result_.completeWithError(ConvertException(exception_code),
system_code,
blink::WebString::fromUTF8(error_message));
}
// Explicit template instantiation for the templates needed.
template class CdmResultPromise<>;
template class CdmResultPromise<media::KeyIdsVector>;
} // namespace content
......@@ -12,12 +12,12 @@
#include "base/logging.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "content/renderer/media/cdm_result_promise.h"
#include "content/renderer/media/cdm_session_adapter.h"
#include "content/renderer/media/crypto/key_systems.h"
#include "content/renderer/media/webcontentdecryptionmodulesession_impl.h"
#include "media/base/cdm_promise.h"
#include "media/base/media_keys.h"
#include "media/blink/cdm_result_promise.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/web/WebSecurityOrigin.h"
#include "url/gurl.h"
......@@ -109,7 +109,7 @@ void WebContentDecryptionModuleImpl::setServerCertificate(
server_certificate,
server_certificate_length,
scoped_ptr<media::SimpleCdmPromise>(
new CdmResultPromise<>(result, std::string())));
new media::CdmResultPromise<>(result, std::string())));
}
media::Decryptor* WebContentDecryptionModuleImpl::GetDecryptor() {
......
......@@ -9,9 +9,11 @@
#include "base/logging.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "content/renderer/media/cdm_result_promise.h"
#include "content/renderer/media/cdm_session_adapter.h"
#include "media/base/cdm_promise.h"
#include "media/base/media_keys.h"
#include "media/blink/cdm_result_promise.h"
#include "media/blink/new_session_cdm_result_promise.h"
#include "third_party/WebKit/public/platform/WebURL.h"
namespace content {
......@@ -91,12 +93,13 @@ void WebContentDecryptionModuleSessionImpl::initializeNewSession(
init_data,
init_data_length,
media::MediaKeys::TEMPORARY_SESSION,
scoped_ptr<media::NewSessionCdmPromise>(new NewSessionCdmResultPromise(
result,
adapter_->GetKeySystemUMAPrefix() + kCreateSessionUMAName,
base::Bind(
&WebContentDecryptionModuleSessionImpl::OnSessionInitialized,
base::Unretained(this)))));
scoped_ptr<media::NewSessionCdmPromise>(
new media::NewSessionCdmResultPromise(
result,
adapter_->GetKeySystemUMAPrefix() + kCreateSessionUMAName,
base::Bind(
&WebContentDecryptionModuleSessionImpl::OnSessionInitialized,
base::Unretained(this)))));
}
void WebContentDecryptionModuleSessionImpl::load(
......@@ -107,12 +110,13 @@ void WebContentDecryptionModuleSessionImpl::load(
adapter_->LoadSession(
base::UTF16ToASCII(session_id),
scoped_ptr<media::NewSessionCdmPromise>(new NewSessionCdmResultPromise(
result,
adapter_->GetKeySystemUMAPrefix() + kLoadSessionUMAName,
base::Bind(
&WebContentDecryptionModuleSessionImpl::OnSessionInitialized,
base::Unretained(this)))));
scoped_ptr<media::NewSessionCdmPromise>(
new media::NewSessionCdmResultPromise(
result,
adapter_->GetKeySystemUMAPrefix() + kLoadSessionUMAName,
base::Bind(
&WebContentDecryptionModuleSessionImpl::OnSessionInitialized,
base::Unretained(this)))));
}
void WebContentDecryptionModuleSessionImpl::update(
......@@ -121,27 +125,30 @@ void WebContentDecryptionModuleSessionImpl::update(
blink::WebContentDecryptionModuleResult result) {
DCHECK(response);
DCHECK(!web_session_id_.empty());
adapter_->UpdateSession(web_session_id_,
response,
response_length,
scoped_ptr<media::SimpleCdmPromise>(
new CdmResultPromise<>(result, std::string())));
adapter_->UpdateSession(
web_session_id_,
response,
response_length,
scoped_ptr<media::SimpleCdmPromise>(
new media::CdmResultPromise<>(result, std::string())));
}
void WebContentDecryptionModuleSessionImpl::close(
blink::WebContentDecryptionModuleResult result) {
DCHECK(!web_session_id_.empty());
adapter_->CloseSession(web_session_id_,
scoped_ptr<media::SimpleCdmPromise>(
new CdmResultPromise<>(result, std::string())));
adapter_->CloseSession(
web_session_id_,
scoped_ptr<media::SimpleCdmPromise>(
new media::CdmResultPromise<>(result, std::string())));
}
void WebContentDecryptionModuleSessionImpl::remove(
blink::WebContentDecryptionModuleResult result) {
DCHECK(!web_session_id_.empty());
adapter_->RemoveSession(web_session_id_,
scoped_ptr<media::SimpleCdmPromise>(
new CdmResultPromise<>(result, std::string())));
adapter_->RemoveSession(
web_session_id_,
scoped_ptr<media::SimpleCdmPromise>(
new media::CdmResultPromise<>(result, std::string())));
}
void WebContentDecryptionModuleSessionImpl::getUsableKeyIds(
......@@ -150,7 +157,8 @@ void WebContentDecryptionModuleSessionImpl::getUsableKeyIds(
adapter_->GetUsableKeyIds(
web_session_id_,
scoped_ptr<media::KeyIdsPromise>(
new CdmResultPromise<media::KeyIdsVector>(result, std::string())));
new media::CdmResultPromise<media::KeyIdsVector>(result,
std::string())));
}
void WebContentDecryptionModuleSessionImpl::release(
......@@ -181,10 +189,11 @@ void WebContentDecryptionModuleSessionImpl::OnSessionReady() {
}
void WebContentDecryptionModuleSessionImpl::OnSessionClosed() {
if (!is_closed_) {
is_closed_ = true;
client_->close();
}
if (is_closed_)
return;
is_closed_ = true;
client_->close();
}
void WebContentDecryptionModuleSessionImpl::OnSessionError(
......
......@@ -27,10 +27,15 @@ component("blink") {
"buffered_data_source_host_impl.h",
"buffered_resource_loader.cc",
"buffered_resource_loader.h",
"encrypted_media_player_support.cc",
"encrypted_media_player_support.h",
"cache_util.cc",
"cache_util.h",
"cdm_result_promise.h",
"cdm_result_promise_helper.cc",
"cdm_result_promise_helper.h",
"encrypted_media_player_support.cc",
"encrypted_media_player_support.h",
"new_session_cdm_result_promise.cc",
"new_session_cdm_result_promise.h",
"null_encrypted_media_player_support.cc",
"null_encrypted_media_player_support.h",
"texttrack_impl.cc",
......
......@@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_RENDERER_MEDIA_CDM_RESULT_PROMISE_H_
#define CONTENT_RENDERER_MEDIA_CDM_RESULT_PROMISE_H_
#include <map>
#ifndef MEDIA_BLINK_CDM_RESULT_PROMISE_H_
#define MEDIA_BLINK_CDM_RESULT_PROMISE_H_
#include "base/basictypes.h"
#include "media/base/cdm_promise.h"
#include "media/base/media_keys.h"
#include "media/blink/cdm_result_promise_helper.h"
#include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h"
namespace content {
namespace media {
// Used to convert a WebContentDecryptionModuleResult into a CdmPromiseTemplate
// so that it can be passed through Chromium. When resolve(T) is called, the
......@@ -44,41 +44,46 @@ class CdmResultPromise : public media::CdmPromiseTemplate<T...> {
DISALLOW_COPY_AND_ASSIGN(CdmResultPromise);
};
typedef base::Callback<blink::WebContentDecryptionModuleResult::SessionStatus(
const std::string& web_session_id)> SessionInitializedCB;
// Special class for resolving a new session promise. Resolving a new session
// promise returns the session ID (as a string), but the blink promise needs
// to get passed a SessionStatus. This class converts the session id to a
// SessionStatus by calling |new_session_created_cb|.
class NewSessionCdmResultPromise
: public media::CdmPromiseTemplate<std::string> {
public:
NewSessionCdmResultPromise(
const blink::WebContentDecryptionModuleResult& result,
const std::string& uma_name,
const SessionInitializedCB& new_session_created_cb);
virtual ~NewSessionCdmResultPromise();
// CdmPromiseTemplate<T> implementation.
virtual void resolve(const std::string& web_session_id) override;
virtual void reject(media::MediaKeys::Exception exception_code,
uint32 system_code,
const std::string& error_message) override;
private:
blink::WebContentDecryptionModuleResult web_cdm_result_;
// UMA name to report result to.
std::string uma_name_;
// Called on resolve() to convert the session ID into a SessionStatus to
// be reported to blink.
SessionInitializedCB new_session_created_cb_;
DISALLOW_COPY_AND_ASSIGN(NewSessionCdmResultPromise);
};
template <typename... T>
CdmResultPromise<T...>::CdmResultPromise(
const blink::WebContentDecryptionModuleResult& result,
const std::string& uma_name)
: web_cdm_result_(result), uma_name_(uma_name) {
}
} // namespace content
template <typename... T>
CdmResultPromise<T...>::~CdmResultPromise() {
}
// "inline" is needed to prevent multiple definition error.
template <>
inline void CdmResultPromise<>::resolve() {
MarkPromiseSettled();
ReportCdmResultUMA(uma_name_, SUCCESS);
web_cdm_result_.complete();
}
template <>
inline void CdmResultPromise<media::KeyIdsVector>::resolve(
const media::KeyIdsVector& result) {
// TODO(jrummell): Update blink::WebContentDecryptionModuleResult to
// handle the set of keys.
reject(media::MediaKeys::NOT_SUPPORTED_ERROR, 0, "Not implemented.");
}
#endif // CONTENT_RENDERER_MEDIA_CDM_RESULT_PROMISE_H_
template <typename... T>
void CdmResultPromise<T...>::reject(media::MediaKeys::Exception exception_code,
uint32 system_code,
const std::string& error_message) {
MarkPromiseSettled();
ReportCdmResultUMA(uma_name_,
ConvertCdmExceptionToResultForUMA(exception_code));
web_cdm_result_.completeWithError(ConvertCdmException(exception_code),
system_code,
blink::WebString::fromUTF8(error_message));
}
} // namespace media
#endif // MEDIA_BLINK_CDM_RESULT_PROMISE_H_
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/cdm_result_promise_helper.h"
#include "base/logging.h"
#include "base/metrics/histogram.h"
namespace media {
CdmResultForUMA ConvertCdmExceptionToResultForUMA(
MediaKeys::Exception exception_code) {
switch (exception_code) {
case MediaKeys::NOT_SUPPORTED_ERROR:
return NOT_SUPPORTED_ERROR;
case MediaKeys::INVALID_STATE_ERROR:
return INVALID_STATE_ERROR;
case MediaKeys::INVALID_ACCESS_ERROR:
return INVALID_ACCESS_ERROR;
case MediaKeys::QUOTA_EXCEEDED_ERROR:
return QUOTA_EXCEEDED_ERROR;
case MediaKeys::UNKNOWN_ERROR:
return UNKNOWN_ERROR;
case MediaKeys::CLIENT_ERROR:
return CLIENT_ERROR;
case MediaKeys::OUTPUT_ERROR:
return OUTPUT_ERROR;
}
NOTREACHED();
return UNKNOWN_ERROR;
}
blink::WebContentDecryptionModuleException ConvertCdmException(
MediaKeys::Exception exception_code) {
switch (exception_code) {
case MediaKeys::NOT_SUPPORTED_ERROR:
return blink::WebContentDecryptionModuleExceptionNotSupportedError;
case MediaKeys::INVALID_STATE_ERROR:
return blink::WebContentDecryptionModuleExceptionInvalidStateError;
case MediaKeys::INVALID_ACCESS_ERROR:
return blink::WebContentDecryptionModuleExceptionInvalidAccessError;
case MediaKeys::QUOTA_EXCEEDED_ERROR:
return blink::WebContentDecryptionModuleExceptionQuotaExceededError;
case MediaKeys::UNKNOWN_ERROR:
return blink::WebContentDecryptionModuleExceptionUnknownError;
case MediaKeys::CLIENT_ERROR:
return blink::WebContentDecryptionModuleExceptionClientError;
case MediaKeys::OUTPUT_ERROR:
return blink::WebContentDecryptionModuleExceptionOutputError;
}
NOTREACHED();
return blink::WebContentDecryptionModuleExceptionUnknownError;
}
void ReportCdmResultUMA(const std::string& uma_name, CdmResultForUMA result) {
if (uma_name.empty())
return;
base::LinearHistogram::FactoryGet(
uma_name,
1,
NUM_RESULT_CODES,
NUM_RESULT_CODES + 1,
base::HistogramBase::kUmaTargetedHistogramFlag)->Add(result);
}
} // namespace media
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_CDM_RESULT_PROMISE_HELPER_H_
#define MEDIA_BLINK_CDM_RESULT_PROMISE_HELPER_H_
#include <string>
#include "media/base/media_export.h"
#include "media/base/media_keys.h"
#include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h"
namespace media {
// A superset of media::MediaKeys::Exception for UMA reporting. These values
// should never be changed as it will affect existing reporting, and must match
// the values for CdmPromiseResult in tools/metrics/histograms/histograms.xml.
enum CdmResultForUMA {
SUCCESS = 0,
NOT_SUPPORTED_ERROR = 1,
INVALID_STATE_ERROR = 2,
INVALID_ACCESS_ERROR = 3,
QUOTA_EXCEEDED_ERROR = 4,
UNKNOWN_ERROR = 5,
CLIENT_ERROR = 6,
OUTPUT_ERROR = 7,
NUM_RESULT_CODES
};
MEDIA_EXPORT CdmResultForUMA
ConvertCdmExceptionToResultForUMA(MediaKeys::Exception exception_code);
MEDIA_EXPORT blink::WebContentDecryptionModuleException ConvertCdmException(
MediaKeys::Exception exception_code);
MEDIA_EXPORT void ReportCdmResultUMA(const std::string& uma_name,
CdmResultForUMA result);
} // namespace media
#endif // MEDIA_BLINK_CDM_RESULT_PROMISE_HELPER_H_
......@@ -32,10 +32,15 @@
'buffered_data_source_host_impl.h',
'buffered_resource_loader.cc',
'buffered_resource_loader.h',
'encrypted_media_player_support.cc',
'encrypted_media_player_support.h',
'cache_util.cc',
'cache_util.h',
'cdm_result_promise.h',
'cdm_result_promise_helper.cc',
'cdm_result_promise_helper.h',
'encrypted_media_player_support.cc',
'encrypted_media_player_support.h',
'new_session_cdm_result_promise.cc',
'new_session_cdm_result_promise.h',
'null_encrypted_media_player_support.cc',
'null_encrypted_media_player_support.h',
'texttrack_impl.cc',
......
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/new_session_cdm_result_promise.h"
#include "base/logging.h"
#include "media/blink/cdm_result_promise_helper.h"
#include "third_party/WebKit/public/platform/WebString.h"
namespace media {
NewSessionCdmResultPromise::NewSessionCdmResultPromise(
const blink::WebContentDecryptionModuleResult& result,
const std::string& uma_name,
const SessionInitializedCB& new_session_created_cb)
: web_cdm_result_(result),
uma_name_(uma_name),
new_session_created_cb_(new_session_created_cb) {
}
NewSessionCdmResultPromise::~NewSessionCdmResultPromise() {
}
void NewSessionCdmResultPromise::resolve(const std::string& web_session_id) {
MarkPromiseSettled();
ReportCdmResultUMA(uma_name_, SUCCESS);
blink::WebContentDecryptionModuleResult::SessionStatus status =
new_session_created_cb_.Run(web_session_id);
web_cdm_result_.completeWithSession(status);
}
void NewSessionCdmResultPromise::reject(MediaKeys::Exception exception_code,
uint32 system_code,
const std::string& error_message) {
MarkPromiseSettled();
ReportCdmResultUMA(uma_name_,
ConvertCdmExceptionToResultForUMA(exception_code));
web_cdm_result_.completeWithError(ConvertCdmException(exception_code),
system_code,
blink::WebString::fromUTF8(error_message));
}
} // namespace media
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_NEW_SESSION_CDM_RESULT_PROMISE_H_
#define MEDIA_BLINK_NEW_SESSION_CDM_RESULT_PROMISE_H_
#include <string>
#include "base/basictypes.h"
#include "media/base/cdm_promise.h"
#include "media/base/media_export.h"
#include "media/base/media_keys.h"
#include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h"
namespace media {
typedef base::Callback<blink::WebContentDecryptionModuleResult::SessionStatus(
const std::string& web_session_id)> SessionInitializedCB;
// Special class for resolving a new session promise. Resolving a new session
// promise returns the session ID (as a string), but the blink promise needs
// to get passed a SessionStatus. This class converts the session id to a
// SessionStatus by calling |new_session_created_cb|.
class MEDIA_EXPORT NewSessionCdmResultPromise
: public CdmPromiseTemplate<std::string> {
public:
NewSessionCdmResultPromise(
const blink::WebContentDecryptionModuleResult& result,
const std::string& uma_name,
const SessionInitializedCB& new_session_created_cb);
virtual ~NewSessionCdmResultPromise();
// CdmPromiseTemplate<T> implementation.
virtual void resolve(const std::string& web_session_id) override;
virtual void reject(MediaKeys::Exception exception_code,
uint32 system_code,
const std::string& error_message) override;
private:
blink::WebContentDecryptionModuleResult web_cdm_result_;
// UMA name to report result to.
std::string uma_name_;
// Called on resolve() to convert the session ID into a SessionStatus to
// be reported to blink.
SessionInitializedCB new_session_created_cb_;
DISALLOW_COPY_AND_ASSIGN(NewSessionCdmResultPromise);
};
} // namespace media
#endif // MEDIA_BLINK_NEW_SESSION_CDM_RESULT_PROMISE_H_
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