Re-landing of r30726, which was reverted as a possible cause of chromeos buildbot failures

Handle GTK enter and leave notification events and pass them to WebKit as 
mouse move events. This prevents an HTML widget from staying in the mouseover 
state when the cursor leaves the window. Add a new ui test that checks 
the specific case that was broken by warping the mouse pointer inside and 
outside the content area. 

BUG=24660
TEST=ui_tests 

patch by Dominic Mazzoni <dmazzoni [at] google>
original review: http://codereview.chromium.org/274010/show


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30771 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index 63d2a452..64b0133 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -303,6 +303,7 @@
     IPC_MESSAGE_HANDLER(AutomationMsg_SetWindowVisible, SetWindowVisible)
 #if !defined(OS_MACOSX)
     IPC_MESSAGE_HANDLER(AutomationMsg_WindowClick, WindowSimulateClick)
+    IPC_MESSAGE_HANDLER(AutomationMsg_WindowMouseMove, WindowSimulateMouseMove)
     IPC_MESSAGE_HANDLER(AutomationMsg_WindowKeyPress, WindowSimulateKeyPress)
 #endif  // !defined(OS_MACOSX)
 #if defined(OS_WIN) || defined(OS_LINUX)
@@ -845,6 +846,13 @@
   }
 }
 
+void AutomationProvider::WindowSimulateMouseMove(const IPC::Message& message,
+                                                 int handle,
+                                                 const gfx::Point& location) {
+  if (window_tracker_->ContainsHandle(handle))
+    ui_controls::SendMouseMove(location.x(), location.y());
+}
+
 void AutomationProvider::WindowSimulateKeyPress(const IPC::Message& message,
                                                 int handle,
                                                 int key,