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

Side by Side Diff: content/public/common/cdm_service.h

Issue 1637083002: Add CdmService to keep track of CDMs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename + simplification Created 4 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_PUBLIC_COMMON_CDM_SERVICE_H_
6 #define CONTENT_PUBLIC_COMMON_CDM_SERVICE_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/files/file_path.h"
12 #include "base/lazy_instance.h"
13 #include "base/macros.h"
14 #include "base/strings/string16.h"
ddorwin 2016/03/18 19:24:19 no
jrummell 2016/03/23 21:38:10 Done.
15 #include "base/version.h"
16 #include "content/common/content_export.h"
17 #include "content/public/common/cdm_info.h"
18
19 namespace content {
20
21 class CONTENT_EXPORT CdmService {
ddorwin 2016/03/18 22:22:11 Is this really a service or just a registry?
xhwang 2016/03/18 23:16:02 Either works for me :) I guess we were following t
22 public:
23 // Returns the CdmService singleton.
24 static CdmService* GetInstance();
25
26 // Registers |cdm_id|, replacing any entry that may exist for it (with
xhwang 2016/03/18 19:35:38 ditto about cdm_id
jrummell 2016/03/23 21:38:10 Done.
27 // same |version|). |module_library_path| is the path to the actual CDM
ddorwin 2016/03/18 19:24:19 Do we expect this to be called multiple times with
jrummell 2016/03/23 21:38:10 Done.
28 // (may be empty if the CDM is already included as part of the system),
ddorwin 2016/03/18 19:24:19 ditto on the ifdef.
jrummell 2016/03/23 21:38:10 No longer an issue here.
29 // and |supported_codecs| and |supported_init_data_types| are the list
30 // of codecs, and the list of init_data_types, respectively, supported
31 // by this CDM (which may be none).
32 void Register(const std::string& cdm_id,
ddorwin 2016/03/18 19:24:19 nit: RegisterCdm seems better. WDYT?
jrummell 2016/03/23 21:38:10 Done.
33 const std::string& version,
34 const base::FilePath& module_library_path,
35 const std::vector<base::string16>& supported_codecs,
36 const std::vector<base::string16>& supported_init_data_types);
xhwang 2016/03/18 19:35:38 It seems content APIs should be pure abstract: ht
jrummell 2016/03/23 21:38:10 Done (by moving this file and matching what is don
37
38 // Returns the list of all registered CDMs and the associated data.
39 // Paths in |key_systems| may be empty if the CDM is already included as
ddorwin 2016/03/18 19:24:19 Seems unnecessary. This is already covered in the
jrummell 2016/03/23 21:38:10 Done.
40 // part of the system.
41 const std::vector<CdmInfo>& GetAllRegisteredCdms() const;
xhwang 2016/03/18 19:35:38 For interfaces we don't use "const": https://www.
jrummell 2016/03/23 21:38:10 Done.
42
43 private:
44 friend struct base::DefaultLazyInstanceTraits<CdmService>;
45
46 CdmService();
47 ~CdmService();
48
49 std::vector<CdmInfo> registered_modules_;
ddorwin 2016/03/18 19:24:18 "modules" is first used alone here. "cdms" seems b
jrummell 2016/03/23 21:38:10 Done.
50
51 DISALLOW_COPY_AND_ASSIGN(CdmService);
52 };
53
54 } // namespace content
55
56 #endif // CONTENT_PUBLIC_COMMON_CDM_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698