mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-09 00:28:59 +01:00
Fix Widevine CDM download (issue #1950)
This commit is contained in:
parent
da265f6a2d
commit
7686007c1a
@ -119,7 +119,7 @@ bool CefExtensionsBrowserClient::AllowCrossRendererResourceLoad(
|
||||
// AllowCrossRendererResourceLoad() in https://crrev.com/5cf9d45c. Figure out
|
||||
// why permission is not being granted based on "web_accessible_resources"
|
||||
// specified in the PDF extension manifest.json file.
|
||||
if (extension->id() == extension_misc::kPdfExtensionId)
|
||||
if (extension && extension->id() == extension_misc::kPdfExtensionId)
|
||||
return true;
|
||||
|
||||
bool allowed = false;
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "chrome/common/chrome_constants.h"
|
||||
#include "chrome/common/chrome_paths.h"
|
||||
#include "chrome/common/chrome_switches.h"
|
||||
#include "components/component_updater/component_updater_paths.h"
|
||||
#include "components/content_settings/core/common/content_settings_pattern.h"
|
||||
#include "content/public/browser/browser_main_runner.h"
|
||||
#include "content/public/browser/render_process_host.h"
|
||||
@ -559,21 +560,25 @@ void CefMainDelegate::PreSandboxStartup() {
|
||||
false, // May not be an absolute path.
|
||||
true); // Create if necessary.
|
||||
|
||||
const base::FilePath& resources_path = GetResourcesFilePath();
|
||||
|
||||
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
|
||||
const base::FilePath& widevine_plugin_path =
|
||||
GetResourcesFilePath().AppendASCII(kWidevineCdmAdapterFileName);
|
||||
resources_path.AppendASCII(kWidevineCdmAdapterFileName);
|
||||
if (base::PathExists(widevine_plugin_path)) {
|
||||
PathService::Override(chrome::FILE_WIDEVINE_CDM_ADAPTER,
|
||||
widevine_plugin_path);
|
||||
}
|
||||
#if defined(WIDEVINE_CDM_IS_COMPONENT)
|
||||
if (command_line->HasSwitch(switches::kEnableWidevineCdm)) {
|
||||
PathService::Override(
|
||||
chrome::DIR_COMPONENT_WIDEVINE_CDM,
|
||||
user_data_path.Append(FILE_PATH_LITERAL("WidevineCDM")));
|
||||
}
|
||||
#endif // defined(WIDEVINE_CDM_IS_COMPONENT)
|
||||
#endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
|
||||
|
||||
// Paths to find pre-installed components.
|
||||
PathService::Override(chrome::DIR_COMPONENTS, resources_path);
|
||||
PathService::Override(chrome::DIR_INTERNAL_PLUGINS, resources_path);
|
||||
|
||||
// Register paths to be used by the component updater.
|
||||
component_updater::RegisterPathProvider(chrome::DIR_COMPONENTS,
|
||||
chrome::DIR_INTERNAL_PLUGINS,
|
||||
chrome::DIR_USER_DATA);
|
||||
}
|
||||
|
||||
if (command_line->HasSwitch(switches::kDisablePackLoading))
|
||||
|
Loading…
x
Reference in New Issue
Block a user