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

Unified Diff: content/public/browser/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: changes + file move 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 side-by-side diff with in-line comments
Download patch
Index: content/public/browser/cdm_service.h
diff --git a/content/public/browser/cdm_service.h b/content/public/browser/cdm_service.h
new file mode 100644
index 0000000000000000000000000000000000000000..af05733e1fba0d7809cdc748c2a1791d32e54b7a
--- /dev/null
+++ b/content/public/browser/cdm_service.h
@@ -0,0 +1,36 @@
+// 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 CONTENT_PUBLIC_BROWSER_CDM_SERVICE_H_
+#define CONTENT_PUBLIC_BROWSER_CDM_SERVICE_H_
+
+#include <vector>
+
+#include "content/common/content_export.h"
+#include "content/public/common/cdm_info.h"
+
+namespace content {
+
+class CONTENT_EXPORT CdmService {
xhwang 2016/03/26 07:46:34 Previously you mentioned that we can't put this un
jrummell 2016/03/29 23:48:45 As we discussed offline, the zygote doesn't use th
xhwang 2016/03/30 05:11:18 Great. It's even better now we can keep this in co
jrummell 2016/04/01 21:15:53 Agreed.
+ public:
+ // Returns the CdmService singleton.
+ static CdmService* GetInstance();
+
+ virtual ~CdmService() {}
+
+ // Determines the list of available CDMs and registers them.
+ virtual void RegisterAllAvailableCdms() = 0;
xhwang 2016/03/26 07:46:34 Why this is on the public API? Who should call it?
jrummell 2016/03/29 23:48:45 ddorwin@ asked in a previous comment to make it ex
xhwang 2016/03/30 05:11:17 RegisterPepperPlugins() is a private helper functi
jrummell 2016/04/01 21:15:53 As discussed offline, this is now renamed Init() (
+
+ // Registers a CDM with the specified CDM information.
+ // If |add_at_beginning| is true the CDM will be added earlier in
+ // the list so that it can override any older registrations.
+ virtual void RegisterCdm(const CdmInfo& info, bool add_at_beginning) = 0;
xhwang 2016/03/26 07:46:34 Today in pepper we always append at end. This is i
jrummell 2016/03/29 23:48:45 The component updater adds new versions to the fro
xhwang 2016/03/30 05:11:18 This model is seems a bit complicated. How would w
jrummell 2016/04/01 21:15:53 Done.
+
+ // Returns the list of all registered CDMs and the associated data.
+ virtual const std::vector<CdmInfo>& GetAllRegisteredCdms() = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_CDM_SERVICE_H_

Powered by Google App Engine
This is Rietveld 408576698