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

Unified Diff: shell/android/task_launcher/src/org/chromium/mojo/task_launcher/TaskLauncher.java

Issue 1280613003: Allow native_viewport to create new native windows on demand on Android. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Refactor Created 5 years, 4 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
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);
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698