media: Add MojoCdmFactory and enable mojo CDM creation.
commit03a88dd00ad0da2af69e2ce2ff4c0f9246d55c49
authorxhwang <xhwang@chromium.org>
Tue, 23 Jun 2015 07:38:57 +0000 (23 00:38 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 23 Jun 2015 07:39:41 +0000 (23 07:39 +0000)
tree4feb23331ad7754a9ba825b9d73cf38e90917e67
parent2dad8077d9346332cf9853710b08223d6f7de19c
media: Add MojoCdmFactory and enable mojo CDM creation.

- Add MojoCdmFactory, the CdmFactory that supports MojoCdm.
- Add Initialize() call on the mojo ContentDecryptionModule interface. This call
  takes a callback, so that we can make sure the remote CDM is successfully
  created. This is similar to what we are doing in ProxyMediaKeys.
- MojoCdmService is owned by the pipe instead of by the "context". This looks
  more natural and simplifies many code.

TBR=ddorwin@chromium.org
BUG=432998
TEST=Manually tested with the next CL on a local test page that uses Clear Key
key system.

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

Cr-Commit-Position: refs/heads/master@{#335642}
13 files changed:
components/html_viewer/media_factory.cc
media/mojo/interfaces/content_decryption_module.mojom
media/mojo/services/BUILD.gn
media/mojo/services/mojo_cdm.cc
media/mojo/services/mojo_cdm.h
media/mojo/services/mojo_cdm_factory.cc [new file with mode: 0644]
media/mojo/services/mojo_cdm_factory.h [new file with mode: 0644]
media/mojo/services/mojo_cdm_service.cc
media/mojo/services/mojo_cdm_service.h
media/mojo/services/mojo_cdm_service_context.cc
media/mojo/services/mojo_cdm_service_context.h
media/mojo/services/mojo_media_application.cc
media/mojo/services/mojo_media_application.h