Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_BROWSER_INTERFACE_H_ | |
| 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_BROWSER_INTERFACE_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 | |
| 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" | |
| 15 #include "device/vr/android/gvr/gvr_gamepad_data_provider.h" | |
| 16 #include "device/vr/vr_service.mojom.h" | |
| 17 | |
| 18 namespace blink { | |
| 19 class WebInputEvent; | |
| 20 } | |
| 21 | |
| 22 namespace vr_shell { | |
| 23 | |
| 24 // An interface for communication with Vr Browser. | |
|
cjgrant
2017/05/02 18:07:06
Here you could actually say this is an interface t
ymalik
2017/05/02 20:28:40
That's not entirely true because for e.g. OnAppBut
| |
| 25 class VrBrowserInterface { | |
| 26 public: | |
| 27 virtual ~VrBrowserInterface() {} | |
| 28 | |
| 29 // TODO(ymalik): Add comments for these functions. | |
|
cjgrant
2017/05/02 18:07:06
It'd be better to have a single high-level comment
ymalik
2017/05/02 20:28:40
That's fair.
| |
| 30 virtual void ContentSurfaceChanged(jobject surface) {} | |
| 31 virtual void GvrDelegateReady() {} | |
| 32 virtual void UpdateGamepadData(device::GvrGamepadData) {} | |
| 33 virtual void AppButtonGesturePerformed(UiInterface::Direction direction) {} | |
| 34 virtual void AppButtonPressed() {} | |
|
cjgrant
2017/05/02 18:07:06
See previous note about "Pressed"
ymalik
2017/05/02 20:28:40
Done.
| |
| 35 virtual void ProcessContentGesture( | |
| 36 std::unique_ptr<blink::WebInputEvent> event) {} | |
| 37 virtual void ForceExitVr() {} | |
| 38 virtual void RunVRDisplayInfoCallback( | |
| 39 const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback, | |
| 40 device::mojom::VRDisplayInfoPtr* info) {} | |
| 41 virtual void OnContentPaused(bool enabled) {} | |
| 42 }; | |
| 43 | |
| 44 } // namespace vr_shell | |
| 45 | |
| 46 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_BROWSER_INTERFACE_H_ | |
| OLD | NEW |