Chromium Code Reviews| Index: chrome/browser/android/vr_shell/vr_browser_interface.h |
| diff --git a/chrome/browser/android/vr_shell/vr_browser_interface.h b/chrome/browser/android/vr_shell/vr_browser_interface.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..938dcfe44769410af1a335e9749e537c4a7a972f |
| --- /dev/null |
| +++ b/chrome/browser/android/vr_shell/vr_browser_interface.h |
| @@ -0,0 +1,46 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_BROWSER_INTERFACE_H_ |
| +#define CHROME_BROWSER_ANDROID_VR_SHELL_VR_BROWSER_INTERFACE_H_ |
| + |
| +#include <memory> |
| + |
| +#include "base/android/jni_weak_ref.h" |
| +#include "base/bind.h" |
| +#include "base/memory/weak_ptr.h" |
| +#include "base/time/time.h" |
| +#include "chrome/browser/android/vr_shell/ui_interface.h" |
| +#include "device/vr/android/gvr/gvr_gamepad_data_provider.h" |
| +#include "device/vr/vr_service.mojom.h" |
| + |
| +namespace blink { |
| +class WebInputEvent; |
| +} |
| + |
| +namespace vr_shell { |
| + |
| +// 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
|
| +class VrBrowserInterface { |
| + public: |
| + virtual ~VrBrowserInterface() {} |
| + |
| + // 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.
|
| + virtual void ContentSurfaceChanged(jobject surface) {} |
| + virtual void GvrDelegateReady() {} |
| + virtual void UpdateGamepadData(device::GvrGamepadData) {} |
| + virtual void AppButtonGesturePerformed(UiInterface::Direction direction) {} |
| + virtual void AppButtonPressed() {} |
|
cjgrant
2017/05/02 18:07:06
See previous note about "Pressed"
ymalik
2017/05/02 20:28:40
Done.
|
| + virtual void ProcessContentGesture( |
| + std::unique_ptr<blink::WebInputEvent> event) {} |
| + virtual void ForceExitVr() {} |
| + virtual void RunVRDisplayInfoCallback( |
| + const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback, |
| + device::mojom::VRDisplayInfoPtr* info) {} |
| + virtual void OnContentPaused(bool enabled) {} |
| +}; |
| + |
| +} // namespace vr_shell |
| + |
| +#endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_BROWSER_INTERFACE_H_ |