| 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 "modules/encryptedmedia/MediaKeySystemAccess.h" | 5 #include "modules/encryptedmedia/MediaKeySystemAccess.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ScriptPromiseResolver.h" | 7 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 8 #include "bindings/core/v8/ScriptState.h" | 8 #include "bindings/core/v8/ScriptState.h" |
| 9 #include "core/dom/DOMException.h" | 9 #include "core/dom/DOMException.h" |
| 10 #include "core/dom/Document.h" | 10 #include "core/dom/Document.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 { | 84 { |
| 85 switch (requirement) { | 85 switch (requirement) { |
| 86 case WebMediaKeySystemConfiguration::Requirement::Required: | 86 case WebMediaKeySystemConfiguration::Requirement::Required: |
| 87 return "required"; | 87 return "required"; |
| 88 case WebMediaKeySystemConfiguration::Requirement::Optional: | 88 case WebMediaKeySystemConfiguration::Requirement::Optional: |
| 89 return "optional"; | 89 return "optional"; |
| 90 case WebMediaKeySystemConfiguration::Requirement::NotAllowed: | 90 case WebMediaKeySystemConfiguration::Requirement::NotAllowed: |
| 91 return "not-allowed"; | 91 return "not-allowed"; |
| 92 } | 92 } |
| 93 | 93 |
| 94 ASSERT_NOT_REACHED(); | 94 NOTREACHED(); |
| 95 return "not-allowed"; | 95 return "not-allowed"; |
| 96 } | 96 } |
| 97 | 97 |
| 98 static Vector<String> convertSessionTypes(const WebVector<WebEncryptedMediaSessi
onType>& sessionTypes) | 98 static Vector<String> convertSessionTypes(const WebVector<WebEncryptedMediaSessi
onType>& sessionTypes) |
| 99 { | 99 { |
| 100 Vector<String> result(sessionTypes.size()); | 100 Vector<String> result(sessionTypes.size()); |
| 101 for (size_t i = 0; i < sessionTypes.size(); i++) | 101 for (size_t i = 0; i < sessionTypes.size(); i++) |
| 102 result[i] = EncryptedMediaUtils::convertFromSessionType(sessionTypes[i])
; | 102 result[i] = EncryptedMediaUtils::convertFromSessionType(sessionTypes[i])
; |
| 103 return result; | 103 return result; |
| 104 } | 104 } |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 161 |
| 162 // 3. Return promise. | 162 // 3. Return promise. |
| 163 return promise; | 163 return promise; |
| 164 } | 164 } |
| 165 | 165 |
| 166 DEFINE_TRACE(MediaKeySystemAccess) | 166 DEFINE_TRACE(MediaKeySystemAccess) |
| 167 { | 167 { |
| 168 } | 168 } |
| 169 | 169 |
| 170 } // namespace blink | 170 } // namespace blink |
| OLD | NEW |