Surface synchronization: Only throttle input on Chrome OS

Input throttling is not currently well supported on non-Chrome OS platforms
and that's causing some crashes in the wild. Input throttling still makes
sense on any synchronization event on any platform because things aren't
getting updated while we are synchronizing but for the time being to avoid
crashes in the wild, this CL disables input throttling outside of Chrome OS.

TBR=fsamuel@chromium.org

(cherry picked from commit 053e08962e327a9d5ac1958d7f808d55de9eaad4)

Bug: 672962, 791447
Change-Id: I0ac419a683f8a0f735e746fa629a037370fbd169
Reviewed-on: https://chromium-review.googlesource.com/932542
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Fady Samuel <fsamuel@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#538872}
Reviewed-on: https://chromium-review.googlesource.com/937384
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Cr-Commit-Position: refs/branch-heads/3325@{#589}
Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369}
diff --git a/ui/aura/window_tree_host.cc b/ui/aura/window_tree_host.cc
index 27b2b89..de85e1d 100644
--- a/ui/aura/window_tree_host.cc
+++ b/ui/aura/window_tree_host.cc
@@ -297,7 +297,9 @@
       base::ThreadTaskRunnerHandle::Get(), enable_surface_synchronization,
       ui::IsPixelCanvasRecordingEnabled(), external_begin_frames_enabled,
       force_software_compositor));
+#if defined(OS_CHROMEOS)
   compositor_->AddObserver(this);
+#endif
   if (!dispatcher()) {
     window()->Init(ui::LAYER_NOT_DRAWN);
     window()->set_host(this);
diff --git a/ui/aura/window_tree_host_unittest.cc b/ui/aura/window_tree_host_unittest.cc
index e1ee4cb..6dbddb6 100644
--- a/ui/aura/window_tree_host_unittest.cc
+++ b/ui/aura/window_tree_host_unittest.cc
@@ -77,6 +77,7 @@
             host()->compositor()->root_layer()->subpixel_position_offset());
 }
 
+#if defined(OS_CHROMEOS)
 TEST_F(WindowTreeHostTest, HoldPointerMovesOnChildResizing) {
   aura::WindowEventDispatcher* dispatcher = host()->dispatcher();
 
@@ -98,6 +99,7 @@
   // Pointer moves should be routed normally after commit.
   EXPECT_FALSE(dispatcher_api.HoldingPointerMoves());
 }
+#endif
 
 TEST_F(WindowTreeHostTest, NoRewritesPostIME) {
   CounterEventRewriter event_rewriter;