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

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

Issue 2929483003: VR: Further split common code from Android-specific code. (Closed)
Patch Set: 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_VR_BROWSER_INTERFACE_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_GL_BROWSER_INTERFACE_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_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 "base/bind.h"
12 #include "base/memory/weak_ptr.h"
13 #include "base/time/time.h"
14 #include "chrome/browser/android/vr_shell/ui_interface.h" 11 #include "chrome/browser/android/vr_shell/ui_interface.h"
15 #include "chrome/browser/android/vr_shell/ui_unsupported_mode.h"
16 #include "device/vr/android/gvr/gvr_gamepad_data_provider.h" 12 #include "device/vr/android/gvr/gvr_gamepad_data_provider.h"
17 #include "device/vr/vr_service.mojom.h" 13 #include "device/vr/vr_service.mojom.h"
18 14
19 namespace blink { 15 namespace blink {
20 class WebInputEvent; 16 class WebInputEvent;
21 } 17 }
22 18
23 namespace vr_shell { 19 namespace vr_shell {
24 20
25 // An interface for communication with Vr Browser. Many of the functions in this 21 // An interface for the GL thread to communicate with VrShell. Many of the
26 // interface are proxies to methods on VrShell. 22 // functions in this interface are proxies to methods on VrShell.
27 class VrBrowserInterface { 23 class GlBrowserInterface {
28 public: 24 public:
29 virtual ~VrBrowserInterface() = default; 25 virtual ~GlBrowserInterface() = default;
30 26
31 virtual void ContentSurfaceChanged(jobject surface) = 0; 27 virtual void ContentSurfaceChanged(jobject surface) = 0;
32 virtual void GvrDelegateReady() = 0; 28 virtual void GvrDelegateReady() = 0;
33 virtual void UpdateGamepadData(device::GvrGamepadData) = 0; 29 virtual void UpdateGamepadData(device::GvrGamepadData) = 0;
34 virtual void AppButtonGesturePerformed(UiInterface::Direction direction) = 0; 30 virtual void AppButtonGesturePerformed(UiInterface::Direction direction) = 0;
35 virtual void AppButtonClicked() = 0; 31 virtual void AppButtonClicked() = 0;
36 virtual void ProcessContentGesture( 32 virtual void ProcessContentGesture(
37 std::unique_ptr<blink::WebInputEvent> event) = 0; 33 std::unique_ptr<blink::WebInputEvent> event) = 0;
38 virtual void ForceExitVr() = 0; 34 virtual void ForceExitVr() = 0;
39 virtual void ExitPresent() = 0;
40 virtual void ExitFullscreen() = 0;
41 virtual void RunVRDisplayInfoCallback( 35 virtual void RunVRDisplayInfoCallback(
42 const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback, 36 const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback,
43 device::mojom::VRDisplayInfoPtr* info) = 0; 37 device::mojom::VRDisplayInfoPtr* info) = 0;
44 virtual void OnContentPaused(bool enabled) = 0; 38 virtual void OnContentPaused(bool enabled) = 0;
45 virtual void NavigateBack() = 0;
46 virtual void ExitCct() = 0;
47 virtual void ToggleCardboardGamepad(bool enabled) = 0; 39 virtual void ToggleCardboardGamepad(bool enabled) = 0;
48 virtual void OnUnsupportedMode(UiUnsupportedMode mode) = 0;
49 }; 40 };
50 41
51 } // namespace vr_shell 42 } // namespace vr_shell
52 43
53 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_BROWSER_INTERFACE_H_ 44 #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/ui_browser_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698