Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.base.library_loader; | 5 package org.chromium.base.library_loader; |
| 6 | 6 |
| 7 public class NativeLibraries { | 7 public class NativeLibraries { |
| 8 /** | 8 /** |
| 9 * IMPORTANT NOTE: The variables defined here must _not_ be 'final'. | 9 * IMPORTANT NOTE: The variables defined here must _not_ be 'final'. |
| 10 * | 10 * |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 34 * - If the variables were defined as 'final', their value would be | 34 * - If the variables were defined as 'final', their value would be |
| 35 * optimized out inside of 'base.jar', and could not be specialized | 35 * optimized out inside of 'base.jar', and could not be specialized |
| 36 * for every chromium program. This, however, doesn't apply to arrays of | 36 * for every chromium program. This, however, doesn't apply to arrays of |
| 37 * strings, which can be defined as final. | 37 * strings, which can be defined as final. |
| 38 * | 38 * |
| 39 * This exotic scheme is used to avoid injecting project-specific, or | 39 * This exotic scheme is used to avoid injecting project-specific, or |
| 40 * even build-specific, values into the base layer. E.g. this is | 40 * even build-specific, values into the base layer. E.g. this is |
| 41 * how the component build is supported on Android without modifying | 41 * how the component build is supported on Android without modifying |
| 42 * the sources of each and every Chromium-based target. | 42 * the sources of each and every Chromium-based target. |
| 43 */ | 43 */ |
| 44 | |
| 45 #if defined(ENABLE_CHROMIUM_LINKER_LIBRARY_IN_ZIP_FILE) && \ | |
| 46 !defined(ENABLE_CHROMIUM_LINKER) | |
|
rmcilroy
2014/06/27 10:48:03
nit - indent +2
Anton
2014/06/27 12:43:24
Done.
| |
| 47 #error "Must have ENABLE_CHROMIUM_LINKER to enable library in zip file" | |
| 48 #endif | |
| 49 | |
| 44 // Set to true to enable the use of the Chromium Linker. | 50 // Set to true to enable the use of the Chromium Linker. |
| 45 #if defined(ENABLE_CHROMIUM_LINKER) | 51 #if defined(ENABLE_CHROMIUM_LINKER) |
| 46 public static boolean USE_LINKER = true; | 52 public static boolean USE_LINKER = true; |
| 47 #else | 53 #else |
| 48 public static boolean USE_LINKER = false; | 54 public static boolean USE_LINKER = false; |
| 49 #endif | 55 #endif |
| 50 | 56 |
| 57 #if defined(ENABLE_CHROMIUM_LINKER_LIBRARY_IN_ZIP_FILE) | |
| 58 public static boolean USE_LIBRARY_IN_ZIP_FILE = true; | |
| 59 #else | |
| 60 public static boolean USE_LIBRARY_IN_ZIP_FILE = false; | |
| 61 #endif | |
| 62 | |
| 51 #if defined(ENABLE_CHROMIUM_LINKER_TESTS) | 63 #if defined(ENABLE_CHROMIUM_LINKER_TESTS) |
| 52 public static boolean ENABLE_LINKER_TESTS = true; | 64 public static boolean ENABLE_LINKER_TESTS = true; |
| 53 #else | 65 #else |
| 54 public static boolean ENABLE_LINKER_TESTS = false; | 66 public static boolean ENABLE_LINKER_TESTS = false; |
| 55 #endif | 67 #endif |
| 56 | 68 |
| 57 // This is the list of native libraries to be loaded (in the correct order) | 69 // This is the list of native libraries to be loaded (in the correct order) |
| 58 // by LibraryLoader.java. The base java library is compiled with no | 70 // by LibraryLoader.java. The base java library is compiled with no |
| 59 // array defined, and then the build system creates a version of the file | 71 // array defined, and then the build system creates a version of the file |
| 60 // with the real list of libraries required (which changes based upon which | 72 // with the real list of libraries required (which changes based upon which |
| 61 // .apk is being built). | 73 // .apk is being built). |
| 62 // TODO(cjhopman): This is public since it is referenced by ChromeNativeTest Activity.java | 74 // TODO(cjhopman): This is public since it is referenced by ChromeNativeTest Activity.java |
| 63 // directly. The two ways of library loading should be refactored into one. | 75 // directly. The two ways of library loading should be refactored into one. |
| 64 public static final String[] LIBRARIES | 76 public static final String[] LIBRARIES |
| 65 #include <native_libraries_array.h> | 77 #include <native_libraries_array.h> |
| 66 ; | 78 ; |
| 67 // This is the expected version of the 'main' native library, which is the o ne that | 79 // This is the expected version of the 'main' native library, which is the o ne that |
| 68 // implements the initial set of base JNI functions including | 80 // implements the initial set of base JNI functions including |
| 69 // base::android::nativeGetVersionName() | 81 // base::android::nativeGetVersionName() |
| 70 static String VERSION_NUMBER | 82 static String VERSION_NUMBER |
| 71 #include <native_libraries_version.h> | 83 #include <native_libraries_version.h> |
| 72 ; | 84 ; |
| 73 } | 85 } |
| OLD | NEW |