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

Unified Diff: shell/android/apk/src/org/chromium/mojo_shell_apk/MojoMain.java

Issue 816473002: Update mojo shell so that --args-for can be used on android (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Follow review Created 6 years 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
« no previous file with comments | « shell/BUILD.gn ('k') | shell/android/apk/src/org/chromium/mojo_shell_apk/MojoShellActivity.java » ('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_apk/MojoMain.java
diff --git a/shell/android/apk/src/org/chromium/mojo_shell_apk/MojoMain.java b/shell/android/apk/src/org/chromium/mojo_shell_apk/MojoMain.java
index 43e0c921eb08b7b427face0e568dbfa23b1121e0..8de6be7bbc456e5e88f3053208f46796eb1ae64a 100644
--- a/shell/android/apk/src/org/chromium/mojo_shell_apk/MojoMain.java
+++ b/shell/android/apk/src/org/chromium/mojo_shell_apk/MojoMain.java
@@ -56,7 +56,6 @@ public class MojoMain {
List<String> parametersList = new ArrayList<String>();
// Program name.
- parametersList.add("mojo_shell");
if (parameters != null) {
parametersList.addAll(Arrays.asList(parameters));
}
@@ -74,9 +73,18 @@ public class MojoMain {
/**
* Starts the specified application in the specified context.
+ *
+ * @return <code>true</code> if an application has been launched.
**/
- static void start(final String appUrl) {
- nativeStart(appUrl);
+ static boolean start() {
+ return nativeStart();
+ }
+
+ /**
+ * Adds the given URL to the set of mojo applications to run on start.
+ */
+ static void addApplicationURL(String url) {
+ nativeAddApplicationURL(url);
}
private static File getLocalAppsDir(Context context) {
@@ -90,6 +98,7 @@ public class MojoMain {
String[] parameters,
String bundledAppsDirectory);
- private static native void nativeStart(String appUrl);
+ private static native boolean nativeStart();
+ private static native void nativeAddApplicationURL(String url);
}
« no previous file with comments | « shell/BUILD.gn ('k') | shell/android/apk/src/org/chromium/mojo_shell_apk/MojoShellActivity.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698