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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 23532058: Android: centralize renderer binding management in ChildProcessLauncher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a comment for isOomProtected(). Created 7 years, 3 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
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
index edbc53f2d32ac18826c25cf93932741d8536871b..e99b7e4e7e30eaf862e534b68072850a58d835d5 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
@@ -1487,12 +1487,12 @@ import java.util.Map;
mAttachedToWindow = true;
if (mNativeContentViewCore != 0) {
assert mPid == nativeGetCurrentRenderProcessId(mNativeContentViewCore);
- ChildProcessLauncher.bindAsHighPriority(mPid);
+ ChildProcessLauncher.getBindingManager().bindAsHighPriority(mPid);
// Normally the initial binding is removed in onRenderProcessSwap(), but it is possible
// to construct WebContents and spawn the renderer before passing it to ContentViewCore.
// In this case there will be no onRenderProcessSwap() call and the initial binding will
// be removed here.
- ChildProcessLauncher.removeInitialBinding(mPid);
+ ChildProcessLauncher.getBindingManager().removeInitialBinding(mPid);
}
setAccessibilityState(mAccessibilityManager.isEnabled());
}
@@ -1505,7 +1505,7 @@ import java.util.Map;
mAttachedToWindow = false;
if (mNativeContentViewCore != 0) {
assert mPid == nativeGetCurrentRenderProcessId(mNativeContentViewCore);
- ChildProcessLauncher.unbindAsHighPriority(mPid);
+ ChildProcessLauncher.getBindingManager().unbindAsHighPriority(mPid);
}
setInjectedAccessibility(false);
hidePopupDialog();
@@ -1897,7 +1897,8 @@ import java.util.Map;
@CalledByNative
private void onTabCrash() {
assert mPid != 0;
- getContentViewClient().onRendererCrash(ChildProcessLauncher.isOomProtected(mPid));
+ getContentViewClient().onRendererCrash(
+ ChildProcessLauncher.getBindingManager().isOomProtected(mPid));
mPid = 0;
}
@@ -2569,13 +2570,13 @@ import java.util.Map;
private void onRenderProcessSwap(int oldPid, int newPid) {
assert mPid == oldPid || mPid == newPid;
if (mAttachedToWindow && oldPid != newPid) {
- ChildProcessLauncher.unbindAsHighPriority(oldPid);
- ChildProcessLauncher.bindAsHighPriority(newPid);
+ ChildProcessLauncher.getBindingManager().unbindAsHighPriority(oldPid);
+ ChildProcessLauncher.getBindingManager().bindAsHighPriority(newPid);
}
// We want to remove the initial binding even if the ContentView is not attached, so that
// renderers for ContentViews loading in background do not retain the high priority.
- ChildProcessLauncher.removeInitialBinding(newPid);
+ ChildProcessLauncher.getBindingManager().removeInitialBinding(newPid);
mPid = newPid;
}
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698