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 org.chromium.base.library_loader;
6 
7 import android.content.Context;
8 
9 /**
10  * This is interface to preload the native library before calling System.loadLibrary.
11  *
12  * Preloading shouldn't call System.loadLibrary() or otherwise cause any Chromium
13  * code to be run, because it can be called before Chromium command line is known.
14  * It can however open the library via dlopen() or android_dlopen_ext() so that
15  * dlopen() later called by System.loadLibrary() becomes a noop. This is what the
16  * only subclass (MonochromeLibraryPreloader) is doing.
17  */
18 public abstract class NativeLibraryPreloader {
loadLibrary(Context context)19     public abstract int loadLibrary(Context context);
20 }
21