Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Unified Diff: shell/android/apk/src/org/chromium/mojo/shell/ShellService.java

Issue 1364243002: Bundle core applicatons in the shell. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« shell/BUILD.gn ('K') | « shell/BUILD.gn ('k') | shell/android/main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/android/apk/src/org/chromium/mojo/shell/ShellService.java
diff --git a/shell/android/apk/src/org/chromium/mojo/shell/ShellService.java b/shell/android/apk/src/org/chromium/mojo/shell/ShellService.java
index d961d964668996bea83e17b57d3be8ac6e743e58..b3804c33e5ea1799ba79f4d02c3aab79b23fb656 100644
--- a/shell/android/apk/src/org/chromium/mojo/shell/ShellService.java
+++ b/shell/android/apk/src/org/chromium/mojo/shell/ShellService.java
@@ -10,6 +10,7 @@ import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
+import android.content.res.AssetManager;
import android.os.Binder;
import android.os.IBinder;
import android.util.JsonReader;
@@ -120,6 +121,7 @@ public class ShellService extends Service {
static interface IShellBindingActivity {
// Called when the ShellService service is connected.
void onShellBound(ShellService shellService);
+
// Called when the ShellService service is disconnected.
void onShellUnbound();
}
@@ -213,7 +215,8 @@ public class ShellService extends Service {
parametersList.add("--url-mappings=mojo:window_manager=" + DEFAULT_WM);
}
- nativeStart(applicationContext, mojoShellChild.getAbsolutePath(),
+ nativeStart(applicationContext, applicationContext.getAssets(),
+ mojoShellChild.getAbsolutePath(),
parametersList.toArray(new String[parametersList.size()]),
getLocalAppsDir(applicationContext).getAbsolutePath(),
getTmpDir(applicationContext).getAbsolutePath(),
@@ -306,8 +309,9 @@ public class ShellService extends Service {
/**
* Initializes the native system. This API should be called only once per process.
**/
- private static native void nativeStart(Context context, String mojoShellChildPath,
- String[] parameters, String bundledAppsDirectory, String tmpDir, String homeDir);
+ private static native void nativeStart(Context context, AssetManager assetManager,
+ String mojoShellChildPath, String[] parameters, String bundledAppsDirectory,
+ String tmpDir, String homeDir);
private static native void nativeAddApplicationURL(String url);
« shell/BUILD.gn ('K') | « shell/BUILD.gn ('k') | shell/android/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698