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)
|
if (!view)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int type = mate::GetWebInputEventType(isolate, input_event);
|
blink::WebInputEvent::Type type = mate::GetWebInputEventType(isolate,
|
||||||
|
input_event);
|
||||||
if (blink::WebInputEvent::IsMouseEventType(type)) {
|
if (blink::WebInputEvent::IsMouseEventType(type)) {
|
||||||
blink::WebMouseEvent mouse_event;
|
blink::WebMouseEvent mouse_event;
|
||||||
if (mate::ConvertFromV8(isolate, input_event, &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;
|
blink::WebInputEvent::Type type = blink::WebInputEvent::kUndefined;
|
||||||
mate::Dictionary dict;
|
mate::Dictionary dict;
|
||||||
ConvertFromV8(isolate, val, &dict) && dict.Get("type", &type);
|
ConvertFromV8(isolate, val, &dict) && dict.Get("type", &type);
|
||||||
|
|
|
@ -7,10 +7,11 @@
|
||||||
|
|
||||||
#include "native_mate/converter.h"
|
#include "native_mate/converter.h"
|
||||||
#include "third_party/WebKit/public/platform/WebCache.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"
|
#include "third_party/WebKit/public/web/WebContextMenuData.h"
|
||||||
|
|
||||||
|
|
||||||
namespace blink {
|
namespace blink {
|
||||||
class WebInputEvent;
|
|
||||||
class WebMouseEvent;
|
class WebMouseEvent;
|
||||||
class WebMouseWheelEvent;
|
class WebMouseWheelEvent;
|
||||||
class WebKeyboardEvent;
|
class WebKeyboardEvent;
|
||||||
|
@ -27,7 +28,8 @@ struct NativeWebKeyboardEvent;
|
||||||
|
|
||||||
namespace mate {
|
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<>
|
template<>
|
||||||
struct Converter<blink::WebInputEvent> {
|
struct Converter<blink::WebInputEvent> {
|
||||||
|
|
Loading…
Reference in a new issue