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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java

Issue 2864613002: Open the current URL if a WebAPK is opened from the context menu. (Closed)
Patch Set: Use WebApkNavigationClient Created 3 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
index 0e120f241376ebad84f24386884dbeaa85252cfb..dcd93dab22af3310f2e48635d7fcfc8ae4deca0a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
@@ -160,6 +160,7 @@ import org.chromium.ui.base.DeviceFormFactor;
import org.chromium.ui.base.PageTransition;
import org.chromium.ui.base.WindowAndroid;
import org.chromium.ui.widget.Toast;
+import org.chromium.webapk.lib.client.WebApkNavigationClient;
import org.chromium.webapk.lib.client.WebApkValidator;
import java.util.ArrayList;
@@ -1903,8 +1904,8 @@ public abstract class ChromeActivity extends AsyncInitializationActivity
} else if (id == R.id.open_webapk_id) {
Context context = ContextUtils.getApplicationContext();
String packageName = WebApkValidator.queryWebApkPackage(context, currentTab.getUrl());
- Intent launchIntent =
- context.getPackageManager().getLaunchIntentForPackage(packageName);
+ Intent launchIntent = WebApkNavigationClient.createLaunchWebApkIntent(
+ packageName, currentTab.getUrl());
boolean launchFailed = false;
if (launchIntent != null) {
try {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698