Add blink::WebInputEvent::IsPinchGestureEventType().
https://codereview.chromium.org/2861373004
This commit is contained in:
parent
650902c656
commit
f03ca53af5
3 changed files with 8 additions and 4 deletions
|
@ -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)) {
|
||||
|
|
|
@ -137,7 +137,8 @@ struct Converter<blink::WebInputEvent::Modifiers> {
|
|||
}
|
||||
};
|
||||
|
||||
int GetWebInputEventType(v8::Isolate* isolate, v8::Local<v8::Value> val) {
|
||||
blink::WebInputEvent::Type GetWebInputEventType(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> val) {
|
||||
blink::WebInputEvent::Type type = blink::WebInputEvent::kUndefined;
|
||||
mate::Dictionary dict;
|
||||
ConvertFromV8(isolate, val, &dict) && dict.Get("type", &type);
|
||||
|
|
|
@ -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<v8::Value> val);
|
||||
blink::WebInputEvent::Type GetWebInputEventType(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> val);
|
||||
|
||||
template<>
|
||||
struct Converter<blink::WebInputEvent> {
|
||||
|
|
Loading…
Reference in a new issue