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

Side by Side Diff: android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java

Issue 2705133002: android: Allow registering multiple CreationParams (Closed)
Patch Set: explode loudly if param not found Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.android_webview; 5 package org.chromium.android_webview;
6 6
7 import android.content.ComponentName; 7 import android.content.ComponentName;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.Intent; 9 import android.content.Intent;
10 import android.content.ServiceConnection; 10 import android.content.ServiceConnection;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 throw new RuntimeException("Cannot load WebView", e); 68 throw new RuntimeException("Cannot load WebView", e);
69 } 69 }
70 } 70 }
71 71
72 /** 72 /**
73 * Configures child process launcher. This is required only if child service s are used in 73 * Configures child process launcher. This is required only if child service s are used in
74 * WebView. 74 * WebView.
75 */ 75 */
76 public static void configureChildProcessLauncher(String packageName, 76 public static void configureChildProcessLauncher(String packageName,
77 boolean isExternalService) { 77 boolean isExternalService) {
78 ChildProcessCreationParams.set( 78 ChildProcessCreationParams.registerDefault(new ChildProcessCreationParam s(
79 new ChildProcessCreationParams(packageName, isExternalService, 79 packageName, isExternalService, LibraryProcessType.PROCESS_WEBVI EW_CHILD));
80 LibraryProcessType.PROCESS_WEBVIEW_CHILD));
81 } 80 }
82 81
83 /** 82 /**
84 * Starts the chromium browser process running within this process. Creates threads 83 * Starts the chromium browser process running within this process. Creates threads
85 * and performs other per-app resource allocations; must not be called from zygote. 84 * and performs other per-app resource allocations; must not be called from zygote.
86 * Note: it is up to the caller to ensure this is only called once. 85 * Note: it is up to the caller to ensure this is only called once.
87 */ 86 */
88 public static void start() { 87 public static void start() {
89 final Context appContext = ContextUtils.getApplicationContext(); 88 final Context appContext = ContextUtils.getApplicationContext();
90 tryObtainingDataDirLock(appContext); 89 tryObtainingDataDirLock(appContext);
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 public void onServiceDisconnected(ComponentName className) { } 236 public void onServiceDisconnected(ComponentName className) { }
238 }; 237 };
239 if (!appContext.bindService(intent, connection, Context.BIND_AUT O_CREATE)) { 238 if (!appContext.bindService(intent, connection, Context.BIND_AUT O_CREATE)) {
240 Log.w(TAG, "Could not bind to Minidump-copying Service " + i ntent); 239 Log.w(TAG, "Could not bind to Minidump-copying Service " + i ntent);
241 } 240 }
242 return null; 241 return null;
243 } 242 }
244 }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); 243 }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
245 } 244 }
246 } 245 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698