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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsBottomSheetContent.java

Issue 2865963003: [Suggestions UI] Drop Bitmap references from articles under memory pressure. (Closed)
Patch Set: comment Created 3 years, 7 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/suggestions/SuggestionsBottomSheetContent.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsBottomSheetContent.java b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsBottomSheetContent.java
index 9fd7a66cd553682937ae7d8fcb75cb6fea6ab811..b574fc17d9666d5395d65062bf476d56a094f99c 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsBottomSheetContent.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsBottomSheetContent.java
@@ -12,6 +12,7 @@ import android.view.MotionEvent;
import android.view.View;
import org.chromium.base.ApiCompatibilityUtils;
+import org.chromium.base.ReferencePool;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ChromeActivity;
import org.chromium.chrome.browser.NativePageHost;
@@ -59,7 +60,8 @@ public class SuggestionsBottomSheetContent implements BottomSheet.BottomSheetCon
new SuggestionsNavigationDelegateImpl(activity, profile, sheet, tabModelSelector);
mTileGroupDelegate = new TileGroupDelegateImpl(
activity, profile, tabModelSelector, navigationDelegate, snackbarManager);
- mSuggestionsUiDelegate = createSuggestionsDelegate(profile, navigationDelegate, sheet);
+ mSuggestionsUiDelegate = createSuggestionsDelegate(
+ profile, navigationDelegate, sheet, activity.getReferencePool());
mView = LayoutInflater.from(activity).inflate(
R.layout.suggestions_bottom_sheet_content, null);
@@ -173,7 +175,8 @@ public class SuggestionsBottomSheetContent implements BottomSheet.BottomSheetCon
}
private static SuggestionsUiDelegateImpl createSuggestionsDelegate(Profile profile,
- SuggestionsNavigationDelegate navigationDelegate, NativePageHost host) {
+ SuggestionsNavigationDelegate navigationDelegate, NativePageHost host,
+ ReferencePool referencePool) {
SnippetsBridge snippetsBridge = null;
SuggestionsSource suggestionsSource;
SuggestionsEventReporter eventReporter;
@@ -192,7 +195,7 @@ public class SuggestionsBottomSheetContent implements BottomSheet.BottomSheetCon
}
SuggestionsUiDelegateImpl delegate = new SuggestionsUiDelegateImpl(
- suggestionsSource, eventReporter, navigationDelegate, profile, host);
+ suggestionsSource, eventReporter, navigationDelegate, profile, host, referencePool);
if (snippetsBridge != null) delegate.addDestructionObserver(snippetsBridge);
return delegate;

Powered by Google App Engine
This is Rietveld 408576698