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

Side by Side Diff: components/cdm/browser/media_drm_storage_impl.h

Issue 2765343003: media: Add MediaDrmStorage (Closed)
Patch Set: Move MediaDrmStorageImpl to components/ Created 3 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 2017 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 COMPONENTS_CDM_BROWSER_MEDIA_DRM_STORAGE_IMPL_H_
6 #define COMPONENTS_CDM_BROWSER_MEDIA_DRM_STORAGE_IMPL_H_
7
8 #include "content/public/browser/render_frame_host.h"
9 #include "media/mojo/interfaces/media_drm_storage.mojom.h"
10 #include "url/origin.h"
11
12 class PrefService;
13
14 namespace user_prefs {
15 class PrefRegistrySyncable;
16 }
17
18 namespace cdm {
19
20 // Implements media::mojom::MediaDrmStorage to ........... ???
21 class MediaDrmStorageImpl : public media::mojom::MediaDrmStorage {
22 public:
23 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
24
25 explicit MediaDrmStorageImpl(PrefService* pref_service);
26 ~MediaDrmStorageImpl() final;
27
28 // media::mojom::MediaDrmStorage implementation.
29 void Initialize(const url::Origin& origin) final;
30 void OnProvisioned(const OnProvisionedCallback& callback) final;
31 void SavePersistentSession(
32 const std::string& session_id,
33 const std::vector<uint8_t>& key_set_id,
34 const std::string& mime_type,
35 const SavePersistentSessionCallback& callback) final;
36 void LoadPersistentSession(
37 const std::string& session_id,
38 const LoadPersistentSessionCallback& callback) final;
39 void RemovePersistentSession(
40 const std::string& session_id,
41 const RemovePersistentSessionCallback& callback) final;
42
43 private:
44 PrefService* pref_service_;
45
46 // Store the origin in a string so it can be used as a key in the dictionary.
47 std::string origin_;
48
49 base::WeakPtrFactory<MediaDrmStorageImpl> weak_factory_;
50 };
51
52 } // namespace cdm
53
54 #endif // COMPONENTS_CDM_BROWSER_MEDIA_DRM_STORAGE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698