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

Unified Diff: android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellApplication.java

Issue 1262393003: [Android WebView] Move browser-side initialization out from Application (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed 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: android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellApplication.java
diff --git a/android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellApplication.java b/android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellApplication.java
index 4e342b8e0754a331522f995b2e77ccac53d611aa..8b5a6157d6afd1e51c471518daffbaaf888e9a1d 100644
--- a/android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellApplication.java
+++ b/android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellApplication.java
@@ -4,14 +4,9 @@
package org.chromium.android_webview.shell;
-import android.os.Debug;
-import android.util.Log;
-
import org.chromium.android_webview.AwBrowserProcess;
import org.chromium.android_webview.R;
-import org.chromium.base.BaseSwitches;
import org.chromium.base.CommandLine;
-import org.chromium.base.TraceEvent;
import org.chromium.base.annotations.SuppressFBWarnings;
import org.chromium.content.app.ContentApplication;
import org.chromium.ui.base.ResourceBundle;
@@ -20,30 +15,9 @@ import org.chromium.ui.base.ResourceBundle;
* The android_webview shell Application subclass.
*/
public class AwShellApplication extends ContentApplication {
-
- private static final String TAG = "AwShellApplication";
-
- @SuppressFBWarnings("DMI_HARDCODED_ABSOLUTE_FILENAME")
@Override
public void onCreate() {
super.onCreate();
-
- AwShellResourceProvider.registerResources(this);
-
- CommandLine.initFromFile("/data/local/tmp/android-webview-command-line");
-
- if (CommandLine.getInstance().hasSwitch(BaseSwitches.WAIT_FOR_JAVA_DEBUGGER)) {
- Log.e(TAG, "Waiting for Java debugger to connect...");
- Debug.waitForDebugger();
- Log.e(TAG, "Java debugger connected. Resuming execution.");
- }
-
- AwBrowserProcess.loadLibrary(this);
-
- if (CommandLine.getInstance().hasSwitch(AwShellSwitches.ENABLE_ATRACE)) {
- Log.e(TAG, "Enabling Android trace.");
- TraceEvent.setATraceEnabled(true);
- }
}
@Override
@@ -51,8 +25,11 @@ public class AwShellApplication extends ContentApplication {
ResourceBundle.initializeLocalePaks(this, R.array.locale_paks);
}
+ @SuppressFBWarnings("DMI_HARDCODED_ABSOLUTE_FILENAME")
@Override
public void initCommandLine() {
- throw new UnsupportedOperationException();
+ if (!CommandLine.isInitialized()) {
+ CommandLine.initFromFile("/data/local/tmp/android-webview-command-line");
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698