Chromium Code Reviews| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 public static final String EXTRA_SOURCE = "org.chromium.chrome.browser.webap p_source"; | 64 public static final String EXTRA_SOURCE = "org.chromium.chrome.browser.webap p_source"; |
| 65 public static final String EXTRA_THEME_COLOR = "org.chromium.chrome.browser. theme_color"; | 65 public static final String EXTRA_THEME_COLOR = "org.chromium.chrome.browser. theme_color"; |
| 66 public static final String EXTRA_BACKGROUND_COLOR = | 66 public static final String EXTRA_BACKGROUND_COLOR = |
| 67 "org.chromium.chrome.browser.background_color"; | 67 "org.chromium.chrome.browser.background_color"; |
| 68 public static final String EXTRA_IS_ICON_GENERATED = | 68 public static final String EXTRA_IS_ICON_GENERATED = |
| 69 "org.chromium.chrome.browser.is_icon_generated"; | 69 "org.chromium.chrome.browser.is_icon_generated"; |
| 70 public static final String EXTRA_VERSION = | 70 public static final String EXTRA_VERSION = |
| 71 "org.chromium.chrome.browser.webapp_shortcut_version"; | 71 "org.chromium.chrome.browser.webapp_shortcut_version"; |
| 72 public static final String REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB = | 72 public static final String REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB = |
| 73 "REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB"; | 73 "REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB"; |
| 74 public static final String EXTRA_WEBAPK_PACKAGE_NAME = | |
| 75 "org.chromium.chrome.browser.webapp_webapk_package_name"; | |
|
pkotwicz
2016/05/18 23:00:17
How about: org.chromium.chrome.browser.webapk_pack
Xi Han
2016/05/19 18:31:49
Done.
| |
| 74 | 76 |
| 75 // When a new field is added to the intent, this version should be increment ed so that it will | 77 // When a new field is added to the intent, this version should be increment ed so that it will |
| 76 // be correctly populated into the WebappRegistry/WebappDataStorage. | 78 // be correctly populated into the WebappRegistry/WebappDataStorage. |
| 77 public static final int WEBAPP_SHORTCUT_VERSION = 1; | 79 public static final int WEBAPP_SHORTCUT_VERSION = 1; |
| 78 | 80 |
| 79 // This value is equal to kInvalidOrMissingColor in the C++ content::Manifes t struct. | 81 // This value is equal to kInvalidOrMissingColor in the C++ content::Manifes t struct. |
| 80 public static final long MANIFEST_COLOR_INVALID_OR_MISSING = ((long) Integer .MAX_VALUE) + 1; | 82 public static final long MANIFEST_COLOR_INVALID_OR_MISSING = ((long) Integer .MAX_VALUE) + 1; |
| 81 | 83 |
| 82 private static final String TAG = "ShortcutHelper"; | 84 private static final String TAG = "ShortcutHelper"; |
| 83 | 85 |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 549 if (drawable instanceof BitmapDrawable) { | 551 if (drawable instanceof BitmapDrawable) { |
| 550 BitmapDrawable bd = (BitmapDrawable) drawable; | 552 BitmapDrawable bd = (BitmapDrawable) drawable; |
| 551 return bd.getBitmap(); | 553 return bd.getBitmap(); |
| 552 } | 554 } |
| 553 assert false : "The drawable was not a bitmap drawable as expected"; | 555 assert false : "The drawable was not a bitmap drawable as expected"; |
| 554 return null; | 556 return null; |
| 555 } | 557 } |
| 556 | 558 |
| 557 private static native void nativeOnWebappDataStored(long callbackPointer); | 559 private static native void nativeOnWebappDataStored(long callbackPointer); |
| 558 } | 560 } |
| OLD | NEW |