Index: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java |
index 14bb1b66e4945542f79a51509180ea252c8b62ad..15cca7134371c6d6e1a8618abe266c4111163047 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java |
@@ -45,6 +45,7 @@ import org.chromium.chrome.browser.ChromeActivity; |
import org.chromium.chrome.browser.IntentHandler; |
import org.chromium.chrome.browser.IntentHandler.ExternalAppId; |
import org.chromium.chrome.browser.KeyboardShortcuts; |
+import org.chromium.chrome.browser.ServiceTabLauncher; |
import org.chromium.chrome.browser.UrlConstants; |
import org.chromium.chrome.browser.WarmupManager; |
import org.chromium.chrome.browser.WebContentsFactory; |
@@ -747,6 +748,13 @@ public class CustomTabActivity extends ChromeActivity { |
params.setTransitionType(IntentHandler.getTransitionTypeFromIntent(intent, |
PageTransition.LINK | PageTransition.FROM_API)); |
tab.loadUrl(params); |
+ |
+ // Notify ServiceTabLauncher if this is an asynchronous tab launch. |
+ if (intent != null && intent.hasExtra(ServiceTabLauncher.LAUNCH_REQUEST_ID_EXTRA)) { |
+ ServiceTabLauncher.onWebContentsForRequestAvailable( |
+ intent.getIntExtra(ServiceTabLauncher.LAUNCH_REQUEST_ID_EXTRA, 0), |
+ tab.getWebContents()); |
+ } |
} |
@Override |