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

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

Issue 1544313002: Convert Pass()→std::move() in //media (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « media/blink/cdm_session_adapter.cc ('k') | media/blink/multibuffer_data_source.cc » ('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 "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 9
9 #include "base/bind.h" 10 #include "base/bind.h"
10 #include "base/logging.h" 11 #include "base/logging.h"
11 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
12 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
13 #include "media/base/cdm_config.h" 14 #include "media/base/cdm_config.h"
14 #include "media/base/key_systems.h" 15 #include "media/base/key_systems.h"
15 #include "media/base/media_permission.h" 16 #include "media/base/media_permission.h"
16 #include "media/base/mime_util.h" 17 #include "media/base/mime_util.h"
17 #include "media/blink/webmediaplayer_util.h" 18 #include "media/blink/webmediaplayer_util.h"
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 699
699 // 7.2-7.4. Implemented by OnSelectConfig(). 700 // 7.2-7.4. Implemented by OnSelectConfig().
700 // TODO(sandersd): This should be async, ideally not on the main thread. 701 // TODO(sandersd): This should be async, ideally not on the main thread.
701 scoped_ptr<SelectionRequest> request(new SelectionRequest()); 702 scoped_ptr<SelectionRequest> request(new SelectionRequest());
702 request->key_system = key_system_ascii; 703 request->key_system = key_system_ascii;
703 request->candidate_configurations = candidate_configurations; 704 request->candidate_configurations = candidate_configurations;
704 request->security_origin = security_origin; 705 request->security_origin = security_origin;
705 request->are_secure_codecs_supported = are_secure_codecs_supported; 706 request->are_secure_codecs_supported = are_secure_codecs_supported;
706 request->succeeded_cb = succeeded_cb; 707 request->succeeded_cb = succeeded_cb;
707 request->not_supported_cb = not_supported_cb; 708 request->not_supported_cb = not_supported_cb;
708 SelectConfigInternal(request.Pass()); 709 SelectConfigInternal(std::move(request));
709 } 710 }
710 711
711 void KeySystemConfigSelector::SelectConfigInternal( 712 void KeySystemConfigSelector::SelectConfigInternal(
712 scoped_ptr<SelectionRequest> request) { 713 scoped_ptr<SelectionRequest> request) {
713 // Continued from requestMediaKeySystemAccess(), step 7.1, from 714 // Continued from requestMediaKeySystemAccess(), step 7.1, from
714 // https://w3c.github.io/encrypted-media/#requestmediakeysystemaccess 715 // https://w3c.github.io/encrypted-media/#requestmediakeysystemaccess
715 // 716 //
716 // 7.2. Let implementation be the implementation of keySystem. 717 // 7.2. Let implementation be the implementation of keySystem.
717 // (|key_systems_| fills this role.) 718 // (|key_systems_| fills this role.)
718 // 7.3. For each value in supportedConfigurations: 719 // 7.3. For each value in supportedConfigurations:
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 // NotSupportedError. 772 // NotSupportedError.
772 request->not_supported_cb.Run( 773 request->not_supported_cb.Run(
773 "None of the requested configurations were supported."); 774 "None of the requested configurations were supported.");
774 } 775 }
775 776
776 void KeySystemConfigSelector::OnPermissionResult( 777 void KeySystemConfigSelector::OnPermissionResult(
777 scoped_ptr<SelectionRequest> request, 778 scoped_ptr<SelectionRequest> request,
778 bool is_permission_granted) { 779 bool is_permission_granted) {
779 request->was_permission_requested = true; 780 request->was_permission_requested = true;
780 request->is_permission_granted = is_permission_granted; 781 request->is_permission_granted = is_permission_granted;
781 SelectConfigInternal(request.Pass()); 782 SelectConfigInternal(std::move(request));
782 } 783 }
783 784
784 } // namespace media 785 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/cdm_session_adapter.cc ('k') | media/blink/multibuffer_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698