Check pid to filter echoes of mouse events injected by the Chromoting host.

BUG=None
TEST=Manual


Review URL: http://codereview.chromium.org/8365007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106665 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/remoting/host/local_input_monitor_mac.mm b/remoting/host/local_input_monitor_mac.mm
index b99a5ad..c35a9b6 100644
--- a/remoting/host/local_input_monitor_mac.mm
+++ b/remoting/host/local_input_monitor_mac.mm
@@ -53,9 +53,12 @@
 
 static CGEventRef LocalMouseMoved(CGEventTapProxy proxy, CGEventType type,
                                   CGEventRef event, void* context) {
-  CGPoint cgMousePos = CGEventGetLocation(event);
-  SkIPoint mousePos = SkIPoint::Make(cgMousePos.x, cgMousePos.y);
-  [static_cast<LocalInputMonitorImpl*>(context) localMouseMoved:mousePos];
+  int64_t pid = CGEventGetIntegerValueField(event, kCGEventSourceUnixProcessID);
+  if (pid == 0) {
+    CGPoint cgMousePos = CGEventGetLocation(event);
+    SkIPoint mousePos = SkIPoint::Make(cgMousePos.x, cgMousePos.y);
+    [static_cast<LocalInputMonitorImpl*>(context) localMouseMoved:mousePos];
+  }
   return NULL;
 }