Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: media/blink/key_system_config_selector.cc

Issue 2707393002: Revert "EME: Fail requestMediaKeySystemAccess if no capabilities specified"
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | media/test/data/eme_player_js/player_utils.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | media/test/data/eme_player_js/player_utils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698