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

Unified Diff: media/remoting/remoting_cdm_factory.h

Issue 2406483002: WIP - Add EME (Closed)
Patch Set: Rebase. Split RemotingSourceImpl. Addressed comments. Created 4 years, 2 months 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
Index: media/remoting/remoting_cdm_factory.h
diff --git a/media/remoting/remoting_cdm_factory.h b/media/remoting/remoting_cdm_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..033356691967aea17f0f5caf5c89d044531e453c
--- /dev/null
+++ b/media/remoting/remoting_cdm_factory.h
@@ -0,0 +1,41 @@
+// 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_REMOTING_REMOTING_CDM_FACTORY_H_
+#define MEDIA_REMOTING_REMOTING_CDM_FACTORY_H_
+
+#include "media/base/cdm_factory.h"
+#include "media/mojo/interfaces/remoting.mojom.h"
+#include "media/remoting/remoting_cdm_controller.h"
+
+namespace media {
+
+// TODO(xjz): Merge this with Eric's implementation.
+class RemotingCdmFactory : public CdmFactory {
+ public:
+ RemotingCdmFactory(std::unique_ptr<CdmFactory> default_cdm_factory,
miu 2016/10/25 04:21:26 Please add a comment that |remoter_factory| should
xjz 2016/10/26 22:00:26 Done.
+ mojom::RemoterFactory* remoter_factory);
+ ~RemotingCdmFactory() override;
+
+ void Create(const std::string& key_system,
+ const GURL& security_origin,
+ const CdmConfig& cdm_config,
+ const SessionMessageCB& session_message_cb,
+ const SessionClosedCB& session_closed_cb,
+ const SessionKeysChangeCB& session_keys_change_cb,
+ const SessionExpirationUpdateCB& session_expiration_update_cb,
+ const CdmCreatedCB& cdm_created_cb) override;
+
+ private:
+ std::unique_ptr<RemotingCdmController> CreateRemotingController();
+
+ std::unique_ptr<CdmFactory> default_cdm_factory_;
miu 2016/10/25 04:21:26 These should be const.
xjz 2016/10/26 22:00:26 Done.
+ mojom::RemoterFactory* remoter_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(RemotingCdmFactory);
+};
+
+} // namespace media
+
+#endif // MEDIA_REMOTING_REMOTING_CDM_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698