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

Unified Diff: chrome/browser/android/vr_shell/vr_shell_gl.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
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell.cc ('k') | chrome/browser/android/vr_shell/vr_shell_gl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/vr_shell_gl.h
diff --git a/chrome/browser/android/vr_shell/vr_shell_gl.h b/chrome/browser/android/vr_shell/vr_shell_gl.h
index 277ddfa4ecb87155da930820c7d98284bbdda60c..d493790def457093769069ece9481eca2b25e143 100644
--- a/chrome/browser/android/vr_shell/vr_shell_gl.h
+++ b/chrome/browser/android/vr_shell/vr_shell_gl.h
@@ -43,6 +43,7 @@ namespace vr_shell {
class FPSMeter;
class MailboxToSurfaceBridge;
class UiScene;
+class VrBrowserInterface;
class VrController;
class VrShell;
class VrShellRenderer;
@@ -67,8 +68,7 @@ class VrShellGl : public device::mojom::VRVSyncProvider {
CONTENT,
};
- VrShellGl(const base::WeakPtr<VrShell>& weak_vr_shell,
- scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner,
+ VrShellGl(VrBrowserInterface* browser,
gvr_context* gvr_api,
bool initially_web_vr,
bool reprojected_rendering,
@@ -82,6 +82,10 @@ class VrShellGl : public device::mojom::VRVSyncProvider {
void OnPause();
void OnResume();
+ scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() {
+ return task_runner_;
+ }
+
void SetWebVrMode(bool enabled);
void CreateOrResizeWebVRSurface(const gfx::Size& size);
void CreateContentSurface();
@@ -225,8 +229,7 @@ class VrShellGl : public device::mojom::VRVSyncProvider {
mojo::Binding<device::mojom::VRVSyncProvider> binding_;
device::mojom::VRSubmitFrameClientPtr submit_client_;
- base::WeakPtr<VrShell> weak_vr_shell_;
- scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
+ VrBrowserInterface* browser_;
UiScene* scene_ = nullptr;
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell.cc ('k') | chrome/browser/android/vr_shell/vr_shell_gl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698