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

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

Issue 2866853002: VR: Wire VrShell UI-related state to the scene manager. (Closed)
Patch Set: Created 3 years, 7 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 ca04334984715364c3bc296f529f9f80955af4e8..ef734ea89e0ac99aa0e984f741f1b181ea171aa5 100644
--- a/chrome/browser/android/vr_shell/vr_gl_thread.h
+++ b/chrome/browser/android/vr_shell/vr_gl_thread.h
@@ -14,6 +14,8 @@
#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"
+class GURL;
+
namespace vr_shell {
class UiScene;
@@ -21,7 +23,9 @@ class UiSceneManager;
class VrShell;
class VrShellGl;
-class VrGLThread : public VrBrowserInterface, public base::Thread {
+class VrGLThread : public VrBrowserInterface,
mthiesse 2017/05/08 16:04:55 Sidenote, we should think about renaming this clas
cjgrant 2017/05/08 19:17:22 I think the name is still right, but all the cross
+ public base::Thread,
mthiesse 2017/05/08 16:04:55 Is there some style-guide approved way to order th
cjgrant 2017/05/08 19:17:22 I don't think there's a style guide. But, having
+ public UiInterface {
public:
VrGLThread(
const base::WeakPtr<VrShell>& weak_vr_shell,
@@ -36,12 +40,12 @@ class VrGLThread : public VrBrowserInterface, public base::Thread {
return weak_scene_manager_;
}
- // VrBrowserInterface implementation.
+ // VrBrowserInterface implementation (VrShellGl calling to UI and VrShell).
void ContentSurfaceChanged(jobject surface) override;
void GvrDelegateReady() override;
void UpdateGamepadData(device::GvrGamepadData) override;
+ void AppButtonClicked() override;
void AppButtonGesturePerformed(UiInterface::Direction direction) override;
- void OnAppButtonClicked() override;
void ProcessContentGesture(
std::unique_ptr<blink::WebInputEvent> event) override;
void ForceExitVr() override;
@@ -50,6 +54,16 @@ class VrGLThread : public VrBrowserInterface, public base::Thread {
device::mojom::VRDisplayInfoPtr* info) override;
void OnContentPaused(bool enabled) override;
+ // UiInterface implementation (VrShell calling to the UI).
+ void SetWebVr(bool enabled) override;
+ void SetURL(const GURL& gurl) override;
+ void SetFullscreen(bool enabled) override;
+ void SetSecurityLevel(int level) override;
+ void SetWebVRSecureOrigin(bool secure) override;
+ void SetLoading(bool loading) override;
+ void SetLoadProgress(double progress) override;
+ void SetHistoryButtonsEnabled(bool can_go_back, bool can_go_forward) override;
+
protected:
void Init() override;
void CleanUp() override;

Powered by Google App Engine
This is Rietveld 408576698