mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-06 04:00:07 +00:00
00c8aa5449
* Allow JavaScript binding when browser wrapper cannot be found * Store JavascriptBindingSettings per Browser and never remove them This avoids the issue that sometimes browsers are destroyed but then referenced again without them beeing created * Use dict->Values
48 lines
1.4 KiB
C++
48 lines
1.4 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()
|
|
{
|
|
JavascriptBindingApiEnabled = true;
|
|
JavascriptBindingApiHasAllowOrigins = false;
|
|
JavascriptBindingApiAllowOrigins = nullptr;
|
|
}
|
|
|
|
!JavascriptBindingSettings()
|
|
{
|
|
_javascriptBindingApiAllowOrigins = nullptr;
|
|
}
|
|
|
|
~JavascriptBindingSettings()
|
|
{
|
|
this->!JavascriptBindingSettings();
|
|
}
|
|
|
|
property bool JavascriptBindingApiEnabled;
|
|
property bool JavascriptBindingApiHasAllowOrigins;
|
|
property CefRefPtr<CefListValue> JavascriptBindingApiAllowOrigins
|
|
{
|
|
CefRefPtr<CefListValue> get() { return _javascriptBindingApiAllowOrigins.get(); }
|
|
void set(CefRefPtr<CefListValue> value) { _javascriptBindingApiAllowOrigins = value.get(); }
|
|
}
|
|
};
|
|
}
|
|
}
|