OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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.chrome.browser; | 5 package org.chromium.chrome.browser; |
6 | 6 |
7 import com.android.webview.chromium.MonochromeLibraryPreloader; | 7 import com.android.webview.chromium.MonochromeLibraryPreloader; |
8 | 8 |
9 import org.chromium.base.library_loader.LibraryLoader; | 9 import org.chromium.base.library_loader.LibraryLoader; |
10 import org.chromium.base.library_loader.LibraryProcessType; | 10 import org.chromium.base.library_loader.LibraryProcessType; |
11 import org.chromium.base.process_launcher.ChildProcessCreationParams; | 11 import org.chromium.base.process_launcher.ChildProcessCreationParams; |
12 | 12 |
13 /** | 13 /** |
14 * This is Application class for Monochrome. | 14 * This is Application class for Monochrome. |
15 * | 15 * |
16 * You shouldn't add anything else in this file, this class is split off from | 16 * You shouldn't add anything else in this file, this class is split off from |
17 * normal chrome in order to access Android system API through Android WebView | 17 * normal chrome in order to access Android system API through Android WebView |
18 * glue layer and have monochrome specific code. | 18 * glue layer and have monochrome specific code. |
19 */ | 19 */ |
20 public class MonochromeApplication extends ChromeApplication { | 20 public class MonochromeApplication extends ChromeApplication { |
21 @Override | 21 @Override |
22 public void onCreate() { | 22 public void onCreate() { |
23 super.onCreate(); | 23 super.onCreate(); |
24 LibraryLoader.setNativeLibraryPreloader(new MonochromeLibraryPreloader() ); | 24 LibraryLoader.setNativeLibraryPreloader(new MonochromeLibraryPreloader() ); |
25 // ChildProcessCreationParams is only needed for browser process, though it is | 25 // ChildProcessCreationParams is only needed for browser process, though it is |
26 // created and set in all processes. | 26 // created and set in all processes. |
27 ChildProcessCreationParams.registerDefault(new ChildProcessCreationParam s( | 27 final boolean bindToCaller = false; |
nyquist
2017/04/04 18:30:33
Nit: Why are all these final? We usually don't do
boliu
2017/04/04 20:00:07
umm, I guess I'm carrying over from c++. these are
boliu
2017/04/04 21:21:55
removed final in chrome
| |
28 getPackageName(), true /* isExternalService */, LibraryProcessTy pe.PROCESS_CHILD)); | 28 ChildProcessCreationParams.registerDefault(new ChildProcessCreationParam s(getPackageName(), |
29 true /* isExternalService */, LibraryProcessType.PROCESS_CHILD, bindToCaller)); | |
29 } | 30 } |
30 } | 31 } |
OLD | NEW |