| Index: media/mojo/services/mojo_cdm_factory_service.cc
|
| diff --git a/media/mojo/services/mojo_cdm_factory_service.cc b/media/mojo/services/mojo_cdm_factory_service.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..629e4c33b9c54dc48a1b73d9b9801e87196c0b0e
|
| --- /dev/null
|
| +++ b/media/mojo/services/mojo_cdm_factory_service.cc
|
| @@ -0,0 +1,31 @@
|
| +// 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/mojo/services/mojo_cdm_factory_service.h"
|
| +
|
| +#include "base/logging.h"
|
| +#include "media/mojo/services/mojo_cdm_service_context.h"
|
| +
|
| +namespace media {
|
| +
|
| +MojoCdmFactoryService::MojoCdmFactoryService(MojoCdmServiceContext* context)
|
| + : context_(context) {
|
| + DCHECK(context_);
|
| +}
|
| +
|
| +MojoCdmFactoryService::~MojoCdmFactoryService() {
|
| +}
|
| +
|
| +void MojoCdmFactoryService::Create(
|
| + const mojo::String& key_system,
|
| + const mojo::String& security_origin,
|
| + int32_t cdm_id,
|
| + mojo::InterfaceRequest<mojo::ContentDecryptionModule> cdm) {
|
| + DVLOG(1) << __FUNCTION__ << ": " << key_system;
|
| + MojoCdmService* cdm_service =
|
| + context_->Create(key_system, security_origin, cdm_id);
|
| + mojo::WeakBindToRequest(cdm_service, &cdm);
|
| +}
|
| +
|
| +} // namespace media
|
|
|