Index: chrome/browser/media/android/cdm/media_drm_storage_impl.h |
diff --git a/chrome/browser/media/android/cdm/media_drm_storage_impl.h b/chrome/browser/media/android/cdm/media_drm_storage_impl.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0b2f31c03b3b60c251d5b0f9116592b3da965620 |
--- /dev/null |
+++ b/chrome/browser/media/android/cdm/media_drm_storage_impl.h |
@@ -0,0 +1,57 @@ |
+// 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 CHROME_BROWSER_MEDIA_ANDROID_CDM_MEDIA_DRM_STORAGE_IMPL_H_ |
+#define CHROME_BROWSER_MEDIA_ANDROID_CDM_MEDIA_DRM_STORAGE_IMPL_H_ |
+ |
+#include "content/public/browser/render_frame_host.h" |
+#include "media/mojo/interfaces/media_drm_storage.mojom.h" |
+#include "url/origin.h" |
+ |
+class PrefService; |
+ |
+namespace user_prefs { |
+class PrefRegistrySyncable; |
+} |
+ |
+namespace chrome { |
+ |
+// Implements media::mojom::MediaDrmStorage to ........... ??? |
+class MediaDrmStorageImpl : public media::mojom::MediaDrmStorage { |
+ public: |
+ static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
+ |
+ static void Create(content::RenderFrameHost* render_frame_host, |
+ media::mojom::MediaDrmStorageRequest request); |
+ |
+ explicit MediaDrmStorageImpl(PrefService* pref_service); |
+ ~MediaDrmStorageImpl() final; |
+ |
+ // media::mojom::MediaDrmStorage implementation. |
+ void Initialize(const url::Origin& origin) final; |
+ void OnProvisioned(const OnProvisionedCallback& callback) final; |
+ void SavePersistentSession( |
+ const std::string& session_id, |
+ const std::vector<uint8_t>& key_set_id, |
+ const std::string& mime_type, |
+ const SavePersistentSessionCallback& callback) final; |
+ void LoadPersistentSession( |
+ const std::string& session_id, |
+ const LoadPersistentSessionCallback& callback) final; |
+ void RemovePersistentSession( |
+ const std::string& session_id, |
+ const RemovePersistentSessionCallback& callback) final; |
+ |
+ private: |
+ PrefService* pref_service_; |
+ |
+ // Store the origin in a string so it can be used as a key in the dictionary. |
+ std::string origin_; |
+ |
+ base::WeakPtrFactory<MediaDrmStorageImpl> weak_factory_; |
+}; |
+ |
+} // namespace chrome |
+ |
+#endif // CHROME_BROWSER_MEDIA_ANDROID_CDM_MEDIA_DRM_STORAGE_IMPL_H_ |