Implemented PointerLock for BrowserPlugin by forwarding PointerLock requests to the embedder, and routing responses back to the guest (essentially).

Added interactive tests for pointerlock that work on Windows and Linux. Manually tested and working on Mac, but mouse movements in test don't seem to work on mac.

BUG=166228


Review URL: https://chromiumcodereview.appspot.com/12047125

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186068 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/browser/browser_plugin/browser_plugin_guest.h b/content/browser/browser_plugin/browser_plugin_guest.h
index 12bf515..a62467f 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.h
+++ b/content/browser/browser_plugin/browser_plugin_guest.h
@@ -247,6 +247,10 @@
   virtual void OnHandleInputEvent(int instance_id,
                                   const gfx::Rect& guest_window_rect,
                                   const WebKit::WebInputEvent* event);
+  void OnLockMouse(bool user_gesture,
+                   bool last_unlocked_by_target,
+                   bool privileged);
+  void OnLockMouseAck(int instance_id, bool succeeded);
   void OnNavigateGuest(int instance_id, const std::string& src);
   void OnPluginDestroyed(int instance_id);
   // Reload the guest. Overriden in tests.
@@ -291,6 +295,8 @@
                         uint32 sync_point);
 
   void OnTerminateGuest(int instance_id);
+  void OnUnlockMouse();
+  void OnUnlockMouseAck(int instance_id);
   void OnUpdateRectACK(
       int instance_id,
       const BrowserPluginHostMsg_AutoSize_Params& auto_size_params,
@@ -340,6 +346,7 @@
   gfx::Rect guest_screen_rect_;
   base::TimeDelta guest_hang_timeout_;
   bool focused_;
+  bool mouse_locked_;
   bool guest_visible_;
   bool embedder_visible_;
   std::string name_;