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

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

Issue 22272006: Add support for multiple asynchronous browser startups. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated tests to use assert messages. Cleaned some of them up a bit. Rebased. Created 7 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/public/android/java/src/org/chromium/content/browser/BrowserStartupConfig.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/BrowserStartupConfig.java b/content/public/android/java/src/org/chromium/content/browser/BrowserStartupConfig.java
deleted file mode 100644
index f784c7a678ddc286d984368f63cbd93f70c8f33f..0000000000000000000000000000000000000000
--- a/content/public/android/java/src/org/chromium/content/browser/BrowserStartupConfig.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.content.browser;
-
-import org.chromium.base.CalledByNative;
-import org.chromium.base.JNINamespace;
-/**
- * This class controls how C++ browser main loop is run.
- */
-@JNINamespace("content")
-public class BrowserStartupConfig {
- public interface StartupCallback {
- void run(int startupResult);
- }
-
- private static boolean sBrowserMayStartAsynchronously = false;
- private static StartupCallback sBrowserStartupCompleteCallback = null;
-
- @CalledByNative
- private static boolean browserMayStartAsynchonously() {
- return sBrowserMayStartAsynchronously;
- }
-
- @CalledByNative
- private static void browserStartupComplete(int result) {
- if(sBrowserStartupCompleteCallback != null) {
- sBrowserStartupCompleteCallback.run(result);
- }
- }
-
- /**
- * Set browser to start asynchronously. May only be called before contentMain.start(). If it
- * has been called then contentMain.start() will queue up a series of UI tasks to complete
- * browser initialization.
- * @param browserStartupCompleteCallback If not null called when browser startup is complete.
- */
- public static void setAsync(StartupCallback browserStartupCompleteCallback) {
- sBrowserMayStartAsynchronously = true;
- sBrowserStartupCompleteCallback = browserStartupCompleteCallback;
- }
-}

Powered by Google App Engine
This is Rietveld 408576698