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.webapk.shell_apk; | 5 package org.chromium.webapk.shell_apk; |
6 | 6 |
7 import android.app.Activity; | 7 import android.app.Activity; |
8 import android.content.ActivityNotFoundException; | 8 import android.content.ActivityNotFoundException; |
9 import android.content.Context; | 9 import android.content.Context; |
10 import android.content.Intent; | 10 import android.content.Intent; |
(...skipping 20 matching lines...) Expand all Loading... |
31 private static final String LAST_RESORT_HOST_BROWSER = "com.android.chrome"; | 31 private static final String LAST_RESORT_HOST_BROWSER = "com.android.chrome"; |
32 private static final String LAST_RESORT_HOST_BROWSER_APPLICATION_NAME = "Goo
gle Chrome"; | 32 private static final String LAST_RESORT_HOST_BROWSER_APPLICATION_NAME = "Goo
gle Chrome"; |
33 private static final String TAG = "cr_MainActivity"; | 33 private static final String TAG = "cr_MainActivity"; |
34 | 34 |
35 /** | 35 /** |
36 * Name of class which launches browser in WebAPK mode. | 36 * Name of class which launches browser in WebAPK mode. |
37 */ | 37 */ |
38 private static final String HOST_BROWSER_LAUNCHER_CLASS_NAME = | 38 private static final String HOST_BROWSER_LAUNCHER_CLASS_NAME = |
39 "org.chromium.webapk.lib.runtime_library.HostBrowserLauncher"; | 39 "org.chromium.webapk.lib.runtime_library.HostBrowserLauncher"; |
40 | 40 |
41 // Action for launching {@link WebappLauncherActivity}. Must stay in sync wi
th | 41 // Action for launching {@link WebappLauncherActivity}. |
42 // {@link WebappLauncherActivity#ACTION_START_WEBAPP}. | 42 // TODO(hanxi): crbug.com/737556. Replaces this string with the new WebAPK l
aunch action after |
| 43 // it is propagated to all the Chrome's channels. |
43 public static final String ACTION_START_WEBAPK = | 44 public static final String ACTION_START_WEBAPK = |
44 "com.google.android.apps.chrome.webapps.WebappManager.ACTION_START_W
EBAPP"; | 45 "com.google.android.apps.chrome.webapps.WebappManager.ACTION_START_W
EBAPP"; |
45 | 46 |
46 // Must stay in sync with | 47 // Must stay in sync with |
47 // {@link org.chromium.chrome.browser.ShortcutHelper#REUSE_URL_MATCHING_TAB_
ELSE_NEW_TAB}. | 48 // {@link org.chromium.chrome.browser.ShortcutHelper#REUSE_URL_MATCHING_TAB_
ELSE_NEW_TAB}. |
48 private static final String REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB = | 49 private static final String REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB = |
49 "REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB"; | 50 "REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB"; |
50 | 51 |
51 /** | 52 /** |
52 * Key for passing app icon id. | 53 * Key for passing app icon id. |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 @Override | 270 @Override |
270 public void onConfirmQuit() { | 271 public void onConfirmQuit() { |
271 finish(); | 272 finish(); |
272 } | 273 } |
273 }; | 274 }; |
274 | 275 |
275 InstallHostBrowserDialog.show(this, listener, hostUrl, lastResortHostBro
wserPackageName, | 276 InstallHostBrowserDialog.show(this, listener, hostUrl, lastResortHostBro
wserPackageName, |
276 lastResortHostBrowserApplicationName, R.drawable.last_resort_run
time_host_logo); | 277 lastResortHostBrowserApplicationName, R.drawable.last_resort_run
time_host_logo); |
277 } | 278 } |
278 } | 279 } |
OLD | NEW |