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

Unified Diff: content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java

Issue 15995014: Adds MemoryPressureListener. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Hooks up with MemoryPurger Created 7 years, 6 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
« chrome/browser/memory_purger.cc ('K') | « chrome/browser/memory_purger.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java
diff --git a/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java b/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java
index 9dc2bcef461339863468b092e4c2756afaa3b278..f0ba0029178348def39dba45cb831b8b96083e1b 100644
--- a/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java
+++ b/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java
@@ -14,6 +14,7 @@ import android.util.Log;
import android.view.KeyEvent;
import org.chromium.base.ChromiumActivity;
+import org.chromium.base.MemoryPressureHandler;
import org.chromium.content.app.LibraryLoader;
import org.chromium.content.browser.ActivityContentVideoViewDelegate;
import org.chromium.content.browser.AndroidBrowserProcess;
@@ -181,6 +182,11 @@ public class ContentShellActivity extends ChromiumActivity {
mWindowAndroid.onActivityResult(requestCode, resultCode, data);
}
+ @Override
+ public void onTrimMemory(int level) {
+ MemoryPressureHandler.onMemoryPressure(level);
+ }
+
private static String getUrlFromIntent(Intent intent) {
return intent != null ? intent.getDataString() : null;
}
« chrome/browser/memory_purger.cc ('K') | « chrome/browser/memory_purger.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698