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

Side by Side Diff: chrome/browser/android/vr_shell/gl_browser_interface.h

Issue 2950173002: VR: System indicator rework. (Closed)
Patch Set: Address comments; increase size slightly for readability, now that position is dynamic. Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_GL_BROWSER_INTERFACE_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_GL_BROWSER_INTERFACE_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_GL_BROWSER_INTERFACE_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_GL_BROWSER_INTERFACE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/android/jni_weak_ref.h" 10 #include "base/android/jni_weak_ref.h"
11 #include "chrome/browser/android/vr_shell/ui_interface.h" 11 #include "chrome/browser/android/vr_shell/ui_interface.h"
12 #include "device/vr/android/gvr/gvr_gamepad_data_provider.h" 12 #include "device/vr/android/gvr/gvr_gamepad_data_provider.h"
13 #include "device/vr/vr_service.mojom.h" 13 #include "device/vr/vr_service.mojom.h"
14 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/ gvr_types.h" 14 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/ gvr_types.h"
15 15
16 namespace blink { 16 namespace blink {
17 class WebInputEvent; 17 class WebInputEvent;
18 } 18 }
19 19
20 namespace vr_shell { 20 namespace vr_shell {
21 21
22 // An interface for the GL thread to communicate with VrShell. Many of the 22 // An interface for the GL thread to communicate with the rest of the system
23 // functions in this interface are proxies to methods on VrShell. 23 // (UI, VrShell, etc). Many of the functions in this interface are proxies to
24 // methods on VrShell.
24 class GlBrowserInterface { 25 class GlBrowserInterface {
25 public: 26 public:
26 virtual ~GlBrowserInterface() = default; 27 virtual ~GlBrowserInterface() = default;
27 28
28 virtual void ContentSurfaceChanged(jobject surface) = 0; 29 virtual void ContentSurfaceChanged(jobject surface) = 0;
29 virtual void GvrDelegateReady(gvr::ViewerType viewer_type) = 0; 30 virtual void GvrDelegateReady(gvr::ViewerType viewer_type) = 0;
30 virtual void UpdateGamepadData(device::GvrGamepadData) = 0; 31 virtual void UpdateGamepadData(device::GvrGamepadData) = 0;
31 virtual void AppButtonGesturePerformed(UiInterface::Direction direction) = 0; 32 virtual void AppButtonGesturePerformed(UiInterface::Direction direction) = 0;
32 virtual void AppButtonClicked() = 0; 33 virtual void AppButtonClicked() = 0;
33 virtual void ProcessContentGesture( 34 virtual void ProcessContentGesture(
34 std::unique_ptr<blink::WebInputEvent> event) = 0; 35 std::unique_ptr<blink::WebInputEvent> event) = 0;
35 virtual void ForceExitVr() = 0; 36 virtual void ForceExitVr() = 0;
36 virtual void RunVRDisplayInfoCallback( 37 virtual void RunVRDisplayInfoCallback(
37 const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback, 38 const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback,
38 device::mojom::VRDisplayInfoPtr* info) = 0; 39 device::mojom::VRDisplayInfoPtr* info) = 0;
39 virtual void OnContentPaused(bool enabled) = 0; 40 virtual void OnContentPaused(bool enabled) = 0;
40 virtual void ToggleCardboardGamepad(bool enabled) = 0; 41 virtual void ToggleCardboardGamepad(bool enabled) = 0;
42 virtual void OnGLInitialized() = 0;
41 }; 43 };
42 44
43 } // namespace vr_shell 45 } // namespace vr_shell
44 46
45 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_GL_BROWSER_INTERFACE_H_ 47 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_GL_BROWSER_INTERFACE_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/BUILD.gn ('k') | chrome/browser/android/vr_shell/textures/system_indicator_texture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698