Files
cefsharp/CefSharp.BrowserSubprocess.Core/JavascriptBindingSettings.h
campersau fd87988c39 Move LegacyBindingEnabled / JavascriptBindingPropertyName to per browser settings (#5231)
* Move LegacyBindingEnabled / JavascriptBindingPropertyName to per browser settings

* Stricter test

---------

Co-authored-by: Alex Maitland <amaitland@users.noreply.github.com>
2026-04-30 21:25:18 +10:00

56 lines
1.7 KiB
C++

// Copyright © 2013 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#pragma once
#include "include/cef_v8.h"
#include "Stdafx.h"
namespace CefSharp
{
namespace BrowserSubprocess
{
private ref class JavascriptBindingSettings
{
private:
MCefRefPtr<CefListValue> _javascriptBindingApiAllowOrigins;
public:
JavascriptBindingSettings()
{
LegacyBindingEnabled = false;
JavascriptBindingApiEnabled = true;
JavascriptBindingPropertyName = "CefSharp";
JavascriptBindingPropertyNameCamelCase = "cefSharp";
JavascriptBindingApiHasAllowOrigins = false;
JavascriptBindingApiAllowOrigins = nullptr;
}
!JavascriptBindingSettings()
{
_javascriptBindingApiAllowOrigins = nullptr;
}
~JavascriptBindingSettings()
{
this->!JavascriptBindingSettings();
}
property bool LegacyBindingEnabled;
property bool JavascriptBindingApiEnabled;
property String^ JavascriptBindingPropertyName;
property String^ JavascriptBindingPropertyNameCamelCase;
property bool JavascriptBindingApiHasAllowOrigins;
property CefRefPtr<CefListValue> JavascriptBindingApiAllowOrigins
{
CefRefPtr<CefListValue> get() { return _javascriptBindingApiAllowOrigins.get(); }
void set(CefRefPtr<CefListValue> value) { _javascriptBindingApiAllowOrigins = value.get(); }
}
};
}
}