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_RESULT_PROMISE_H_ | 5 #ifndef MEDIA_BLINK_CDM_RESULT_PROMISE_H_ |
6 #define MEDIA_BLINK_CDM_RESULT_PROMISE_H_ | 6 #define MEDIA_BLINK_CDM_RESULT_PROMISE_H_ |
7 | 7 |
| 8 #include "base/macros.h" |
8 #include "media/base/cdm_promise.h" | 9 #include "media/base/cdm_promise.h" |
9 #include "media/base/media_keys.h" | 10 #include "media/base/media_keys.h" |
10 #include "media/blink/cdm_result_promise_helper.h" | 11 #include "media/blink/cdm_result_promise_helper.h" |
11 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h" | 12 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h" |
12 #include "third_party/WebKit/public/platform/WebString.h" | 13 #include "third_party/WebKit/public/platform/WebString.h" |
13 | 14 |
14 namespace media { | 15 namespace media { |
15 | 16 |
16 // Used to convert a WebContentDecryptionModuleResult into a CdmPromiseTemplate | 17 // Used to convert a WebContentDecryptionModuleResult into a CdmPromiseTemplate |
17 // so that it can be passed through Chromium. When resolve(T) is called, the | 18 // so that it can be passed through Chromium. When resolve(T) is called, the |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 ReportCdmResultUMA(uma_name_, | 73 ReportCdmResultUMA(uma_name_, |
73 ConvertCdmExceptionToResultForUMA(exception_code)); | 74 ConvertCdmExceptionToResultForUMA(exception_code)); |
74 web_cdm_result_.completeWithError(ConvertCdmException(exception_code), | 75 web_cdm_result_.completeWithError(ConvertCdmException(exception_code), |
75 system_code, | 76 system_code, |
76 blink::WebString::fromUTF8(error_message)); | 77 blink::WebString::fromUTF8(error_message)); |
77 } | 78 } |
78 | 79 |
79 } // namespace media | 80 } // namespace media |
80 | 81 |
81 #endif // MEDIA_BLINK_CDM_RESULT_PROMISE_H_ | 82 #endif // MEDIA_BLINK_CDM_RESULT_PROMISE_H_ |
OLD | NEW |