Index: shell/android/task_launcher/src/org/chromium/mojo/task_launcher/TaskLauncher.java |
diff --git a/shell/android/task_launcher/src/org/chromium/mojo/task_launcher/TaskLauncher.java b/shell/android/task_launcher/src/org/chromium/mojo/task_launcher/TaskLauncher.java |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1b6586f037a95eb73ddfe4b16ca288d095555270 |
--- /dev/null |
+++ b/shell/android/task_launcher/src/org/chromium/mojo/task_launcher/TaskLauncher.java |
@@ -0,0 +1,25 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+package org.chromium.mojo.task_launcher; |
+ |
+import android.content.Context; |
+import android.content.Intent; |
+ |
+import org.chromium.base.CalledByNative; |
+import org.chromium.base.JNINamespace; |
+import org.chromium.mojo.shell.ViewportActivity; |
+ |
+@JNINamespace("shell::android::task_launcher") |
+class TaskLauncher { |
+ @CalledByNative |
+ public static void sendIntent(Context context) { |
+ final Intent newDocumentIntent = new Intent(context, ViewportActivity.class); |
+ newDocumentIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT); |
+ newDocumentIntent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK); |
+ newDocumentIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
+ |
+ context.startActivity(newDocumentIntent); |
+ } |
+} |