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.
|
|
|
|
|
|
|
|
#ifndef SHELL_COMMON_GIN_CONVERTERS_FRAME_CONVERTER_H_
|
|
|
|
#define SHELL_COMMON_GIN_CONVERTERS_FRAME_CONVERTER_H_
|
|
|
|
|
|
|
|
#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);
|
|
|
|
};
|
|
|
|
|
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
|
|
|
|
|
|
|
|
#endif // SHELL_COMMON_GIN_CONVERTERS_FRAME_CONVERTER_H_
|