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/blink/key_system_config_selector.h" | 5 #include "media/blink/key_system_config_selector.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 } | 275 } |
276 | 276 |
277 KeySystemConfigSelector::~KeySystemConfigSelector() { | 277 KeySystemConfigSelector::~KeySystemConfigSelector() { |
278 } | 278 } |
279 | 279 |
280 bool IsSupportedClearMediaFormat(const std::string& container_mime_type, | 280 bool IsSupportedClearMediaFormat(const std::string& container_mime_type, |
281 const std::string& codecs) { | 281 const std::string& codecs) { |
282 std::vector<std::string> codec_vector; | 282 std::vector<std::string> codec_vector; |
283 media::ParseCodecString(codecs, &codec_vector, false); | 283 media::ParseCodecString(codecs, &codec_vector, false); |
284 media::SupportsType support_result = | 284 media::SupportsType support_result = |
285 media::IsSupportedMediaFormat(container_mime_type, codec_vector); | 285 media::IsSupportedEncryptedMediaFormat(container_mime_type, codec_vector); |
286 switch (support_result) { | 286 switch (support_result) { |
287 case media::IsSupported: | 287 case media::IsSupported: |
288 return true; | 288 return true; |
289 case media::MayBeSupported: | 289 case media::MayBeSupported: |
290 // If no codecs were specified, the best possible result is | 290 // If no codecs were specified, the best possible result is |
291 // MayBeSupported, indicating support for the container. | 291 // MayBeSupported, indicating support for the container. |
292 return codec_vector.empty(); | 292 return codec_vector.empty(); |
293 case media::IsNotSupported: | 293 case media::IsNotSupported: |
294 return false; | 294 return false; |
295 } | 295 } |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 | 796 |
797 void KeySystemConfigSelector::OnPermissionResult( | 797 void KeySystemConfigSelector::OnPermissionResult( |
798 scoped_ptr<SelectionRequest> request, | 798 scoped_ptr<SelectionRequest> request, |
799 bool is_permission_granted) { | 799 bool is_permission_granted) { |
800 request->was_permission_requested = true; | 800 request->was_permission_requested = true; |
801 request->is_permission_granted = is_permission_granted; | 801 request->is_permission_granted = is_permission_granted; |
802 SelectConfigInternal(std::move(request)); | 802 SelectConfigInternal(std::move(request)); |
803 } | 803 } |
804 | 804 |
805 } // namespace media | 805 } // namespace media |
OLD | NEW |