| Index: chrome/browser/android/vr_shell/vr_shell.h
|
| diff --git a/chrome/browser/android/vr_shell/vr_shell.h b/chrome/browser/android/vr_shell/vr_shell.h
|
| index 435ef38182bb96a0144335ab42e82d8d85c25da3..dead3020309ecebbb096b3f407e74bd3d2651a6b 100644
|
| --- a/chrome/browser/android/vr_shell/vr_shell.h
|
| +++ b/chrome/browser/android/vr_shell/vr_shell.h
|
| @@ -14,10 +14,13 @@
|
| #include "base/macros.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/single_thread_task_runner.h"
|
| +#include "content/public/browser/android/video_surface_provider.h"
|
| #include "content/public/browser/web_contents_observer.h"
|
| #include "device/vr/android/gvr/gvr_delegate.h"
|
| #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/gvr.h"
|
| #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/gvr_types.h"
|
| +#include "ui/gfx/geometry/size.h"
|
| +#include "ui/gl/android/scoped_java_surface.h"
|
|
|
| namespace base {
|
| class ListValue;
|
| @@ -54,7 +57,8 @@ class VrMetricsHelper;
|
|
|
| // The native instance of the Java VrShell. This class is not threadsafe and
|
| // must only be used on the UI thread.
|
| -class VrShell : public device::GvrDelegate, content::WebContentsObserver {
|
| +class VrShell : public device::GvrDelegate, content::WebContentsObserver,
|
| + content::VideoSurfaceProvider {
|
| public:
|
| VrShell(JNIEnv* env, jobject obj,
|
| content::WebContents* main_contents,
|
| @@ -131,6 +135,12 @@ class VrShell : public device::GvrDelegate, content::WebContentsObserver {
|
|
|
| void ContentFrameWasResized(bool width_changed);
|
|
|
| + // Called by the Java class when the video surface changes.
|
| + void SetVideoSurface(JNIEnv* env,
|
| + const base::android::JavaParamRef<jobject>& obj,
|
| + const base::android::JavaParamRef<jobject>& surface);
|
| +
|
| +
|
| void ForceExitVr();
|
|
|
| private:
|
| @@ -144,6 +154,12 @@ class VrShell : public device::GvrDelegate, content::WebContentsObserver {
|
| void MainFrameWasResized(bool width_changed) override;
|
| void WebContentsDestroyed() override;
|
|
|
| + // content::VideoSurfaceProvider implementation. (not sure what thread).
|
| + void OnVideoSizeChanged(int width, int height) override;
|
| + void CreateVideoSurface(content::VideoSurfaceProvider::Client* client,
|
| + const gfx::Size& video_natural_size) override;
|
| + content::VideoSurfaceProvider::Client* client_;
|
| +
|
| std::unique_ptr<UiInterface> html_interface_;
|
|
|
| content::WebContents* main_contents_;
|
|
|