| 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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 EmeFeatureRequirement::Required; | 643 EmeFeatureRequirement::Required; |
| 644 } | 644 } |
| 645 } | 645 } |
| 646 | 646 |
| 647 // 14. Set the sessionTypes member of accumulated configuration to | 647 // 14. Set the sessionTypes member of accumulated configuration to |
| 648 // session types. | 648 // session types. |
| 649 accumulated_configuration->sessionTypes = session_types; | 649 accumulated_configuration->sessionTypes = session_types; |
| 650 | 650 |
| 651 // 15. If the videoCapabilities and audioCapabilities members in candidate | 651 // 15. If the videoCapabilities and audioCapabilities members in candidate |
| 652 // configuration are both empty, return NotSupported. | 652 // configuration are both empty, return NotSupported. |
| 653 if (candidate.videoCapabilities.isEmpty() && | 653 // TODO(jrummell): Enforce this once the deprecation warning is removed. |
| 654 candidate.audioCapabilities.isEmpty()) { | 654 // See http://crbug.com/616233. |
| 655 return CONFIGURATION_NOT_SUPPORTED; | |
| 656 } | |
| 657 | 655 |
| 658 // 16. If the videoCapabilities member in candidate configuration is | 656 // 16. If the videoCapabilities member in candidate configuration is |
| 659 // non-empty: | 657 // non-empty: |
| 660 std::vector<blink::WebMediaKeySystemMediaCapability> video_capabilities; | 658 std::vector<blink::WebMediaKeySystemMediaCapability> video_capabilities; |
| 661 if (!candidate.videoCapabilities.isEmpty()) { | 659 if (!candidate.videoCapabilities.isEmpty()) { |
| 662 // 16.1. Let video capabilities be the result of executing the Get | 660 // 16.1. Let video capabilities be the result of executing the Get |
| 663 // Supported Capabilities for Audio/Video Type algorithm on Video, | 661 // Supported Capabilities for Audio/Video Type algorithm on Video, |
| 664 // candidate configuration's videoCapabilities member, accumulated | 662 // candidate configuration's videoCapabilities member, accumulated |
| 665 // configuration, and restrictions. | 663 // configuration, and restrictions. |
| 666 // 16.2. If video capabilities is null, return NotSupported. | 664 // 16.2. If video capabilities is null, return NotSupported. |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 | 926 |
| 929 void KeySystemConfigSelector::OnPermissionResult( | 927 void KeySystemConfigSelector::OnPermissionResult( |
| 930 std::unique_ptr<SelectionRequest> request, | 928 std::unique_ptr<SelectionRequest> request, |
| 931 bool is_permission_granted) { | 929 bool is_permission_granted) { |
| 932 request->was_permission_requested = true; | 930 request->was_permission_requested = true; |
| 933 request->is_permission_granted = is_permission_granted; | 931 request->is_permission_granted = is_permission_granted; |
| 934 SelectConfigInternal(std::move(request)); | 932 SelectConfigInternal(std::move(request)); |
| 935 } | 933 } |
| 936 | 934 |
| 937 } // namespace media | 935 } // namespace media |
| OLD | NEW |