electron/shell/common/gin_converters/blink_converter.h
Electron Bot 2b53788c35
chore: bump chromium to 4b6692e4cc2839729bb7ac009586a (master) (#21864)
* chore: bump chromium in DEPS to a1ea0d7aedd6b5fe58fbabfa3b05aa8ee41304ff

* update patches

* update extensions code

* Remove WebPoint

https://chromium-review.googlesource.com/c/chromium/src/+/2007474

* fix build

* chore: bump chromium in DEPS to 9351e26c2a3714f8bbb10789c71bb51b0b494c75

* update patches

* Remove error description from the DidFailLoadWithError message

https://chromium-review.googlesource.com/c/chromium/src/+/2011280

* Make SimpleNetworkHintsHandlerImpl use the right NetworkIsolationKey

https://chromium-review.googlesource.com/c/chromium/src/+/1994430

* Rename libgtkui to gtk

https://chromium-review.googlesource.com/c/chromium/src/+/2011683

* [metrics] Remove histogram Startup.WarmStartTimeFromRemoteProcessStart*.

https://chromium-review.googlesource.com/c/chromium/src/+/2003211

* fix requestSingleInstanceLock test

* chore: bump chromium in DEPS to a813567a4f17ea08292c2b26fa10d0ffd47010d9

* chore: bump chromium in DEPS to f0aca2de536ceecd6eb66e928051d11e6d11991f

* chore: bump chromium in DEPS to 865556af6d0c9d990f5b1816cb792f7c3859667b

* chore: bump chromium in DEPS to 98538fdd28c4b6692e4cc2839729bb7ac009586a

* update patches

* fix broken tests

* Update node tests for v8 changes

* Update node patches for test failures

* Update for number of tests

Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net>
Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
2020-01-29 07:01:37 -05:00

118 lines
3.7 KiB
C++

// Copyright (c) 2015 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef SHELL_COMMON_GIN_CONVERTERS_BLINK_CONVERTER_H_
#define SHELL_COMMON_GIN_CONVERTERS_BLINK_CONVERTER_H_
#include "gin/converter.h"
#include "third_party/blink/public/common/input/web_input_event.h"
#include "third_party/blink/public/common/messaging/cloneable_message.h"
#include "third_party/blink/public/common/web_cache/web_cache_resource_type_stats.h"
#include "third_party/blink/public/web/web_context_menu_data.h"
namespace blink {
class WebMouseEvent;
class WebMouseWheelEvent;
class WebKeyboardEvent;
struct WebDeviceEmulationParams;
struct WebSize;
} // namespace blink
namespace gin {
blink::WebInputEvent::Type GetWebInputEventType(v8::Isolate* isolate,
v8::Local<v8::Value> val);
template <>
struct Converter<blink::WebInputEvent> {
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
blink::WebInputEvent* out);
};
template <>
struct Converter<blink::WebKeyboardEvent> {
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
blink::WebKeyboardEvent* out);
};
template <>
struct Converter<blink::WebMouseEvent> {
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
blink::WebMouseEvent* out);
};
template <>
struct Converter<blink::WebMouseWheelEvent> {
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
blink::WebMouseWheelEvent* out);
};
template <>
struct Converter<blink::WebSize> {
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
blink::WebSize* out);
};
template <>
struct Converter<blink::WebDeviceEmulationParams> {
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
blink::WebDeviceEmulationParams* out);
};
template <>
struct Converter<blink::ContextMenuDataMediaType> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const blink::ContextMenuDataMediaType& in);
};
template <>
struct Converter<blink::ContextMenuDataInputFieldType> {
static v8::Local<v8::Value> ToV8(
v8::Isolate* isolate,
const blink::ContextMenuDataInputFieldType& in);
};
template <>
struct Converter<blink::WebCacheResourceTypeStat> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const blink::WebCacheResourceTypeStat& stat);
};
template <>
struct Converter<blink::WebCacheResourceTypeStats> {
static v8::Local<v8::Value> ToV8(
v8::Isolate* isolate,
const blink::WebCacheResourceTypeStats& stats);
};
template <>
struct Converter<network::mojom::ReferrerPolicy> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const network::mojom::ReferrerPolicy& in);
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
network::mojom::ReferrerPolicy* out);
};
template <>
struct Converter<blink::CloneableMessage> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const blink::CloneableMessage& in);
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
blink::CloneableMessage* out);
};
v8::Local<v8::Value> EditFlagsToV8(v8::Isolate* isolate, int editFlags);
v8::Local<v8::Value> MediaFlagsToV8(v8::Isolate* isolate, int mediaFlags);
} // namespace gin
#endif // SHELL_COMMON_GIN_CONVERTERS_BLINK_CONVERTER_H_