Index: content/renderer/input/render_widget_input_handler.cc |
diff --git a/content/renderer/input/render_widget_input_handler.cc b/content/renderer/input/render_widget_input_handler.cc |
index d5d5255c02f9c864a383a94ca1745f640d47461b..54f2b9c57928582fec78d52d91b673f1674c37a0 100644 |
--- a/content/renderer/input/render_widget_input_handler.cc |
+++ b/content/renderer/input/render_widget_input_handler.cc |
@@ -294,7 +294,13 @@ void RenderWidgetInputHandler::HandleInputEvent( |
if (WebInputEvent::isGestureEventType(input_event.type)) { |
const WebGestureEvent& gesture_event = |
static_cast<const WebGestureEvent&>(input_event); |
- context_menu_source_type_ = ui::MENU_SOURCE_TOUCH; |
+ if (input_event.type == WebInputEvent::GestureLongPress) { |
+ context_menu_source_type_ = ui::MENU_SOURCE_LONG_PRESS; |
+ } else if (input_event.type == WebInputEvent::GestureLongTap) { |
+ context_menu_source_type_ = ui::MENU_SOURCE_LONG_TAP; |
+ } else { |
+ context_menu_source_type_ = ui::MENU_SOURCE_TOUCH; |
tdresser
2016/01/26 20:26:30
Do we ever use ui::MENU_SOURCE_TOUCH now? I though
|
+ } |
prevent_default = |
prevent_default || delegate_->WillHandleGestureEvent(gesture_event); |
} |