2020-10-09 16:50:46 +00:00
|
|
|
// Copyright (c) 2020 Samuel Maddock <sam@samuelmaddock.com>.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#ifndef ELECTRON_SHELL_COMMON_GIN_CONVERTERS_FRAME_CONVERTER_H_
|
|
|
|
#define ELECTRON_SHELL_COMMON_GIN_CONVERTERS_FRAME_CONVERTER_H_
|
2020-10-09 16:50:46 +00:00
|
|
|
|
|
|
|
#include "gin/converter.h"
|
2021-09-01 22:21:15 +00:00
|
|
|
#include "shell/common/gin_helper/accessor.h"
|
2020-10-09 16:50:46 +00:00
|
|
|
|
|
|
|
namespace content {
|
|
|
|
class RenderFrameHost;
|
2021-07-02 00:51:37 +00:00
|
|
|
}
|
2020-10-09 16:50:46 +00:00
|
|
|
|
|
|
|
namespace gin {
|
|
|
|
|
|
|
|
template <>
|
|
|
|
struct Converter<content::RenderFrameHost*> {
|
|
|
|
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
|
|
|
|
content::RenderFrameHost* val);
|
2022-08-22 21:15:32 +00:00
|
|
|
static bool FromV8(v8::Isolate* isolate,
|
|
|
|
v8::Local<v8::Value> val,
|
|
|
|
content::RenderFrameHost** out);
|
2020-10-09 16:50:46 +00:00
|
|
|
};
|
|
|
|
|
2021-09-01 22:21:15 +00:00
|
|
|
template <>
|
|
|
|
struct Converter<gin_helper::AccessorValue<content::RenderFrameHost*>> {
|
|
|
|
static v8::Local<v8::Value> ToV8(
|
|
|
|
v8::Isolate* isolate,
|
|
|
|
gin_helper::AccessorValue<content::RenderFrameHost*> val);
|
|
|
|
static bool FromV8(v8::Isolate* isolate,
|
|
|
|
v8::Local<v8::Value> val,
|
|
|
|
gin_helper::AccessorValue<content::RenderFrameHost*>* out);
|
|
|
|
};
|
|
|
|
|
2020-10-09 16:50:46 +00:00
|
|
|
} // namespace gin
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#endif // ELECTRON_SHELL_COMMON_GIN_CONVERTERS_FRAME_CONVERTER_H_
|