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

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

Issue 1637083002: Add CdmService to keep track of CDMs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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_KEY_SYSTEM_SERVICE_H_
xhwang 2016/01/29 07:43:07 Is there any reason we do't put this in content/pu
6 #define CONTENT_PUBLIC_COMMON_KEY_SYSTEM_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"
15 #include "base/version.h"
16 #include "content/common/content_export.h"
17 #include "content/public/common/key_system_registration.h"
18
19 namespace content {
20
21 class CONTENT_EXPORT KeySystemService {
22 public:
23 // Returns the KeySystemService singleton.
24 static KeySystemService* GetInstance();
25
26 // Register |key_system|, replacing any entry that may exist for it. |path|
xhwang 2016/01/29 07:43:07 Register_s_; same below.
jrummell 2016/03/04 01:19:41 Done.
27 // is the path to the actual CDM, and |codecs| is the list of codecs
28 // supported by this CDM.
29 void Register(const std::string& key_system,
30 const base::FilePath& path,
31 const base::string16& codecs);
xhwang 2016/01/29 07:43:07 How should the list of codecs be formatted in this
jrummell 2016/03/04 01:19:41 Converted to a std::vector<>.
32
33 // Determine the path set for |key_system|. If |key_system| has been
34 // registered, true is returned and |path| is updated. Otherwise false
35 // is returned and |path| is unchanged.
36 bool Path(const std::string& key_system, base::FilePath* path);
xhwang 2016/01/29 07:43:07 Path() is a bit vague. How about GetCdmLibraryPath
jrummell 2016/03/04 01:19:41 Done.
37
38 // Determine the codecs set for |key_system|. If |key_system| has been
39 // registered, true is returned and |codecs| is updated. Otherwise false
xhwang 2016/01/29 07:43:07 Is it possible "true" is returned and "codecs" is
jrummell 2016/03/04 01:19:41 Updated.
40 // is returned and |codecs| is unchanged.
41 bool Codecs(const std::string& key_system, base::string16* codecs);
xhwang 2016/01/29 07:43:07 ditto about name too general. How about GetSupport
jrummell 2016/03/04 01:19:41 Done.
42
43 // Return the list of all registered key systems and the path to the
44 // library. Note that multiple key systems may use the same library,
45 // so some of the entries in |paths| may be duplicated.
46 void GetAllRegisteredKeySystems(std::vector<std::string>* key_systems,
47 std::vector<base::FilePath>* paths);
xhwang 2016/01/29 07:43:07 What's the purpose of this API? It's a bit odd tha
jrummell 2016/03/04 01:19:41 Combined using std::pair.
48
49 private:
50 friend struct base::DefaultLazyInstanceTraits<KeySystemService>;
51
52 KeySystemService();
53 ~KeySystemService();
54
55 std::vector<KeySystemRegistration> registered_key_systems_;
56
57 DISALLOW_COPY_AND_ASSIGN(KeySystemService);
58 };
59
60 } // namespace content
61
62 #endif // CONTENT_PUBLIC_COMMON_KEY_SYSTEM_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698