Commit 68b3cc67 authored by Donn Denman's avatar Donn Denman Committed by Commit Bot

[Tab] Remove deprecated onReparentingFinished.

Removes the deprecated onReparentingFinished in favor of the new method
onActivityAttachmentChanged.

Updates callers of the old method.

Bug: 
Change-Id: I67920b1caea804281972fbac32f91cd4509c281f
Reviewed-on: https://chromium-review.googlesource.com/775733Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Reviewed-by: default avatarPeter Conn <peconn@chromium.org>
Reviewed-by: default avatarYusuf Ozuysal <yusufo@chromium.org>
Commit-Queue: Donn Denman <donnd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517523}
parent 98cb1aec
...@@ -127,13 +127,14 @@ public class InfoBarContainer extends SwipableOverlayView { ...@@ -127,13 +127,14 @@ public class InfoBarContainer extends SwipableOverlayView {
} }
@Override @Override
public void onReparentingFinished(Tab tab) { public void onActivityAttachmentChanged(Tab tab, boolean isAttached) {
if (!isAttached) return;
setParentView((ViewGroup) tab.getActivity().findViewById(R.id.bottom_container)); setParentView((ViewGroup) tab.getActivity().findViewById(R.id.bottom_container));
mTab = tab; mTab = tab;
} }
}; };
/** /**
* Adds/removes the {@link InfoBarContainer} when the tab's view is attached/detached. This is * Adds/removes the {@link InfoBarContainer} when the tab's view is attached/detached. This is
* mostly to ensure the infobars are not shown in tab switcher overview mode. * mostly to ensure the infobars are not shown in tab switcher overview mode.
......
...@@ -295,7 +295,7 @@ public class PictureInPictureController { ...@@ -295,7 +295,7 @@ public class PictureInPictureController {
/** /**
* A class to dismiss the Activity when the tab: * A class to dismiss the Activity when the tab:
* - Closes. * - Closes.
* - Reparents. * - Reparents: Attaches to a different activity.
* - Crashes. * - Crashes.
* - Leaves fullscreen. * - Leaves fullscreen.
*/ */
...@@ -306,8 +306,10 @@ public class PictureInPictureController { ...@@ -306,8 +306,10 @@ public class PictureInPictureController {
} }
@Override @Override
public void onReparentingFinished(Tab tab) { public void onActivityAttachmentChanged(Tab tab, boolean isAttached) {
dismissActivity(mActivity, METRICS_END_REASON_REPARENT); if (isAttached) {
dismissActivity(mActivity, METRICS_END_REASON_REPARENT);
}
} }
@Override @Override
......
...@@ -115,9 +115,6 @@ public class EmptyTabObserver implements TabObserver { ...@@ -115,9 +115,6 @@ public class EmptyTabObserver implements TabObserver {
long openerRenderProcessId, long openerRenderFrameId, String frameName, long openerRenderProcessId, long openerRenderFrameId, String frameName,
String targetUrl, WebContents newWebContents) {} String targetUrl, WebContents newWebContents) {}
@Override
public void onReparentingFinished(Tab tab) {}
@Override @Override
public void onActivityAttachmentChanged(Tab tab, boolean isAttached) {} public void onActivityAttachmentChanged(Tab tab, boolean isAttached) {}
......
...@@ -1531,10 +1531,6 @@ public class Tab ...@@ -1531,10 +1531,6 @@ public class Tab
mIsTabStateDirty = true; mIsTabStateDirty = true;
if (finalizeCallback != null) finalizeCallback.run(); if (finalizeCallback != null) finalizeCallback.run();
for (TabObserver observer : mObservers) {
observer.onReparentingFinished(this);
}
} }
/** /**
......
...@@ -292,14 +292,6 @@ public interface TabObserver { ...@@ -292,14 +292,6 @@ public interface TabObserver {
*/ */
public void onActivityAttachmentChanged(Tab tab, boolean isAttached); public void onActivityAttachmentChanged(Tab tab, boolean isAttached);
/**
* Called when the tab reparenting process has finished.
* Deprecated, use {@link #onActivityAttachmentChanged(Tab, boolean)} instead.
* @param tab The notifying {@link Tab}.
*/
@Deprecated
public void onReparentingFinished(Tab tab);
/** /**
* A notification when tab changes whether or not it is interactable and is accepting input. * A notification when tab changes whether or not it is interactable and is accepting input.
* @param isInteractable Whether or not the tab is interactable. * @param isInteractable Whether or not the tab is interactable.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment