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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java

Issue 2539643002: [CCT-Reparenting] Remove tab observer when the tab is removed from model (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
index e36d67d0c69e11766cf95599b7ea2ef9fad00e07..387652f8c82bc3ed1b2bd71722c33f0f07976122 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
@@ -176,6 +176,12 @@ public class CustomTabActivity extends ChromeActivity {
// Finish the activity after we intent out.
if (getTabModelSelector().getCurrentModel().getCount() == 0) finishAndClose(false);
}
+
+ @Override
+ public void tabRemoved(Tab tab) {
+ tab.removeObserver(mTabObserver);
+ PageLoadMetrics.removeObserver(mMetricsObserver);
+ }
};
/**
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698