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

Side by Side Diff: media/remoting/remoting_cdm_factory.h

Issue 2406483002: WIP - Add EME (Closed)
Patch Set: Addressed miu's comments. Added more tests. Created 4 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 unified diff | Download patch
« no previous file with comments | « media/remoting/remoting_cdm_controller.cc ('k') | media/remoting/remoting_cdm_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_BASE_ANDROID_ANDROID_CDM_FACTORY_H_ 5 #ifndef MEDIA_REMOTING_REMOTING_CDM_FACTORY_H_
6 #define MEDIA_BASE_ANDROID_ANDROID_CDM_FACTORY_H_ 6 #define MEDIA_REMOTING_REMOTING_CDM_FACTORY_H_
7 7
8 #include "base/macros.h"
9 #include "media/base/android/provision_fetcher.h"
10 #include "media/base/cdm_factory.h" 8 #include "media/base/cdm_factory.h"
11 #include "media/base/media_export.h" 9 #include "media/mojo/interfaces/remoting.mojom.h"
10 #include "media/remoting/remoting_cdm_controller.h"
12 11
13 namespace media { 12 namespace media {
14 13
15 struct CdmConfig; 14 // TODO(xjz): Merge this with Eric's implementation.
15 class RemotingCdmFactory : public CdmFactory {
16 public:
17 // |remoter_factory| is expected to outlive this class.
18 RemotingCdmFactory(std::unique_ptr<CdmFactory> default_cdm_factory,
19 mojom::RemoterFactory* remoter_factory);
20 ~RemotingCdmFactory() override;
16 21
17 class MEDIA_EXPORT AndroidCdmFactory : public CdmFactory {
18 public:
19 AndroidCdmFactory(const CreateFetcherCB& create_fetcher_cb);
20 ~AndroidCdmFactory() final;
21
22 // CdmFactory implementation.
23 void Create(const std::string& key_system, 22 void Create(const std::string& key_system,
24 const GURL& security_origin, 23 const GURL& security_origin,
25 const CdmConfig& cdm_config, 24 const CdmConfig& cdm_config,
26 const SessionMessageCB& session_message_cb, 25 const SessionMessageCB& session_message_cb,
27 const SessionClosedCB& session_closed_cb, 26 const SessionClosedCB& session_closed_cb,
28 const SessionKeysChangeCB& session_keys_change_cb, 27 const SessionKeysChangeCB& session_keys_change_cb,
29 const SessionExpirationUpdateCB& session_expiration_update_cb, 28 const SessionExpirationUpdateCB& session_expiration_update_cb,
30 const CdmCreatedCB& cdm_created_cb) final; 29 const CdmCreatedCB& cdm_created_cb) override;
31 30
32 private: 31 private:
33 CreateFetcherCB create_fetcher_cb_; 32 std::unique_ptr<RemotingCdmController> CreateRemotingController();
34 33
35 DISALLOW_COPY_AND_ASSIGN(AndroidCdmFactory); 34 const std::unique_ptr<CdmFactory> default_cdm_factory_;
35 mojom::RemoterFactory* const remoter_factory_; // Outlives this class.
36
37 DISALLOW_COPY_AND_ASSIGN(RemotingCdmFactory);
36 }; 38 };
37 39
38 } // namespace media 40 } // namespace media
39 41
40 #endif // MEDIA_BASE_ANDROID_ANDROID_CDM_FACTORY_H_ 42 #endif // MEDIA_REMOTING_REMOTING_CDM_FACTORY_H_
OLDNEW
« no previous file with comments | « media/remoting/remoting_cdm_controller.cc ('k') | media/remoting/remoting_cdm_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698