Revert 230660 "Relanding this with fixes for the SyncPolicyTest...."

After the reland XP dbg failed again:
http://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%28dbg%29%283%29/builds/40676

> Relanding this with fixes for the SyncPolicyTest.TestEvent and SyncPolicyTest.TestEventReadOnly tests.
> 
> Replace the CreateEvent/OpenEvent patches with their Nt counterparts like
> NtOpenEvent and NtCreateEvent.
> 
> Reason being :- We patch these APIS via the Export table patch which does not
> work with bound imports. This results in our
> patched functions never getting called.
> 
> This should fix the GPU process hang with the XP presentation path.
> 
> BUG=305815
> TBR=cpu,rvargas,thakis
> 
> Review URL: https://codereview.chromium.org/39473002

TBR=ananta@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230670 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 230670
Avoid creating two resizers for two-finger drag. This CL is trying to avoid creating two separate WindowResizer instances that are now created in both ToplevelWindowEventHandler and TwoFingerDragHandler in the following scenario:
 . Start dragging a window with a touch.
 . Drag a bit, then add a second finger (touching the caption).
 . Continue dragging.
 . Release both fingers.
In this scenario a WindowResizer is first created by ToplevelWindowEventHandler::OnGestureEvent(ET_GESTURE_SCROLL_BEGIN) and then a second instance gets created by TwoFingerDragHandler::ProcessGestureEvent(ET_GESTURE_BEGIN) when a second finger touches down. This scenario is probably an oversight but was not causing too many problems other than occasional window moving jitter. However with the docked windows introduction the DockedWindowLayoutManager currently assumes a single window resizing operation and breaks when FinishDragging is called for the second time.

Additional complication is when this one-two-finger gesture is used to drag a tab out of a browser. In this case The first resizer is created when ToplevelWindowEventHandler::RunMoveLoop is invoked and not as a result of a gesture (not in ToplevelWindowEventHandler::OnGestureEvent). I have added an accessor to the current window resizer to wm::WindowState and use it to determine if a new resizer needs to be created.

I have corrected the state model in TwoFingerDragHandler to always Complete or Revert a drag once it started. This takes care of scenarios when drags start with one or two fingers and get stopped when more fingers are added.

BUG=305730
TEST=interactive_ui_tests --gtest_filter=*TabDragControllerTest*DetachToOwnWindowTwo*/1
TEST=ash_unittests --gtest_filter=*SystemGestureEventFilterTest.TwoFingerDragDelayed*
TEST=ash_unittests --gtest_filter=*SystemGestureEventFilterTest.ThreeFingerGestureStopsDrag*

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230671 0039d316-1c4b-4281-b951-d872f2087c98
Re-enable TabCaptureApiTest.ApiTests for Linux.

BUG=261493

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230672 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 230672