The context menu on the web page on Windows should be displayed when the long press gesture is released rather than while it is pressed.

This is inconsistent with the way the long press context menu gesture works on Windows. Additionally the long press gesture in Chrome displays the
context menu on the tabstrip and the caption when the touch is released which makes it super confusing.

Changes in this patch are as below:-

1. The RenderWidgetHostViewAura::OnShowContextMenu function now returns a bool indicating whether the context menu should be displayed or not. It currently
   returns false on Windows if the menu is being displayed in response to a touch gesture. If yes then it sets a state indicating that the context menu
   needs to display when the long press gesture is released via a touch up.
   On other platforms it returns true.

2, The WebContentsViewAura::ShowContextMenu function which gets invoked when the context menu is requested by the web page calls the
   RenderWidgetHostViewAura::OnShowContextMenu function and if it returns false does not display the context menu.

3. The RenderWidgetHostViewAura::HandleGesutureForTouchSelection handles the ET_GESTURE_LONG_TAP on Windows and if we have a pending context menu request, it
   calls the WebContentsViewAura::ShowContextMenu function to display the context menu with the menu source now set to mouse.

BUG=562739.
TEST=RenderWidgetHostViewAuraWithViewHarnessTest.ContextMenuTest

Review URL: https://codereview.chromium.org/1602903003

Cr-Commit-Position: refs/heads/master@{#371078}
7 files changed