Chromium Code Reviews| 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 cd2483c6a21fab6f8fc74a00b6e3fb54a8f00278..7613c59f33a9636d75ce7c55056ce756724bdce6 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 |
| @@ -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()); |
|
Ted C
2016/09/20 19:57:06
can we use this above in detach? then we wouldn't
mthiesse
2016/09/20 20:56:07
Acknowledged.
|
| // 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; |
| + 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( |