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

Side by Side Diff: chrome/common/chrome_content_client.cc

Issue 2582463003: media: Verify CDM Host files (Closed)
Patch Set: comments addressed Created 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/common/chrome_content_client.h" 5 #include "chrome/common/chrome_content_client.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 #include "flapper_version.h" // nogncheck In SHARED_INTERMEDIATE_DIR. 77 #include "flapper_version.h" // nogncheck In SHARED_INTERMEDIATE_DIR.
78 #include "ppapi/shared_impl/ppapi_permissions.h" 78 #include "ppapi/shared_impl/ppapi_permissions.h"
79 #endif 79 #endif
80 80
81 #if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS) && \ 81 #if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS) && \
82 !defined(WIDEVINE_CDM_IS_COMPONENT) 82 !defined(WIDEVINE_CDM_IS_COMPONENT)
83 #define WIDEVINE_CDM_AVAILABLE_NOT_COMPONENT 83 #define WIDEVINE_CDM_AVAILABLE_NOT_COMPONENT
84 #include "chrome/common/widevine_cdm_constants.h" 84 #include "chrome/common/widevine_cdm_constants.h"
85 #endif 85 #endif
86 86
87 #if BUILDFLAG(ENABLE_PEPPER_CDMS)
88 #include "chrome/common/media/cdm_host_file_path.h"
89 #endif
90
87 #if defined(OS_ANDROID) 91 #if defined(OS_ANDROID)
88 #include "chrome/common/chrome_media_client_android.h" 92 #include "chrome/common/chrome_media_client_android.h"
89 #endif 93 #endif
90 94
91 namespace { 95 namespace {
92 96
93 #if BUILDFLAG(ENABLE_PLUGINS) 97 #if BUILDFLAG(ENABLE_PLUGINS)
94 #if BUILDFLAG(ENABLE_PDF) 98 #if BUILDFLAG(ENABLE_PDF)
95 const char kPDFPluginExtension[] = "pdf"; 99 const char kPDFPluginExtension[] = "pdf";
96 const char kPDFPluginDescription[] = "Portable Document Format"; 100 const char kPDFPluginDescription[] = "Portable Document Format";
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 const base::Version version(WIDEVINE_CDM_VERSION_STRING); 552 const base::Version version(WIDEVINE_CDM_VERSION_STRING);
549 DCHECK(version.IsValid()); 553 DCHECK(version.IsValid());
550 cdms->push_back(content::CdmInfo(kWidevineCdmType, version, cdm_path, 554 cdms->push_back(content::CdmInfo(kWidevineCdmType, version, cdm_path,
551 codecs_supported)); 555 codecs_supported));
552 } 556 }
553 #endif // defined(WIDEVINE_CDM_AVAILABLE_NOT_COMPONENT) 557 #endif // defined(WIDEVINE_CDM_AVAILABLE_NOT_COMPONENT)
554 558
555 // TODO(jrummell): Add External Clear Key CDM for testing, if it's available. 559 // TODO(jrummell): Add External Clear Key CDM for testing, if it's available.
556 } 560 }
557 561
562 #if BUILDFLAG(ENABLE_PEPPER_CDMS)
563 void ChromeContentClient::AddContentDecryptionModuleHostFilePaths(
564 std::vector<content::CdmHostFilePath>* cdm_host_file_paths) {
565 AddCdmHostFilePaths(cdm_host_file_paths);
566 }
567 #endif
568
558 static const char* const kChromeStandardURLSchemes[] = { 569 static const char* const kChromeStandardURLSchemes[] = {
559 extensions::kExtensionScheme, 570 extensions::kExtensionScheme,
560 chrome::kChromeNativeScheme, 571 chrome::kChromeNativeScheme,
561 chrome::kChromeSearchScheme, 572 chrome::kChromeSearchScheme,
562 dom_distiller::kDomDistillerScheme, 573 dom_distiller::kDomDistillerScheme,
563 #if defined(OS_CHROMEOS) 574 #if defined(OS_CHROMEOS)
564 chrome::kCrosScheme, 575 chrome::kCrosScheme,
565 #endif 576 #endif
566 }; 577 };
567 578
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 if (!origin_trial_policy_) 677 if (!origin_trial_policy_)
667 origin_trial_policy_ = base::MakeUnique<ChromeOriginTrialPolicy>(); 678 origin_trial_policy_ = base::MakeUnique<ChromeOriginTrialPolicy>();
668 return origin_trial_policy_.get(); 679 return origin_trial_policy_.get();
669 } 680 }
670 681
671 #if defined(OS_ANDROID) 682 #if defined(OS_ANDROID)
672 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { 683 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() {
673 return new ChromeMediaClientAndroid(); 684 return new ChromeMediaClientAndroid();
674 } 685 }
675 #endif // OS_ANDROID 686 #endif // OS_ANDROID
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698