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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java

Issue 1867543002: Enable deep-linking from notifications for recently used web apps on the Android home screen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bulk-webappdatastorage
Patch Set: Address nits Created 4 years, 8 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: chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java
index 02912595a432225a0cd3fb223408a64cd9d5f2d9..05d3baf41fc96288e94c6989db8fe00c2c9af8cc 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java
@@ -9,6 +9,7 @@ import android.content.Intent;
import android.net.Uri;
import android.text.TextUtils;
+import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.ApplicationStatus;
import org.chromium.chrome.browser.IntentHandler;
import org.chromium.chrome.browser.TabState;
@@ -192,4 +193,16 @@ public class TabDelegate extends TabCreator {
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
return intent;
}
-}
+
+ /**
+ * Passes the supplied web app launch intent to the IntentHandler.
+ * @param intent Web app launch intent.
+ */
+ public void createNewStandaloneFrame(Intent intent) {
+ assert intent != null;
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+ | ApiCompatibilityUtils.getActivityNewDocumentFlag());
+ IntentHandler.startActivityForTrustedIntent(intent,
+ ApplicationStatus.getApplicationContext());
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698