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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.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/webapps/WebappActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
index 0d5ca4d166536798505232c421e02d634e2824f7..263f0445093984137030ed7e605dee887798280c 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
@@ -258,8 +258,8 @@ public class WebappActivity extends FullScreenActivity {
}
private void updateTaskDescription() {
- String title = mWebappInfo.title() == null
- ? getActivityTab().getTitle() : mWebappInfo.title();
+ String title = mWebappInfo.shortName() == null
+ ? getActivityTab().getTitle() : mWebappInfo.shortName();
Bitmap icon = mWebappInfo.icon() == null
? getActivityTab().getFavicon() : mWebappInfo.icon();
int color = mBrandColor == null
@@ -326,11 +326,12 @@ public class WebappActivity extends FullScreenActivity {
* @param id ID of the webapp.
* @param url URL for the webapp.
* @param icon Base64 encoded Bitmap representing the webapp.
- * @param title String to show in Recents.
+ * @param name String to show on the splash screen.
+ * @param shortName String to show on the recents menu
* @param orientation Default orientation for the activity.
*/
public static void launchInstance(Context context, String id, String url, String icon,
- String title, int orientation, int source) {
+ String name, String shortName, int orientation, int source) {
String activityName = WebappActivity.class.getName();
if (!FeatureUtilities.isDocumentModeEligible(context)) {
// Specifically assign the app to a particular WebappActivity instance.
@@ -344,7 +345,8 @@ public class WebappActivity extends FullScreenActivity {
webappIntent.putExtra(ShortcutHelper.EXTRA_ICON, icon);
webappIntent.putExtra(ShortcutHelper.EXTRA_ID, id);
webappIntent.putExtra(ShortcutHelper.EXTRA_URL, url);
- webappIntent.putExtra(ShortcutHelper.EXTRA_TITLE, title);
+ webappIntent.putExtra(ShortcutHelper.EXTRA_NAME, name);
+ webappIntent.putExtra(ShortcutHelper.EXTRA_SHORT_NAME, shortName);
webappIntent.putExtra(ShortcutHelper.EXTRA_ORIENTATION, orientation);
webappIntent.putExtra(ShortcutHelper.EXTRA_SOURCE, source);

Powered by Google App Engine
This is Rietveld 408576698