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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java

Issue 2319863005: Implement new compositor and ContentViewCore reparenting for VR Shell. (Closed)
Patch Set: Rebase onto ToT Created 4 years, 3 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
Index: chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
index 60f97b5bbfa388eb70a00fc5efca27c838d7e67b..a0e74293594f656b7442137c782696aa77181fca 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
@@ -1573,7 +1573,7 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
tabModelSelector.getModel(mIncognito).removeTab(this);
- if (mContentViewCore != null) mContentViewCore.updateWindowAndroid(null);
+ updateWindowAndroid(null);
attachTabContentManager(null);
}
@@ -1595,9 +1595,7 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
// TODO(yusufo): Share these calls with the construction related calls.
// crbug.com/590281
- // Update and propagate for the new WindowAndroid.
- mWindowAndroid = activity.getWindowAndroid();
- mContentViewCore.updateWindowAndroid(mWindowAndroid);
+ updateWindowAndroid(activity.getWindowAndroid());
// Update for the controllers that need the Compositor from the new Activity.
attachTabContentManager(activity.getTabContentManager());
@@ -1627,6 +1625,15 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
}
/**
+ * Update and propagate the new WindowAndroid.
+ * @param windowAndroid The WindowAndroid to propagate.
+ */
+ public void updateWindowAndroid(WindowAndroid windowAndroid) {
+ mWindowAndroid = windowAndroid;
+ if (mContentViewCore != null) mContentViewCore.updateWindowAndroid(mWindowAndroid);
+ }
+
+ /**
* @return Whether the tab is detached from its Activity and {@link WindowAndroid} for
* reparenting. Certain functionalities will not work until it is attached to a new activity
* with {@link Tab#attachAndFinishReparenting(

Powered by Google App Engine
This is Rietveld 408576698