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

Unified Diff: content/shell/android/java/src/org/chromium/content_shell/ShellManager.java

Issue 2199223002: Remove unnecessary page loading in ContentShellActivity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bringing back the assertWaitForPatchScaleFactorMatch check in ContentViewZoomingTest Created 4 years, 4 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: content/shell/android/java/src/org/chromium/content_shell/ShellManager.java
diff --git a/content/shell/android/java/src/org/chromium/content_shell/ShellManager.java b/content/shell/android/java/src/org/chromium/content_shell/ShellManager.java
index ab3ccce5b8ea0b48198f000408f846e32b198645..d41997f212a0a097a5ab14983c67bd15bb49972e 100644
--- a/content/shell/android/java/src/org/chromium/content_shell/ShellManager.java
+++ b/content/shell/android/java/src/org/chromium/content_shell/ShellManager.java
@@ -12,7 +12,6 @@ import android.view.View;
import android.widget.FrameLayout;
import org.chromium.base.ThreadUtils;
-import org.chromium.base.VisibleForTesting;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
import org.chromium.content.browser.ActivityContentVideoViewEmbedder;
@@ -29,7 +28,6 @@ import org.chromium.ui.base.WindowAndroid;
public class ShellManager extends FrameLayout {
public static final String DEFAULT_SHELL_URL = "http://www.google.com";
- private static boolean sStartup = true;
private WindowAndroid mWindow;
private Shell mActiveShell;
@@ -69,26 +67,9 @@ public class ShellManager extends FrameLayout {
* @param window The window used to generate all shells.
*/
public void setWindow(WindowAndroid window) {
- setWindow(window, true);
- }
-
- /**
- * @param window The window used to generate all shells.
- * @param initialLoadingNeeded Whether initial loading is needed or not.
- */
- @VisibleForTesting
- public void setWindow(WindowAndroid window, final boolean initialLoadingNeeded) {
assert window != null;
mWindow = window;
- mContentViewRenderView = new ContentViewRenderView(getContext()) {
- @Override
- protected void onReadyToRender() {
- if (sStartup) {
- if (initialLoadingNeeded) mActiveShell.loadUrl(mStartupUrl);
- sStartup = false;
- }
- }
- };
+ mContentViewRenderView = new ContentViewRenderView(getContext());
mContentViewRenderView.onNativeLibraryLoaded(window);
}

Powered by Google App Engine
This is Rietveld 408576698