| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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.mojo_shell_apk; | 5 package org.chromium.mojo_shell_apk; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 import android.util.Log; | 8 import android.util.Log; |
| 9 | 9 |
| 10 import org.chromium.base.JNINamespace; | 10 import org.chromium.base.JNINamespace; |
| 11 | 11 |
| 12 import java.io.File; | 12 import java.io.File; |
| 13 import java.util.ArrayList; | 13 import java.util.ArrayList; |
| 14 import java.util.Arrays; | 14 import java.util.Arrays; |
| 15 import java.util.List; | 15 import java.util.List; |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * A placeholder class to call native functions. | 18 * A placeholder class to call native functions. |
| 19 **/ | 19 **/ |
| 20 @JNINamespace("mojo") | 20 @JNINamespace("mojo::shell") |
| 21 public class MojoMain { | 21 public class MojoMain { |
| 22 private static final String TAG = "MojoMain"; | 22 private static final String TAG = "MojoMain"; |
| 23 | 23 |
| 24 // Directory where applications bundled with the shell will be extracted. | 24 // Directory where applications bundled with the shell will be extracted. |
| 25 private static final String LOCAL_APP_DIRECTORY = "local_apps"; | 25 private static final String LOCAL_APP_DIRECTORY = "local_apps"; |
| 26 // Individual applications bundled with the shell as assets. | 26 // Individual applications bundled with the shell as assets. |
| 27 private static final String NETWORK_LIBRARY_APP = "network_service.mojo"; | 27 private static final String NETWORK_LIBRARY_APP = "network_service.mojo"; |
| 28 // The mojo_shell library is also an executable run in forked processes when
running | 28 // The mojo_shell library is also an executable run in forked processes when
running |
| 29 // multi-process. | 29 // multi-process. |
| 30 private static final String MOJO_SHELL_EXECUTABLE = "libmojo_shell.so"; | 30 private static final String MOJO_SHELL_EXECUTABLE = "libmojo_shell.so"; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 /** | 86 /** |
| 87 * Initializes the native system. This API should be called only once per pr
ocess. | 87 * Initializes the native system. This API should be called only once per pr
ocess. |
| 88 **/ | 88 **/ |
| 89 private static native void nativeInit(Context context, String mojoShellPath, | 89 private static native void nativeInit(Context context, String mojoShellPath, |
| 90 String[] parameters, | 90 String[] parameters, |
| 91 String bundledAppsDirectory); | 91 String bundledAppsDirectory); |
| 92 | 92 |
| 93 private static native void nativeStart(String appUrl); | 93 private static native void nativeStart(String appUrl); |
| 94 | 94 |
| 95 } | 95 } |
| OLD | NEW |