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

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

Issue 1224273003: webapps: propogate name and shortName from manifest to Java (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add back explict destructor Created 5 years, 5 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/document/ChromeLauncherActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java
index c7178ef1d0dcb9307758efccd9d426c15a0a29cf..1a4266e6980ed9dda65c1c1e79f89f8411559f11 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java
@@ -58,6 +58,7 @@ import org.chromium.chrome.browser.tabmodel.document.DocumentTabModelSelector;
import org.chromium.chrome.browser.util.FeatureUtilities;
import org.chromium.chrome.browser.util.IntentUtils;
import org.chromium.chrome.browser.webapps.WebappActivity;
+import org.chromium.chrome.browser.webapps.WebappInfo;
import org.chromium.content.browser.crypto.CipherFactory;
import org.chromium.content_public.browser.LoadUrlParams;
import org.chromium.content_public.common.ScreenOrientationValues;
@@ -767,13 +768,15 @@ public class ChromeLauncherActivity extends Activity
private Intent launchWebapp(Intent intent) {
String webappId = IntentUtils.safeGetStringExtra(intent, ShortcutHelper.EXTRA_ID);
String webappUrl = IntentUtils.safeGetStringExtra(intent, ShortcutHelper.EXTRA_URL);
- String webappTitle = IntentUtils.safeGetStringExtra(intent, ShortcutHelper.EXTRA_TITLE);
String webappIcon = IntentUtils.safeGetStringExtra(intent, ShortcutHelper.EXTRA_ICON);
int webappOrientation = IntentUtils.safeGetIntExtra(intent,
ShortcutHelper.EXTRA_ORIENTATION, ScreenOrientationValues.DEFAULT);
int webappSource = IntentUtils.safeGetIntExtra(intent,
ShortcutHelper.EXTRA_SOURCE, ShortcutSource.UNKNOWN);
+ String webappName = WebappInfo.nameFromIntent(intent);
+ String webappShortName = WebappInfo.shortNameFromIntent(intent);
+
if (webappId != null && webappUrl != null) {
String webappMacString = IntentUtils.safeGetStringExtra(
intent, ShortcutHelper.EXTRA_MAC);
@@ -786,8 +789,8 @@ public class ChromeLauncherActivity extends Activity
webappUrl, webappSource);
}
- WebappActivity.launchInstance(this, webappId,
- webappUrl, webappIcon, webappTitle, webappOrientation, webappSource);
+ WebappActivity.launchInstance(this, webappId, webappUrl,
+ webappIcon, webappName, webappShortName, webappOrientation, webappSource);
} else {
Log.e(TAG, "Shortcut (" + webappUrl + ") opened in Chrome.");

Powered by Google App Engine
This is Rietveld 408576698