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

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

Issue 2076623002: 🍳 Fix and clean up application context in webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Wrap context. Created 4 years, 6 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/AwShellActivity.java
diff --git a/android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellActivity.java b/android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellActivity.java
index 9d04cf035e5affa3100d6df336c4d33608cd9166..94df928e272c37eca8eea1297203090390e5e191 100644
--- a/android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellActivity.java
+++ b/android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellActivity.java
@@ -40,6 +40,7 @@ import org.chromium.android_webview.test.AwTestContainerView;
import org.chromium.android_webview.test.NullContentsClient;
import org.chromium.base.BaseSwitches;
import org.chromium.base.CommandLine;
+import org.chromium.base.ContextUtils;
import org.chromium.base.Log;
import org.chromium.base.TraceEvent;
import org.chromium.content.app.ContentApplication;
@@ -79,7 +80,8 @@ public class AwShellActivity extends Activity {
ContentApplication.initCommandLine(this);
waitForDebuggerIfNeeded();
- AwBrowserProcess.loadLibrary(this);
+ ContextUtils.initApplicationContext(getApplicationContext());
+ AwBrowserProcess.loadLibrary();
if (CommandLine.getInstance().hasSwitch(AwShellSwitches.ENABLE_ATRACE)) {
Log.e(TAG, "Enabling Android trace.");
@@ -129,7 +131,7 @@ public class AwShellActivity extends Activity {
}
private AwTestContainerView createAwTestContainerView() {
- AwBrowserProcess.start(this);
+ AwBrowserProcess.start();
AwTestContainerView testContainerView = new AwTestContainerView(this, true);
AwContentsClient awContentsClient = new NullContentsClient() {
private View mCustomView;

Powered by Google App Engine
This is Rietveld 408576698