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 #include "media/base/cdm_promise_adapter.h" | 5 #include "media/base/cdm_promise_adapter.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "media/base/media_keys.h" | |
10 | |
11 namespace media { | 9 namespace media { |
12 | 10 |
13 CdmPromiseAdapter::CdmPromiseAdapter() : next_promise_id_(1) { | 11 CdmPromiseAdapter::CdmPromiseAdapter() : next_promise_id_(1) { |
14 } | 12 } |
15 | 13 |
16 CdmPromiseAdapter::~CdmPromiseAdapter() { | 14 CdmPromiseAdapter::~CdmPromiseAdapter() { |
17 DCHECK(promises_.empty()); | 15 DCHECK(promises_.empty()); |
18 DCHECK(thread_checker_.CalledOnValidThread()); | 16 DCHECK(thread_checker_.CalledOnValidThread()); |
19 Clear(); | 17 Clear(); |
20 } | 18 } |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 return promises_.take_and_erase(it); | 74 return promises_.take_and_erase(it); |
77 } | 75 } |
78 | 76 |
79 // Explicit instantiation of function templates. | 77 // Explicit instantiation of function templates. |
80 template MEDIA_EXPORT void CdmPromiseAdapter::ResolvePromise(uint32_t); | 78 template MEDIA_EXPORT void CdmPromiseAdapter::ResolvePromise(uint32_t); |
81 template MEDIA_EXPORT void CdmPromiseAdapter::ResolvePromise( | 79 template MEDIA_EXPORT void CdmPromiseAdapter::ResolvePromise( |
82 uint32_t, | 80 uint32_t, |
83 const std::string&); | 81 const std::string&); |
84 | 82 |
85 } // namespace media | 83 } // namespace media |
OLD | NEW |