| Index: chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java
|
| index d7b965f15a67362bf68168ba96d8aa7209dbbca4..9ec69c6e37ad3ede66b2656ff71beca51f1b211c 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java
|
| @@ -5,10 +5,10 @@
|
| package org.chromium.chrome.browser.webapps;
|
|
|
| import android.content.Intent;
|
| +import android.os.Bundle;
|
|
|
| import org.chromium.base.ContextUtils;
|
| import org.chromium.base.library_loader.LibraryProcessType;
|
| -import org.chromium.chrome.browser.ShortcutHelper;
|
| import org.chromium.chrome.browser.externalnav.ExternalNavigationParams;
|
| import org.chromium.chrome.browser.metrics.WebApkUma;
|
| import org.chromium.chrome.browser.tab.BrowserControlsVisibilityDelegate;
|
| @@ -18,8 +18,6 @@ import org.chromium.chrome.browser.tab.TabDelegateFactory;
|
| import org.chromium.chrome.browser.tab.TabRedirectHandler;
|
| import org.chromium.components.navigation_interception.NavigationParams;
|
| import org.chromium.content.browser.ChildProcessCreationParams;
|
| -import org.chromium.content_public.browser.LoadUrlParams;
|
| -import org.chromium.ui.base.PageTransition;
|
| import org.chromium.webapk.lib.client.WebApkServiceConnectionManager;
|
|
|
| /**
|
| @@ -37,29 +35,14 @@ public class WebApkActivity extends WebappActivity {
|
| ChildProcessCreationParams.getDefault();
|
|
|
| @Override
|
| - protected void onNewIntent(Intent intent) {
|
| - super.onNewIntent(intent);
|
| - // We could bring a WebAPK hosted WebappActivity to foreground and navigate it to a
|
| - // different URL. For example, WebAPK "foo" is launched and navigates to
|
| - // "www.foo.com/foo". In Chrome, user clicks a link "www.foo.com/bar" in Google search
|
| - // results. After clicking the link, WebAPK "foo" is brought to foreground, and
|
| - // loads the page of "www.foo.com/bar" at the same time.
|
| - // The extra {@link ShortcutHelper.EXTRA_URL} provides the URL that the WebAPK will
|
| - // navigate to.
|
| - String overrideUrl = intent.getStringExtra(ShortcutHelper.EXTRA_URL);
|
| - if (overrideUrl != null && isInitialized()
|
| - && !overrideUrl.equals(getActivityTab().getUrl())) {
|
| - getActivityTab().loadUrl(
|
| - new LoadUrlParams(overrideUrl, PageTransition.AUTO_TOPLEVEL));
|
| - }
|
| - if (isInitialized()) {
|
| - getActivityTab().setWebappManifestScope(mWebappInfo.scopeUri().toString());
|
| - }
|
| + protected WebappInfo createWebappInfo(Intent intent) {
|
| + return (intent == null) ? WebApkInfo.createEmpty() : WebApkInfo.create(intent);
|
| }
|
|
|
| @Override
|
| - protected WebappInfo createWebappInfo(Intent intent) {
|
| - return (intent == null) ? WebApkInfo.createEmpty() : WebApkInfo.create(intent);
|
| + protected void initializeUI(Bundle savedInstance) {
|
| + super.initializeUI(savedInstance);
|
| + getActivityTab().setWebappManifestScope(mWebappInfo.scopeUri().toString());
|
| }
|
|
|
| @Override
|
| @@ -101,7 +84,6 @@ public class WebApkActivity extends WebappActivity {
|
| public void finishNativeInitialization() {
|
| super.finishNativeInitialization();
|
| if (!isInitialized()) return;
|
| - getActivityTab().setWebappManifestScope(mWebappInfo.scopeUri().toString());
|
| mCanLaunchRendererInWebApkProcess = ChromeWebApkHost.canLaunchRendererInWebApkProcess();
|
| }
|
|
|
|
|