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

Unified Diff: media/mojo/services/android_mojo_media_client.cc

Issue 1427183002: Move MediaDrmBridge provision communication to native side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reformatted media/ Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/media.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/android_mojo_media_client.cc
diff --git a/media/mojo/services/android_mojo_media_client.cc b/media/mojo/services/android_mojo_media_client.cc
index a5ee93af306779348bbc880e81c734ba3cfec27a..8bc09e108bd4f10f1044a88376324fcb01eeb846 100644
--- a/media/mojo/services/android_mojo_media_client.cc
+++ b/media/mojo/services/android_mojo_media_client.cc
@@ -6,17 +6,40 @@
#include "base/memory/scoped_ptr.h"
#include "media/base/android/android_cdm_factory.h"
+#include "media/base/bind_to_current_loop.h"
#include "media/base/media.h"
namespace media {
namespace internal {
+namespace {
+
+// A temporary solution until we pass the proper CDM provision fetcher.
+class DummyProvisionFetcher : public ProvisionFetcher {
+ public:
+ DummyProvisionFetcher() {}
+ ~DummyProvisionFetcher() final {}
+
+ // Retrieve() always fails for this fetcher.
+ void Retrieve(const std::string& default_url,
+ const std::string& request_data,
+ const ResponseCB& response_cb) final {
+ BindToCurrentLoop(response_cb).Run(false, "");
+ };
+};
+
+scoped_ptr<ProvisionFetcher> CreateDummyProvisionFetcher() {
+ return make_scoped_ptr(new DummyProvisionFetcher());
+}
+
+} // namespace (anonymous)
class AndroidMojoMediaClient : public PlatformMojoMediaClient {
public:
AndroidMojoMediaClient() {}
scoped_ptr<CdmFactory> CreateCdmFactory() override {
- return make_scoped_ptr(new AndroidCdmFactory());
+ return make_scoped_ptr(
+ new AndroidCdmFactory(base::Bind(&CreateDummyProvisionFetcher)));
}
private:
« no previous file with comments | « media/media.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698