Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4551)

Unified Diff: chrome/browser/android/vr_shell/vr_gl_thread.h

Issue 2833773005: Pause drawing webvr when the App button is pressed (Closed)
Patch Set: make UiBrowserInterface a raw ptr Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/vr_shell/vr_gl_thread.h
diff --git a/chrome/browser/android/vr_shell/vr_gl_thread.h b/chrome/browser/android/vr_shell/vr_gl_thread.h
index 9e35938f3b427a7c9aa092ddaf9468bc8c226b84..ca04334984715364c3bc296f529f9f80955af4e8 100644
--- a/chrome/browser/android/vr_shell/vr_gl_thread.h
+++ b/chrome/browser/android/vr_shell/vr_gl_thread.h
@@ -11,6 +11,7 @@
#include "base/memory/weak_ptr.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread.h"
+#include "chrome/browser/android/vr_shell/vr_browser_interface.h"
#include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/gvr_types.h"
namespace vr_shell {
@@ -20,7 +21,7 @@ class UiSceneManager;
class VrShell;
class VrShellGl;
-class VrGLThread : public base::Thread {
+class VrGLThread : public VrBrowserInterface, public base::Thread {
public:
VrGLThread(
const base::WeakPtr<VrShell>& weak_vr_shell,
@@ -35,6 +36,20 @@ class VrGLThread : public base::Thread {
return weak_scene_manager_;
}
+ // VrBrowserInterface implementation.
+ void ContentSurfaceChanged(jobject surface) override;
+ void GvrDelegateReady() override;
+ void UpdateGamepadData(device::GvrGamepadData) override;
+ void AppButtonGesturePerformed(UiInterface::Direction direction) override;
+ void OnAppButtonClicked() override;
+ void ProcessContentGesture(
+ std::unique_ptr<blink::WebInputEvent> event) override;
+ void ForceExitVr() override;
+ void RunVRDisplayInfoCallback(
+ const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback,
+ device::mojom::VRDisplayInfoPtr* info) override;
+ void OnContentPaused(bool enabled) override;
+
protected:
void Init() override;
void CleanUp() override;
« no previous file with comments | « chrome/browser/android/vr_shell/vr_browser_interface.h ('k') | chrome/browser/android/vr_shell/vr_gl_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698