2018-09-10 02:41:13 +02:00
|
|
|
// Copyright © 2015 The CefSharp Authors. All rights reserved.
|
2015-06-27 16:06:47 +02:00
|
|
|
//
|
|
|
|
|
// 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"
|
2021-02-27 12:11:35 +10:00
|
|
|
#include "JavascriptCallbackRegistry.h"
|
|
|
|
|
|
|
|
|
|
using namespace CefSharp::Internals;
|
2015-06-27 16:06:47 +02:00
|
|
|
|
|
|
|
|
namespace CefSharp
|
|
|
|
|
{
|
2021-02-27 12:11:35 +10:00
|
|
|
namespace BrowserSubprocess
|
2015-06-27 16:06:47 +02:00
|
|
|
{
|
|
|
|
|
namespace Serialization
|
|
|
|
|
{
|
2015-07-06 19:17:00 +02:00
|
|
|
//Functions to serialize/deserialize data sent to/received from the browser process.
|
2015-06-27 16:06:47 +02:00
|
|
|
|
|
|
|
|
//Serializes a V8 structure into a given index of a CefListValue or CefDictionaryValue
|
|
|
|
|
//JavascriptCallbackRegistry should be passed to save V8Values with function types
|
|
|
|
|
template<typename TList, typename TIndex>
|
2015-08-07 13:42:46 +10:00
|
|
|
void SerializeV8Object(const CefRefPtr<CefV8Value> &value, const CefRefPtr<TList>& list, const TIndex& index, JavascriptCallbackRegistry^ callbackRegistry);
|
2015-07-06 19:17:00 +02:00
|
|
|
|
|
|
|
|
//Deserializes data from a given index of a CefListValue or a CefDictionaryValue
|
|
|
|
|
template<typename TList, typename TIndex>
|
2015-08-07 13:42:46 +10:00
|
|
|
CefRefPtr<CefV8Value> DeserializeV8Object(const CefRefPtr<TList>& list, const TIndex& index);
|
2015-06-27 16:06:47 +02:00
|
|
|
}
|
|
|
|
|
}
|
2021-02-27 12:11:35 +10:00
|
|
|
}
|