| Index: chrome/android/java/templates/MonochromeApplication.template
|
| diff --git a/chrome/android/java/templates/MonochromeApplication.template b/chrome/android/java/templates/MonochromeApplication.template
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d721fbbab37984262b31019730ef02be9f43c13e
|
| --- /dev/null
|
| +++ b/chrome/android/java/templates/MonochromeApplication.template
|
| @@ -0,0 +1,40 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +package {{package}};
|
| +
|
| +import android.content.Context;
|
| +
|
| +import com.android.webview.chromium.MonochromeLibraryPreloader;
|
| +
|
| +import org.chromium.base.library_loader.LibraryLoader;
|
| +import org.chromium.base.library_loader.LibraryProcessType;
|
| +import org.chromium.content.browser.ChildProcessCreationParams;
|
| +
|
| +/**
|
| + * This is Application class for Monochrome.
|
| + *
|
| + * You shouldn't add anything else in this file, this class is split off from
|
| + * normal chrome in order to access Android system API through Android WebView
|
| + * glue layer and have monochrome specific code.
|
| + */
|
| +public class {{ monochrome_application_class }} extends {{ super_class }} {
|
| + private ChildProcessCreationParams mChildProcessCreationParams;
|
| +
|
| + @Override
|
| + public ChildProcessCreationParams getChildProcessCreationParams() {
|
| + return mChildProcessCreationParams;
|
| + }
|
| +
|
| + @Override
|
| + public void onCreate() {
|
| + super.onCreate();
|
| + LibraryLoader.setNativeLibraryPreloader(new MonochromeLibraryPreloader());
|
| + // ChildProcessCreationParams is only needed for browser process, though it is
|
| + // created and set in all processes.
|
| + mChildProcessCreationParams = new ChildProcessCreationParams(getPackageName(),
|
| + true /* isExternalService */, LibraryProcessType.PROCESS_CHILD);
|
| + ChildProcessCreationParams.set(mChildProcessCreationParams);
|
| + }
|
| +}
|
|
|