| Index: chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java
|
| index e0d73c9dd67f3675cea83a2f3e003809accf236f..d6e0e5303c3acda8786a8f74108e0cfa45a44167 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java
|
| @@ -32,6 +32,7 @@ import org.chromium.chrome.browser.omnibox.AutocompleteController;
|
| import org.chromium.chrome.browser.rappor.RapporServiceBridge;
|
| import org.chromium.chrome.browser.search_engines.TemplateUrlService;
|
| import org.chromium.chrome.browser.tab.Tab;
|
| +import org.chromium.chrome.browser.tabmodel.TabModel.TabLaunchType;
|
| import org.chromium.chrome.browser.tabmodel.document.ActivityDelegate;
|
| import org.chromium.chrome.browser.util.IntentUtils;
|
| import org.chromium.content_public.browser.LoadUrlParams;
|
| @@ -149,6 +150,12 @@ public class IntentHandler {
|
| public static final String EXTRA_EXTERNAL_NAV_PACKAGES = "org.chromium.chrome.browser.eenp";
|
|
|
| /**
|
| + * Extra to indicate the launch type of the tab to be created.
|
| + */
|
| + private static final String EXTRA_TAB_LAUNCH_TYPE =
|
| + "org.chromium.chrome.browser.tab_launch_type";
|
| +
|
| + /**
|
| * A hash code for the URL to verify intent data hasn't been modified.
|
| */
|
| public static final String EXTRA_DATA_HASH_CODE = "org.chromium.chrome.browser.data_hash";
|
| @@ -1009,4 +1016,20 @@ public class IntentHandler {
|
| }
|
| return defaultTransition;
|
| }
|
| +
|
| + /**
|
| + * Sets the launch type in a tab creation intent.
|
| + * @param intent The Intent to be set.
|
| + */
|
| + public static void setTabLaunchType(Intent intent, TabLaunchType type) {
|
| + intent.putExtra(EXTRA_TAB_LAUNCH_TYPE, type);
|
| + }
|
| +
|
| + /**
|
| + * @param intent An Intent to be checked.
|
| + * @return The launch type of the tab to be created.
|
| + */
|
| + public static TabLaunchType getTabLaunchType(Intent intent) {
|
| + return IntentUtils.safeGetSerializableExtra(intent, EXTRA_TAB_LAUNCH_TYPE);
|
| + }
|
| }
|
|
|