OLD | NEW |
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.util.Log; | 10 import android.util.Log; |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 intent.putExtra(ShortcutHelper.EXTRA_ICON, encodedIcon()); | 248 intent.putExtra(ShortcutHelper.EXTRA_ICON, encodedIcon()); |
249 intent.putExtra(ShortcutHelper.EXTRA_VERSION, ShortcutHelper.WEBAPP_SHOR
TCUT_VERSION); | 249 intent.putExtra(ShortcutHelper.EXTRA_VERSION, ShortcutHelper.WEBAPP_SHOR
TCUT_VERSION); |
250 intent.putExtra(ShortcutHelper.EXTRA_NAME, name()); | 250 intent.putExtra(ShortcutHelper.EXTRA_NAME, name()); |
251 intent.putExtra(ShortcutHelper.EXTRA_SHORT_NAME, shortName()); | 251 intent.putExtra(ShortcutHelper.EXTRA_SHORT_NAME, shortName()); |
252 intent.putExtra(ShortcutHelper.EXTRA_ORIENTATION, orientation()); | 252 intent.putExtra(ShortcutHelper.EXTRA_ORIENTATION, orientation()); |
253 intent.putExtra(ShortcutHelper.EXTRA_SOURCE, source()); | 253 intent.putExtra(ShortcutHelper.EXTRA_SOURCE, source()); |
254 intent.putExtra(ShortcutHelper.EXTRA_THEME_COLOR, themeColor()); | 254 intent.putExtra(ShortcutHelper.EXTRA_THEME_COLOR, themeColor()); |
255 intent.putExtra(ShortcutHelper.EXTRA_BACKGROUND_COLOR, backgroundColor()
); | 255 intent.putExtra(ShortcutHelper.EXTRA_BACKGROUND_COLOR, backgroundColor()
); |
256 intent.putExtra(ShortcutHelper.EXTRA_IS_ICON_GENERATED, isIconGenerated(
)); | 256 intent.putExtra(ShortcutHelper.EXTRA_IS_ICON_GENERATED, isIconGenerated(
)); |
257 } | 257 } |
| 258 |
| 259 /** |
| 260 * Returns true if the WebappInfo was created for an Intent fired from a lau
ncher shortcut (as |
| 261 * opposed to an intent from a push notification or other internal source). |
| 262 */ |
| 263 public boolean isLaunchedFromHomescreen() { |
| 264 return source() != ShortcutSource.NOTIFICATION; |
| 265 } |
258 } | 266 } |
OLD | NEW |