mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-05 21:44:23 +01:00
Fix Widevine DRM loading
This commit is contained in:
parent
7b94ec0c8b
commit
b153ba46db
@ -6,10 +6,13 @@
|
||||
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "build/build_config.h"
|
||||
#include "chrome/browser/renderer_host/pepper/pepper_broker_message_filter.h"
|
||||
#include "chrome/browser/renderer_host/pepper/pepper_flash_browser_host.h"
|
||||
#include "chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.h"
|
||||
#include "chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h"
|
||||
#include "chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h"
|
||||
#include "chrome/browser/renderer_host/pepper/pepper_output_protection_message_filter.h"
|
||||
#include "chrome/browser/renderer_host/pepper/pepper_platform_verification_message_filter.h"
|
||||
#include "content/public/browser/browser_ppapi_host.h"
|
||||
#include "ppapi/host/message_filter_host.h"
|
||||
#include "ppapi/host/ppapi_host.h"
|
||||
@ -38,6 +41,33 @@ std::unique_ptr<ResourceHost> CefBrowserPepperHostFactory::CreateResourceHost(
|
||||
if (!host_->IsValidInstance(instance))
|
||||
return nullptr;
|
||||
|
||||
// Private interfaces.
|
||||
if (host_->GetPpapiHost()->permissions().HasPermission(
|
||||
ppapi::PERMISSION_PRIVATE)) {
|
||||
switch (message.type()) {
|
||||
case PpapiHostMsg_Broker_Create::ID: {
|
||||
scoped_refptr<ResourceMessageFilter> broker_filter(
|
||||
new chrome::PepperBrokerMessageFilter(instance, host_));
|
||||
return std::unique_ptr<ResourceHost>(new MessageFilterHost(
|
||||
host_->GetPpapiHost(), instance, resource, broker_filter));
|
||||
}
|
||||
case PpapiHostMsg_PlatformVerification_Create::ID: {
|
||||
scoped_refptr<ResourceMessageFilter> pv_filter(
|
||||
new chrome::PepperPlatformVerificationMessageFilter(host_,
|
||||
instance));
|
||||
return std::unique_ptr<ResourceHost>(new MessageFilterHost(
|
||||
host_->GetPpapiHost(), instance, resource, pv_filter));
|
||||
}
|
||||
case PpapiHostMsg_OutputProtection_Create::ID: {
|
||||
scoped_refptr<ResourceMessageFilter> output_protection_filter(
|
||||
new chrome::PepperOutputProtectionMessageFilter(host_, instance));
|
||||
return std::unique_ptr<ResourceHost>(
|
||||
new MessageFilterHost(host_->GetPpapiHost(), instance, resource,
|
||||
output_protection_filter));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Flash interfaces.
|
||||
if (host_->GetPpapiHost()->permissions().HasPermission(
|
||||
ppapi::PERMISSION_FLASH)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user