// 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 ATOM_COMMON_NATIVE_MATE_CONVERTERS_BLINK_CONVERTER_H_ #define ATOM_COMMON_NATIVE_MATE_CONVERTERS_BLINK_CONVERTER_H_ #include "native_mate/converter.h" #include "third_party/WebKit/public/platform/WebCache.h" #include "third_party/WebKit/public/web/WebContextMenuData.h" namespace blink { class WebInputEvent; class WebMouseEvent; class WebMouseWheelEvent; class WebKeyboardEvent; struct WebDeviceEmulationParams; struct WebFindOptions; struct WebFloatPoint; struct WebPoint; struct WebSize; } // namespace blink namespace content { struct NativeWebKeyboardEvent; } namespace mate { int GetWebInputEventType(v8::Isolate* isolate, v8::Local val); template<> struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Local val, blink::WebInputEvent* out); }; template<> struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Local val, blink::WebKeyboardEvent* out); }; template<> struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Local val, content::NativeWebKeyboardEvent* out); static v8::Local ToV8(v8::Isolate* isolate, const content::NativeWebKeyboardEvent& in); }; template<> struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Local val, blink::WebMouseEvent* out); }; template<> struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Local val, blink::WebMouseWheelEvent* out); }; template<> struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Local val, blink::WebFloatPoint* out); }; template<> struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Local val, blink::WebPoint* out); }; template<> struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Local val, blink::WebSize* out); }; template<> struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Local val, blink::WebDeviceEmulationParams* out); }; template<> struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Local val, blink::WebFindOptions* out); }; template<> struct Converter { static v8::Local ToV8(v8::Isolate* isolate, const blink::WebContextMenuData::MediaType& in); }; template<> struct Converter { static v8::Local ToV8(v8::Isolate* isolate, const blink::WebContextMenuData::InputFieldType& in); }; template<> struct Converter { static v8::Local ToV8( v8::Isolate* isolate, const blink::WebCache::ResourceTypeStat& stat); }; template<> struct Converter { static v8::Local ToV8( v8::Isolate* isolate, const blink::WebCache::ResourceTypeStats& stats); }; v8::Local EditFlagsToV8(v8::Isolate* isolate, int editFlags); v8::Local MediaFlagsToV8(v8::Isolate* isolate, int mediaFlags); } // namespace mate #endif // ATOM_COMMON_NATIVE_MATE_CONVERTERS_BLINK_CONVERTER_H_