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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java

Issue 2760103002: Merge WebApkConstants.EXTRA_WEBAPK_PACKAGE_NAME and ShortcutHelper.EXTRA_WEBAPK_PACKAGE_NAME (Closed)
Patch Set: Merge branch 'master' into package_name Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.webapps; 5 package org.chromium.chrome.browser.webapps;
6 6
7 import android.content.Intent; 7 import android.content.Intent;
8 import android.graphics.Bitmap; 8 import android.graphics.Bitmap;
9 import android.net.Uri; 9 import android.net.Uri;
10 import android.text.TextUtils; 10 import android.text.TextUtils;
11 11
12 import org.chromium.base.Log; 12 import org.chromium.base.Log;
13 import org.chromium.blink_public.platform.WebDisplayMode; 13 import org.chromium.blink_public.platform.WebDisplayMode;
14 import org.chromium.chrome.browser.ShortcutHelper; 14 import org.chromium.chrome.browser.ShortcutHelper;
15 import org.chromium.chrome.browser.ShortcutSource; 15 import org.chromium.chrome.browser.ShortcutSource;
16 import org.chromium.chrome.browser.util.IntentUtils; 16 import org.chromium.chrome.browser.util.IntentUtils;
17 import org.chromium.content_public.common.ScreenOrientationValues; 17 import org.chromium.content_public.common.ScreenOrientationValues;
18 import org.chromium.webapk.lib.common.WebApkConstants;
dominickn 2017/03/20 23:59:04 I think you can revert the changes in this file af
18 19
19 /** 20 /**
20 * Stores info about a web app. 21 * Stores info about a web app.
21 */ 22 */
22 public class WebappInfo { 23 public class WebappInfo {
23 private static final String TAG = "WebappInfo"; 24 private static final String TAG = "WebappInfo";
24 25
25 /** 26 /**
26 * Parameter for {@link WebappInfo#create()} method which allows either a Bi tmap or a PNG 27 * Parameter for {@link WebappInfo#create()} method which allows either a Bi tmap or a PNG
27 * encoded string to be passed as a parameter. 28 * encoded string to be passed as a parameter.
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 intent.putExtra(ShortcutHelper.EXTRA_VERSION, ShortcutHelper.WEBAPP_SHOR TCUT_VERSION); 297 intent.putExtra(ShortcutHelper.EXTRA_VERSION, ShortcutHelper.WEBAPP_SHOR TCUT_VERSION);
297 intent.putExtra(ShortcutHelper.EXTRA_NAME, name()); 298 intent.putExtra(ShortcutHelper.EXTRA_NAME, name());
298 intent.putExtra(ShortcutHelper.EXTRA_SHORT_NAME, shortName()); 299 intent.putExtra(ShortcutHelper.EXTRA_SHORT_NAME, shortName());
299 intent.putExtra(ShortcutHelper.EXTRA_DISPLAY_MODE, displayMode()); 300 intent.putExtra(ShortcutHelper.EXTRA_DISPLAY_MODE, displayMode());
300 intent.putExtra(ShortcutHelper.EXTRA_ORIENTATION, orientation()); 301 intent.putExtra(ShortcutHelper.EXTRA_ORIENTATION, orientation());
301 intent.putExtra(ShortcutHelper.EXTRA_SOURCE, source()); 302 intent.putExtra(ShortcutHelper.EXTRA_SOURCE, source());
302 intent.putExtra(ShortcutHelper.EXTRA_THEME_COLOR, themeColor()); 303 intent.putExtra(ShortcutHelper.EXTRA_THEME_COLOR, themeColor());
303 intent.putExtra(ShortcutHelper.EXTRA_BACKGROUND_COLOR, backgroundColor() ); 304 intent.putExtra(ShortcutHelper.EXTRA_BACKGROUND_COLOR, backgroundColor() );
304 intent.putExtra(ShortcutHelper.EXTRA_IS_ICON_GENERATED, isIconGenerated( )); 305 intent.putExtra(ShortcutHelper.EXTRA_IS_ICON_GENERATED, isIconGenerated( ));
305 if (webApkPackageName() != null) { 306 if (webApkPackageName() != null) {
306 intent.putExtra(ShortcutHelper.EXTRA_WEBAPK_PACKAGE_NAME, webApkPack ageName()); 307 intent.putExtra(WebApkConstants.EXTRA_WEBAPK_PACKAGE_NAME, webApkPac kageName());
307 } 308 }
308 } 309 }
309 310
310 /** 311 /**
311 * Returns true if the WebappInfo was created for an Intent fired from a lau ncher shortcut (as 312 * Returns true if the WebappInfo was created for an Intent fired from a lau ncher shortcut (as
312 * opposed to an intent from a push notification or other internal source). 313 * opposed to an intent from a push notification or other internal source).
313 */ 314 */
314 public boolean isLaunchedFromHomescreen() { 315 public boolean isLaunchedFromHomescreen() {
315 return source() != ShortcutSource.NOTIFICATION; 316 return source() != ShortcutSource.NOTIFICATION;
316 } 317 }
317 } 318 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698