| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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; | 5 package org.chromium.chrome.browser; |
| 6 | 6 |
| 7 import android.app.ActivityManager; | 7 import android.app.ActivityManager; |
| 8 import android.content.Context; | 8 import android.content.Context; |
| 9 import android.content.Intent; | 9 import android.content.Intent; |
| 10 import android.content.pm.PackageManager; | 10 import android.content.pm.PackageManager; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 public static final String EXTRA_SOURCE = "org.chromium.chrome.browser.webap
p_source"; | 67 public static final String EXTRA_SOURCE = "org.chromium.chrome.browser.webap
p_source"; |
| 68 public static final String EXTRA_THEME_COLOR = "org.chromium.chrome.browser.
theme_color"; | 68 public static final String EXTRA_THEME_COLOR = "org.chromium.chrome.browser.
theme_color"; |
| 69 public static final String EXTRA_BACKGROUND_COLOR = | 69 public static final String EXTRA_BACKGROUND_COLOR = |
| 70 "org.chromium.chrome.browser.background_color"; | 70 "org.chromium.chrome.browser.background_color"; |
| 71 public static final String EXTRA_IS_ICON_GENERATED = | 71 public static final String EXTRA_IS_ICON_GENERATED = |
| 72 "org.chromium.chrome.browser.is_icon_generated"; | 72 "org.chromium.chrome.browser.is_icon_generated"; |
| 73 public static final String EXTRA_VERSION = | 73 public static final String EXTRA_VERSION = |
| 74 "org.chromium.chrome.browser.webapp_shortcut_version"; | 74 "org.chromium.chrome.browser.webapp_shortcut_version"; |
| 75 public static final String REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB = | 75 public static final String REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB = |
| 76 "REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB"; | 76 "REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB"; |
| 77 public static final String EXTRA_WEBAPK_PACKAGE_NAME = |
| 78 "org.chromium.chrome.browser.webapk_package_name"; |
| 77 | 79 |
| 78 // When a new field is added to the intent, this version should be increment
ed so that it will | 80 // When a new field is added to the intent, this version should be increment
ed so that it will |
| 79 // be correctly populated into the WebappRegistry/WebappDataStorage. | 81 // be correctly populated into the WebappRegistry/WebappDataStorage. |
| 80 public static final int WEBAPP_SHORTCUT_VERSION = 2; | 82 public static final int WEBAPP_SHORTCUT_VERSION = 2; |
| 81 | 83 |
| 82 // This value is equal to kInvalidOrMissingColor in the C++ content::Manifes
t struct. | 84 // This value is equal to kInvalidOrMissingColor in the C++ content::Manifes
t struct. |
| 83 public static final long MANIFEST_COLOR_INVALID_OR_MISSING = ((long) Integer
.MAX_VALUE) + 1; | 85 public static final long MANIFEST_COLOR_INVALID_OR_MISSING = ((long) Integer
.MAX_VALUE) + 1; |
| 84 | 86 |
| 85 private static final String TAG = "ShortcutHelper"; | 87 private static final String TAG = "ShortcutHelper"; |
| 86 | 88 |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 if (drawable instanceof BitmapDrawable) { | 558 if (drawable instanceof BitmapDrawable) { |
| 557 BitmapDrawable bd = (BitmapDrawable) drawable; | 559 BitmapDrawable bd = (BitmapDrawable) drawable; |
| 558 return bd.getBitmap(); | 560 return bd.getBitmap(); |
| 559 } | 561 } |
| 560 assert false : "The drawable was not a bitmap drawable as expected"; | 562 assert false : "The drawable was not a bitmap drawable as expected"; |
| 561 return null; | 563 return null; |
| 562 } | 564 } |
| 563 | 565 |
| 564 private static native void nativeOnWebappDataStored(long callbackPointer); | 566 private static native void nativeOnWebappDataStored(long callbackPointer); |
| 565 } | 567 } |
| OLD | NEW |