diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index c8d7daf4d600..69c2d2d99766 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -1479,7 +1479,8 @@ void WebContents::SendInputEvent(v8::Isolate* isolate, if (!view) return; - int type = mate::GetWebInputEventType(isolate, input_event); + blink::WebInputEvent::Type type = mate::GetWebInputEventType(isolate, + input_event); if (blink::WebInputEvent::IsMouseEventType(type)) { blink::WebMouseEvent mouse_event; if (mate::ConvertFromV8(isolate, input_event, &mouse_event)) { diff --git a/atom/common/native_mate_converters/blink_converter.cc b/atom/common/native_mate_converters/blink_converter.cc index 70b6e6d69712..4bfde54dae61 100644 --- a/atom/common/native_mate_converters/blink_converter.cc +++ b/atom/common/native_mate_converters/blink_converter.cc @@ -137,7 +137,8 @@ struct Converter { } }; -int GetWebInputEventType(v8::Isolate* isolate, v8::Local val) { +blink::WebInputEvent::Type GetWebInputEventType(v8::Isolate* isolate, + v8::Local val) { blink::WebInputEvent::Type type = blink::WebInputEvent::kUndefined; mate::Dictionary dict; ConvertFromV8(isolate, val, &dict) && dict.Get("type", &type); diff --git a/atom/common/native_mate_converters/blink_converter.h b/atom/common/native_mate_converters/blink_converter.h index 7b3a14e83072..715aa272f14a 100644 --- a/atom/common/native_mate_converters/blink_converter.h +++ b/atom/common/native_mate_converters/blink_converter.h @@ -7,10 +7,11 @@ #include "native_mate/converter.h" #include "third_party/WebKit/public/platform/WebCache.h" +#include "third_party/WebKit/public/platform/WebInputEvent.h" #include "third_party/WebKit/public/web/WebContextMenuData.h" + namespace blink { -class WebInputEvent; class WebMouseEvent; class WebMouseWheelEvent; class WebKeyboardEvent; @@ -27,7 +28,8 @@ struct NativeWebKeyboardEvent; namespace mate { -int GetWebInputEventType(v8::Isolate* isolate, v8::Local val); +blink::WebInputEvent::Type GetWebInputEventType(v8::Isolate* isolate, + v8::Local val); template<> struct Converter {