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

Side by Side Diff: media/blink/cdm_session_adapter.h

Issue 2402563002: Keep reference to CDM to avoid it's premature destruction (Closed)
Patch Set: nits Created 4 years, 2 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
« no previous file with comments | « no previous file | media/blink/cdm_session_adapter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_BLINK_CDM_SESSION_ADAPTER_H_ 5 #ifndef MEDIA_BLINK_CDM_SESSION_ADAPTER_H_
6 #define MEDIA_BLINK_CDM_SESSION_ADAPTER_H_ 6 #define MEDIA_BLINK_CDM_SESSION_ADAPTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 // Closes the session specified by |session_id|. 84 // Closes the session specified by |session_id|.
85 void CloseSession(const std::string& session_id, 85 void CloseSession(const std::string& session_id,
86 std::unique_ptr<SimpleCdmPromise> promise); 86 std::unique_ptr<SimpleCdmPromise> promise);
87 87
88 // Removes stored session data associated with the session specified by 88 // Removes stored session data associated with the session specified by
89 // |session_id|. 89 // |session_id|.
90 void RemoveSession(const std::string& session_id, 90 void RemoveSession(const std::string& session_id,
91 std::unique_ptr<SimpleCdmPromise> promise); 91 std::unique_ptr<SimpleCdmPromise> promise);
92 92
93 // Returns the CdmContext associated with |media_keys_|. 93 // Returns a reference to the CDM.
94 // TODO(jrummell): Figure out lifetimes, as WMPI may still use the decryptor 94 scoped_refptr<MediaKeys> GetCdm();
95 // after WebContentDecryptionModule is freed. http://crbug.com/330324
96 CdmContext* GetCdmContext();
97 95
98 // Returns the key system name. 96 // Returns the key system name.
99 const std::string& GetKeySystem() const; 97 const std::string& GetKeySystem() const;
100 98
101 // Returns a prefix to use for UMAs. 99 // Returns a prefix to use for UMAs.
102 const std::string& GetKeySystemUMAPrefix() const; 100 const std::string& GetKeySystemUMAPrefix() const;
103 101
104 private: 102 private:
105 friend class base::RefCounted<CdmSessionAdapter>; 103 friend class base::RefCounted<CdmSessionAdapter>;
106 104
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 147
150 // NOTE: Weak pointers must be invalidated before all other member variables. 148 // NOTE: Weak pointers must be invalidated before all other member variables.
151 base::WeakPtrFactory<CdmSessionAdapter> weak_ptr_factory_; 149 base::WeakPtrFactory<CdmSessionAdapter> weak_ptr_factory_;
152 150
153 DISALLOW_COPY_AND_ASSIGN(CdmSessionAdapter); 151 DISALLOW_COPY_AND_ASSIGN(CdmSessionAdapter);
154 }; 152 };
155 153
156 } // namespace media 154 } // namespace media
157 155
158 #endif // MEDIA_BLINK_CDM_SESSION_ADAPTER_H_ 156 #endif // MEDIA_BLINK_CDM_SESSION_ADAPTER_H_
OLDNEW
« no previous file with comments | « no previous file | media/blink/cdm_session_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698