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

Side by Side Diff: chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/MainActivity.java

Issue 2956993002: Introduce a new WebAPK launch action. (Closed)
Patch Set: Created 3 years, 5 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.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
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}. TODO(hanxi): Replace s this string with
Yaron 2017/06/27 14:38:24 We shouldn't update the shell apk version just for
Xi Han 2017/06/27 15:05:49 Thanks, add the NOPRESUBMIT=true to the CL descrip
42 // {@link WebappLauncherActivity#ACTION_START_WEBAPP}. 42 // the new WebAPK launch action after it is propagated to all the Chrome's c hannels.
43 public static final String ACTION_START_WEBAPK = 43 public static final String ACTION_START_WEBAPK =
44 "com.google.android.apps.chrome.webapps.WebappManager.ACTION_START_W EBAPP"; 44 "com.google.android.apps.chrome.webapps.WebappManager.ACTION_START_W EBAPP";
45 45
46 // Must stay in sync with 46 // Must stay in sync with
47 // {@link org.chromium.chrome.browser.ShortcutHelper#REUSE_URL_MATCHING_TAB_ ELSE_NEW_TAB}. 47 // {@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 = 48 private static final String REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB =
49 "REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB"; 49 "REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB";
50 50
51 /** 51 /**
52 * Key for passing app icon id. 52 * Key for passing app icon id.
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 @Override 269 @Override
270 public void onConfirmQuit() { 270 public void onConfirmQuit() {
271 finish(); 271 finish();
272 } 272 }
273 }; 273 };
274 274
275 InstallHostBrowserDialog.show(this, listener, hostUrl, lastResortHostBro wserPackageName, 275 InstallHostBrowserDialog.show(this, listener, hostUrl, lastResortHostBro wserPackageName,
276 lastResortHostBrowserApplicationName, R.drawable.last_resort_run time_host_logo); 276 lastResortHostBrowserApplicationName, R.drawable.last_resort_run time_host_logo);
277 } 277 }
278 } 278 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698