OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 package {{package}}; |
| 6 |
| 7 import android.content.Context; |
| 8 |
| 9 import com.android.webview.chromium.MonochromeLibraryPreloader; |
| 10 |
| 11 import org.chromium.base.library_loader.LibraryLoader; |
| 12 import org.chromium.base.library_loader.LibraryProcessType; |
| 13 import org.chromium.content.browser.ChildProcessCreationParams; |
| 14 |
| 15 /** |
| 16 * This is Application class for Monochrome. |
| 17 * |
| 18 * You shouldn't add anything else in this file, this class is split off from |
| 19 * normal chrome in order to access Android system API through Android WebView |
| 20 * glue layer and have monochrome specific code. |
| 21 */ |
| 22 public class {{ monochrome_application_class }} extends {{ super_class }} { |
| 23 private ChildProcessCreationParams mChildProcessCreationParams; |
| 24 |
| 25 @Override |
| 26 public ChildProcessCreationParams getChildProcessCreationParams() { |
| 27 return mChildProcessCreationParams; |
| 28 } |
| 29 |
| 30 @Override |
| 31 public void onCreate() { |
| 32 super.onCreate(); |
| 33 LibraryLoader.setNativeLibraryPreloader(new MonochromeLibraryPreloader()
); |
| 34 // ChildProcessCreationParams is only needed for browser process, though
it is |
| 35 // created and set in all processes. |
| 36 mChildProcessCreationParams = new ChildProcessCreationParams(getPackageN
ame(), |
| 37 true /* isExternalService */, LibraryProcessType.PROCESS_CHILD); |
| 38 ChildProcessCreationParams.set(mChildProcessCreationParams); |
| 39 } |
| 40 } |
OLD | NEW |