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

Unified Diff: chrome/browser/android/vr_shell/vr_shell.h

Issue 2683953007: Support rendering Android Native Pages in VR Shell. (Closed)
Patch Set: rebase Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/vr_shell/vr_compositor.cc ('k') | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f60efc718e59a97027a864a6d4a14a466e853ced..cc09af90e2b8f1f3693bc61dd016ea6baf7029bd 100644
--- a/chrome/browser/android/vr_shell/vr_shell.h
+++ b/chrome/browser/android/vr_shell/vr_shell.h
@@ -65,7 +65,6 @@ class VrMetricsHelper;
class VrShell : public device::GvrDelegate, content::WebContentsObserver {
public:
VrShell(JNIEnv* env, jobject obj,
- content::WebContents* main_contents,
ui::WindowAndroid* content_window,
content::WebContents* ui_contents,
ui::WindowAndroid* ui_window,
@@ -103,6 +102,11 @@ class VrShell : public device::GvrDelegate, content::WebContentsObserver {
void OnTabRemoved(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj,
jboolean incognito, jint id);
+ base::android::ScopedJavaGlobalRef<jobject> TakeContentSurface(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& obj);
+ void RestoreContentSurface(JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& obj);
void ContentWebContentsDestroyed();
// Called when our WebContents have been hidden. Usually a sign that something
@@ -117,7 +121,8 @@ class VrShell : public device::GvrDelegate, content::WebContentsObserver {
UiInterface* GetUiInterface();
void OnDomContentsLoaded();
- void SurfacesChanged(jobject content_surface, jobject ui_surface);
+ void UiSurfaceChanged(jobject surface);
+ void ContentSurfaceChanged(jobject surface);
void GvrDelegateReady();
void AppButtonPressed();
@@ -158,6 +163,7 @@ class VrShell : public device::GvrDelegate, content::WebContentsObserver {
~VrShell() override;
void PostToGlThreadWhenReady(const base::Closure& task);
void SetContentPaused(bool paused);
+ void SetUiState();
// content::WebContentsObserver implementation.
void RenderViewHostChanged(content::RenderViewHost* old_host,
@@ -189,7 +195,8 @@ class VrShell : public device::GvrDelegate, content::WebContentsObserver {
bool content_paused_ = false;
bool webvr_mode_ = false;
- content::WebContents* main_contents_;
+ content::WebContents* main_contents_ = nullptr;
+ ui::WindowAndroid* content_window_;
std::unique_ptr<VrCompositor> content_compositor_;
content::WebContents* ui_contents_;
std::unique_ptr<VrCompositor> ui_compositor_;
@@ -207,6 +214,8 @@ class VrShell : public device::GvrDelegate, content::WebContentsObserver {
std::unique_ptr<VrGLThread> gl_thread_;
bool reprojected_rendering_;
+ jobject content_surface_ = nullptr;
+
// TODO(mthiesse): Remove the need for this to be stored here.
// crbug.com/674594
gvr_context* gvr_api_;
« no previous file with comments | « chrome/browser/android/vr_shell/vr_compositor.cc ('k') | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698