Remove dead VR Pause code.

We have several concepts of focus/active/etc for VR headsets. One of
these represents menu mode, where the browser temporarily unfocuses a
VR experience.  This is not hooked up currently, so we have stale code.

This dead code would otherwise need to be converted when VRDevice is
mojoified, so removing for now.  If we want to add back a similar  way
to pause experiences, we can easily add it back.

BUG=795510

Change-Id: Ifba2d7d6f23ba668c5f259a9326acb4983f13836
Reviewed-on: https://chromium-review.googlesource.com/1068097
Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
Commit-Queue: Bill Orr <billorr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560697}
diff --git a/chrome/browser/android/vr/gl_browser_interface.h b/chrome/browser/android/vr/gl_browser_interface.h
index bc0de352..389f04c 100644
--- a/chrome/browser/android/vr/gl_browser_interface.h
+++ b/chrome/browser/android/vr/gl_browser_interface.h
@@ -39,7 +39,6 @@
                                     gl::SurfaceTexture* texture) = 0;
   virtual void UpdateGamepadData(device::GvrGamepadData) = 0;
   virtual void ForceExitVr() = 0;
-  virtual void OnContentPaused(bool enabled) = 0;
   virtual void ToggleCardboardGamepad(bool enabled) = 0;
   virtual void ReportUiActivityResultForTesting(
       const VrUiTestActivityResult& result) = 0;
diff --git a/chrome/browser/android/vr/vr_gl_thread.cc b/chrome/browser/android/vr/vr_gl_thread.cc
index bc6f4b3..71f0560a 100644
--- a/chrome/browser/android/vr/vr_gl_thread.cc
+++ b/chrome/browser/android/vr/vr_gl_thread.cc
@@ -211,13 +211,6 @@
       FROM_HERE, base::BindOnce(&VrShell::ExitFullscreen, weak_vr_shell_));
 }
 
-void VrGLThread::OnContentPaused(bool enabled) {
-  DCHECK(OnGlThread());
-  main_thread_task_runner_->PostTask(
-      FROM_HERE,
-      base::BindOnce(&VrShell::OnContentPaused, weak_vr_shell_, enabled));
-}
-
 void VrGLThread::Navigate(GURL gurl, NavigationMethod method) {
   DCHECK(OnGlThread());
   main_thread_task_runner_->PostTask(
diff --git a/chrome/browser/android/vr/vr_gl_thread.h b/chrome/browser/android/vr/vr_gl_thread.h
index 000eed4..4e5ddc3 100644
--- a/chrome/browser/android/vr/vr_gl_thread.h
+++ b/chrome/browser/android/vr/vr_gl_thread.h
@@ -68,7 +68,6 @@
                             gl::SurfaceTexture* texture) override;
   void UpdateGamepadData(device::GvrGamepadData) override;
   void ForceExitVr() override;
-  void OnContentPaused(bool enabled) override;
   void ToggleCardboardGamepad(bool enabled) override;
 
   // PlatformInputHandler
diff --git a/chrome/browser/android/vr/vr_shell.cc b/chrome/browser/android/vr/vr_shell.cc
index 364d273..e38d79f 100644
--- a/chrome/browser/android/vr/vr_shell.cc
+++ b/chrome/browser/android/vr/vr_shell.cc
@@ -322,19 +322,6 @@
                                                       std::move(task));
 }
 
-void VrShell::OnContentPaused(bool paused) {
-  device::VRDevice* device = delegate_provider_->GetDevice();
-  if (!device)
-    return;
-
-  // TODO(mthiesse): The page is no longer visible when in menu mode. We
-  // should unfocus or otherwise let it know it's hidden.
-  if (paused)
-    device->Blur();
-  else
-    device->Focus();
-}
-
 void VrShell::Navigate(GURL url, NavigationMethod method) {
   JNIEnv* env = base::android::AttachCurrentThread();
 
diff --git a/chrome/browser/android/vr/vr_shell.h b/chrome/browser/android/vr/vr_shell.h
index 15f0af5..b544e10 100644
--- a/chrome/browser/android/vr/vr_shell.h
+++ b/chrome/browser/android/vr/vr_shell.h
@@ -129,7 +129,6 @@
                     const base::android::JavaParamRef<jobject>& obj,
                     jboolean incognito,
                     jint id);
-  void OnContentPaused(bool paused);
   void Navigate(GURL url, NavigationMethod method);
   void NavigateBack();
   void NavigateForward();
diff --git a/device/vr/vr_device.h b/device/vr/vr_device.h
index 13fe9cc..4058528 100644
--- a/device/vr/vr_device.h
+++ b/device/vr/vr_device.h
@@ -46,8 +46,6 @@
   virtual unsigned int GetId() const = 0;
   virtual void PauseTracking() = 0;
   virtual void ResumeTracking() = 0;
-  virtual void Blur() = 0;
-  virtual void Focus() = 0;
   virtual mojom::VRDisplayInfoPtr GetVRDisplayInfo() = 0;
   virtual void SetMagicWindowEnabled(bool enabled) = 0;
 
diff --git a/device/vr/vr_device_base.cc b/device/vr/vr_device_base.cc
index 37388a0..87741dc 100644
--- a/device/vr/vr_device_base.cc
+++ b/device/vr/vr_device_base.cc
@@ -27,16 +27,6 @@
 
 void VRDeviceBase::ResumeTracking() {}
 
-void VRDeviceBase::Blur() {
-  for (VRDisplayImpl* display : displays_)
-    display->OnBlur();
-}
-
-void VRDeviceBase::Focus() {
-  for (VRDisplayImpl* display : displays_)
-    display->OnFocus();
-}
-
 void VRDeviceBase::OnExitPresent() {
   if (!presenting_display_)
     return;
diff --git a/device/vr/vr_device_base.h b/device/vr/vr_device_base.h
index 4e36171..58a94709 100644
--- a/device/vr/vr_device_base.h
+++ b/device/vr/vr_device_base.h
@@ -28,8 +28,6 @@
   unsigned int GetId() const override;
   void PauseTracking() override;
   void ResumeTracking() override;
-  void Blur() override;
-  void Focus() override;
   void OnExitPresent() override;
   mojom::VRDisplayInfoPtr GetVRDisplayInfo() final;
   void SetMagicWindowEnabled(bool enabled) final;
diff --git a/device/vr/vr_display_impl.cc b/device/vr/vr_display_impl.cc
index 46a4d6c..04ce15a 100644
--- a/device/vr/vr_display_impl.cc
+++ b/device/vr/vr_display_impl.cc
@@ -43,14 +43,6 @@
   client_->OnExitPresent();
 }
 
-void VRDisplayImpl::OnBlur() {
-  client_->OnBlur();
-}
-
-void VRDisplayImpl::OnFocus() {
-  client_->OnFocus();
-}
-
 void VRDisplayImpl::OnActivate(mojom::VRDisplayEventReason reason,
                                base::Callback<void(bool)> on_handled) {
   client_->OnActivate(reason, std::move(on_handled));
diff --git a/device/vr/vr_display_impl.h b/device/vr/vr_display_impl.h
index 6eef295..f8b124c 100644
--- a/device/vr/vr_display_impl.h
+++ b/device/vr/vr_display_impl.h
@@ -36,8 +36,6 @@
 
   virtual void OnChanged(mojom::VRDisplayInfoPtr vr_device_info);
   virtual void OnExitPresent();
-  virtual void OnBlur();
-  virtual void OnFocus();
   virtual void OnActivate(mojom::VRDisplayEventReason reason,
                           base::Callback<void(bool)> on_handled);
   virtual void OnDeactivate(mojom::VRDisplayEventReason reason);