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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java

Issue 1214723012: Track whether a created WebContents has a resume pending. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments Created 5 years, 5 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/tabmodel/ChromeTabCreator.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java
index 854e783b32da85757110bf86390dbd1cb58d909a..206f9a270ab0977f25904a5851fa013f64fb48cd 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java
@@ -114,15 +114,12 @@ public class ChromeTabCreator implements TabCreatorManager.TabCreator {
TraceEvent.begin("ChromeTabCreator.createNewTab");
int parentId = parent != null ? parent.getId() : Tab.INVALID_TAB_ID;
WebContents webContents = IntentHandler.getWebContentsFromIntent(intent);
- boolean isWebContentsPaused = false;
Intent parentIntent = null;
if (webContents != null) {
// The WebContents comes with additional data, but it shouldn't be used if the
// WebContents itself couldn't be parsed out.
parentId = IntentUtils.safeGetIntExtra(
intent, IntentHandler.EXTRA_PARENT_TAB_ID, Tab.INVALID_TAB_ID);
- isWebContentsPaused = IntentUtils.safeGetBooleanExtra(
- intent, IntentHandler.EXTRA_WEB_CONTENTS_PAUSED, false);
parentIntent = IntentUtils.safeGetParcelableExtra(
intent, IntentHandler.EXTRA_PARENT_INTENT);
}
@@ -140,8 +137,7 @@ public class ChromeTabCreator implements TabCreatorManager.TabCreator {
tab.initialize(webContents, mTabContentManager, !openInForeground);
tab.getTabRedirectHandler().updateIntent(intent);
tab.setParentIntent(parentIntent);
-
- if (isWebContentsPaused) webContents.resumeLoadingCreatedWebContents();
+ webContents.resumeLoadingCreatedWebContents();
} else if (!openInForeground && SysUtils.isLowEndDevice()) {
// On low memory devices the tabs opened in background are not loaded automatically
// to preserve resources (cpu, memory, strong renderer binding) for the foreground

Powered by Google App Engine
This is Rietveld 408576698