Index: media/remoting/remoting_cdm_factory.h |
diff --git a/media/base/android/android_cdm_factory.h b/media/remoting/remoting_cdm_factory.h |
similarity index 38% |
copy from media/base/android/android_cdm_factory.h |
copy to media/remoting/remoting_cdm_factory.h |
index 98eaa342e65b0a5ff591c4d01b7aecf73fb7a32a..e9928a5fcc986e9c74b04c107ef7fe5dfe7f9b15 100644 |
--- a/media/base/android/android_cdm_factory.h |
+++ b/media/remoting/remoting_cdm_factory.h |
@@ -1,25 +1,24 @@ |
-// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Copyright 2016 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_BASE_ANDROID_ANDROID_CDM_FACTORY_H_ |
-#define MEDIA_BASE_ANDROID_ANDROID_CDM_FACTORY_H_ |
+#ifndef MEDIA_REMOTING_REMOTING_CDM_FACTORY_H_ |
+#define MEDIA_REMOTING_REMOTING_CDM_FACTORY_H_ |
-#include "base/macros.h" |
-#include "media/base/android/provision_fetcher.h" |
#include "media/base/cdm_factory.h" |
-#include "media/base/media_export.h" |
+#include "media/mojo/interfaces/remoting.mojom.h" |
+#include "media/remoting/remoting_cdm_controller.h" |
namespace media { |
-struct CdmConfig; |
- |
-class MEDIA_EXPORT AndroidCdmFactory : public CdmFactory { |
+// TODO(xjz): Merge this with Eric's implementation. |
+class RemotingCdmFactory : public CdmFactory { |
public: |
- AndroidCdmFactory(const CreateFetcherCB& create_fetcher_cb); |
- ~AndroidCdmFactory() final; |
+ // |remoter_factory| is expected to outlive this class. |
+ RemotingCdmFactory(std::unique_ptr<CdmFactory> default_cdm_factory, |
+ mojom::RemoterFactory* remoter_factory); |
+ ~RemotingCdmFactory() override; |
- // CdmFactory implementation. |
void Create(const std::string& key_system, |
const GURL& security_origin, |
const CdmConfig& cdm_config, |
@@ -27,14 +26,17 @@ class MEDIA_EXPORT AndroidCdmFactory : public CdmFactory { |
const SessionClosedCB& session_closed_cb, |
const SessionKeysChangeCB& session_keys_change_cb, |
const SessionExpirationUpdateCB& session_expiration_update_cb, |
- const CdmCreatedCB& cdm_created_cb) final; |
+ const CdmCreatedCB& cdm_created_cb) override; |
private: |
- CreateFetcherCB create_fetcher_cb_; |
+ std::unique_ptr<RemotingCdmController> CreateRemotingController(); |
+ |
+ const std::unique_ptr<CdmFactory> default_cdm_factory_; |
+ mojom::RemoterFactory* const remoter_factory_; // Outlives this class. |
- DISALLOW_COPY_AND_ASSIGN(AndroidCdmFactory); |
+ DISALLOW_COPY_AND_ASSIGN(RemotingCdmFactory); |
}; |
} // namespace media |
-#endif // MEDIA_BASE_ANDROID_ANDROID_CDM_FACTORY_H_ |
+#endif // MEDIA_REMOTING_REMOTING_CDM_FACTORY_H_ |