mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-17 04:30:46 +01:00
Windows: Fix sandbox permissions for Flash video playback (issue #1650)
This commit is contained in:
parent
ee90dc0915
commit
272ecc3047
@ -63,6 +63,10 @@
|
|||||||
#include "content/public/common/content_descriptors.h"
|
#include "content/public/common/content_descriptors.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(OS_WIN)
|
||||||
|
#include "sandbox/win/src/sandbox_policy.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
// In-memory store for access tokens used by geolocation.
|
// In-memory store for access tokens used by geolocation.
|
||||||
@ -964,6 +968,20 @@ const wchar_t* CefContentBrowserClient::GetResourceDllName() {
|
|||||||
|
|
||||||
return file_path;
|
return file_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CefContentBrowserClient::PreSpawnRenderer(
|
||||||
|
sandbox::TargetPolicy* policy,
|
||||||
|
bool* success) {
|
||||||
|
// Flash requires this permission to play video files.
|
||||||
|
sandbox::ResultCode result = policy->AddRule(
|
||||||
|
sandbox::TargetPolicy::SUBSYS_HANDLES,
|
||||||
|
sandbox::TargetPolicy::HANDLES_DUP_ANY,
|
||||||
|
L"File");
|
||||||
|
if (result != sandbox::SBOX_ALL_OK) {
|
||||||
|
*success = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif // defined(OS_WIN)
|
#endif // defined(OS_WIN)
|
||||||
|
|
||||||
void CefContentBrowserClient::RegisterCustomScheme(const std::string& scheme) {
|
void CefContentBrowserClient::RegisterCustomScheme(const std::string& scheme) {
|
||||||
|
@ -143,6 +143,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
|||||||
|
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
const wchar_t* GetResourceDllName() override;
|
const wchar_t* GetResourceDllName() override;
|
||||||
|
void PreSpawnRenderer(sandbox::TargetPolicy* policy, bool* success) override;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Perform browser process registration for the custom scheme.
|
// Perform browser process registration for the custom scheme.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user