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

Side by Side Diff: media/cdm/ppapi/cdm_adapter.cc

Issue 93243003: Add CDM FileIO tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/cdm/ppapi/cdm_adapter.h" 5 #include "media/cdm/ppapi/cdm_adapter.h"
6 6
7 #include "media/cdm/ppapi/cdm_file_io_impl.h"
7 #include "media/cdm/ppapi/cdm_helpers.h" 8 #include "media/cdm/ppapi/cdm_helpers.h"
8 #include "media/cdm/ppapi/supported_cdm_versions.h" 9 #include "media/cdm/ppapi/supported_cdm_versions.h"
9 10
10 #if defined(CHECK_DOCUMENT_URL) 11 #if defined(CHECK_DOCUMENT_URL)
11 #include "ppapi/cpp/dev/url_util_dev.h" 12 #include "ppapi/cpp/dev/url_util_dev.h"
12 #include "ppapi/cpp/instance_handle.h" 13 #include "ppapi/cpp/instance_handle.h"
13 #endif // defined(CHECK_DOCUMENT_URL) 14 #endif // defined(CHECK_DOCUMENT_URL)
14 15
15 namespace { 16 namespace {
16 17
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 callback_factory_.NewCallback(&CdmAdapter::DecoderInitializeDone, 862 callback_factory_.NewCallback(&CdmAdapter::DecoderInitializeDone,
862 PP_DECRYPTORSTREAMTYPE_VIDEO, 863 PP_DECRYPTORSTREAMTYPE_VIDEO,
863 deferred_video_decoder_config_id_, 864 deferred_video_decoder_config_id_,
864 decoder_status == cdm::kSuccess)); 865 decoder_status == cdm::kSuccess));
865 deferred_initialize_video_decoder_ = false; 866 deferred_initialize_video_decoder_ = false;
866 deferred_video_decoder_config_id_ = 0; 867 deferred_video_decoder_config_id_ = 0;
867 break; 868 break;
868 } 869 }
869 } 870 }
870 871
872 cdm::CdmFileIO* CdmAdapter::GetCdmFileIO(cdm::CdmFileIOClient* client) {
873 // The CDM owns this object and must call CdmFileIO::Close() to release it.
ddorwin 2013/12/04 05:27:08 s/this/the returned/ And move to a function-level
xhwang 2013/12/10 01:24:25 Done.
874 return new CdmFileIOImpl(client, pp_instance());
875 }
876
871 #if defined(OS_CHROMEOS) 877 #if defined(OS_CHROMEOS)
872 void CdmAdapter::SendPlatformChallengeDone(int32_t result) { 878 void CdmAdapter::SendPlatformChallengeDone(int32_t result) {
873 challenge_in_progress_ = false; 879 challenge_in_progress_ = false;
874 880
875 if (result != PP_OK) { 881 if (result != PP_OK) {
876 cdm::PlatformChallengeResponse response = {}; 882 cdm::PlatformChallengeResponse response = {};
877 cdm_->OnPlatformChallengeResponse(response); 883 cdm_->OnPlatformChallengeResponse(response);
878 return; 884 return;
879 } 885 }
880 886
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 } // namespace media 983 } // namespace media
978 984
979 namespace pp { 985 namespace pp {
980 986
981 // Factory function for your specialization of the Module object. 987 // Factory function for your specialization of the Module object.
982 Module* CreateModule() { 988 Module* CreateModule() {
983 return new media::CdmAdapterModule(); 989 return new media::CdmAdapterModule();
984 } 990 }
985 991
986 } // namespace pp 992 } // namespace pp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698