Move PointerLock allow/disallow emulation to browser.

PointerLock allow/disallow use to be emulated from the renderer side.
There was a unique thing that web_tests treated exiting pointer lock
as asynchronous where it really is synchronous. ie. The callback
DidLosePointerLock was called via a PostTask but under the normal
browser flow it is not. This required some adjustments to the tests to
bring them in line with the browser implementation.

This change is necessary since the WebWidget overrides for pointer lock
are going away with RenderWidget removal.

BUG=1097816

Change-Id: Icc58ca6de405308bffb50945b5b828691ff9f2a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2453913
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: danakj <[email protected]>
Commit-Queue: Dave Tapuska <[email protected]>
Cr-Commit-Position: refs/heads/master@{#815203}
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index 0426cc15..a0eb1a0 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -870,6 +870,10 @@
   // ChromeWebViewPermissionHelperDelegate's structure.
   virtual void GotLockMousePermissionResponse(bool allowed) = 0;
 
+  // Drop the mouse lock if it is currently locked, or reject an
+  // outstanding request if it is pending.
+  virtual void DropMouseLockForTesting() = 0;
+
   // Called when the response to a keyboard mouse lock request has arrived.
   // Returns false if the request is no longer valid, otherwise true.
   virtual bool GotResponseToKeyboardLockRequest(bool allowed) = 0;