OLD | NEW |
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 <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | |
13 #include "base/containers/hash_tables.h" | 12 #include "base/containers/hash_tables.h" |
14 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
15 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
16 #include "media/base/media_keys.h" | 15 #include "media/base/media_keys.h" |
17 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h" | 16 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h" |
18 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleSession.h
" | 17 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleSession.h
" |
19 | 18 |
20 class GURL; | 19 class GURL; |
21 | 20 |
22 namespace media { | 21 namespace media { |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 137 |
139 scoped_refptr<MediaKeys> cdm_; | 138 scoped_refptr<MediaKeys> cdm_; |
140 | 139 |
141 SessionMap sessions_; | 140 SessionMap sessions_; |
142 | 141 |
143 std::string key_system_; | 142 std::string key_system_; |
144 std::string key_system_uma_prefix_; | 143 std::string key_system_uma_prefix_; |
145 | 144 |
146 // A unique ID to trace CdmSessionAdapter::CreateCdm() call and the matching | 145 // A unique ID to trace CdmSessionAdapter::CreateCdm() call and the matching |
147 // OnCdmCreated() call. | 146 // OnCdmCreated() call. |
148 uint32 trace_id_; | 147 uint32_t trace_id_; |
149 | 148 |
150 scoped_ptr<blink::WebContentDecryptionModuleResult> cdm_created_result_; | 149 scoped_ptr<blink::WebContentDecryptionModuleResult> cdm_created_result_; |
151 | 150 |
152 // NOTE: Weak pointers must be invalidated before all other member variables. | 151 // NOTE: Weak pointers must be invalidated before all other member variables. |
153 base::WeakPtrFactory<CdmSessionAdapter> weak_ptr_factory_; | 152 base::WeakPtrFactory<CdmSessionAdapter> weak_ptr_factory_; |
154 | 153 |
155 DISALLOW_COPY_AND_ASSIGN(CdmSessionAdapter); | 154 DISALLOW_COPY_AND_ASSIGN(CdmSessionAdapter); |
156 }; | 155 }; |
157 | 156 |
158 } // namespace media | 157 } // namespace media |
159 | 158 |
160 #endif // MEDIA_BLINK_CDM_SESSION_ADAPTER_H_ | 159 #endif // MEDIA_BLINK_CDM_SESSION_ADAPTER_H_ |
OLD | NEW |