Gamepad: make page visibility behavior layout testable

This CL refactors testing infrastructure for gamepad so that we can
actually write a layout test that would fail if Blink doesn't honor
visibility state. Now Platform::setGamepadListener is now hooked to
GamepadController.

BUG=344556

Review URL: https://codereview.chromium.org/304403002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278723 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h
index 4afe3ed..d8d50c8 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -192,6 +192,11 @@
     layout_test_mode_ = layout_test_mode;
   }
 
+  RendererWebKitPlatformSupportImpl* webkit_platform_support() const {
+    DCHECK(webkit_platform_support_);
+    return webkit_platform_support_.get();
+  }
+
   IPC::ForwardingMessageFilter* compositor_output_surface_filter() const {
     return compositor_output_surface_filter_.get();
   }