Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/ForeignSessionHelper.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ForeignSessionHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/ForeignSessionHelper.java |
| index 33a6e5764f5f45c584d63de0ce268b437746f12d..c0852ea960685abcc62146eea9a98b2a821c52f4 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/ForeignSessionHelper.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/ForeignSessionHelper.java |
| @@ -5,6 +5,7 @@ |
| package org.chromium.chrome.browser; |
| import org.chromium.base.CalledByNative; |
| +import org.chromium.chrome.browser.TabBase; |
| import org.chromium.chrome.browser.profiles.Profile; |
| import java.util.ArrayList; |
| @@ -177,13 +178,28 @@ public class ForeignSessionHelper { |
| } |
| /** |
| + * TODO (apiccion): Remvoe this method once downstream CL Lands. |
| + * See: https://code.google.com/p/chromium/issues/detail?id=257102 |
| * Opens the given foreign tab in a new tab. |
| * @param session Session that the target tab belongs to. |
| * @param tab Target tab to open. |
| * @return {@code True} iff the tab is successfully opened. |
| */ |
| public boolean openForeignSessionTab(ForeignSession session, ForeignSessionTab tab) { |
| - return nativeOpenForeignSessionTab(mNativeForeignSessionHelper, session.tag, tab.id); |
| + return nativeOpenForeignSessionTabOld(mNativeForeignSessionHelper, session.tag, tab.id); |
| + } |
| + |
| + /** |
| + * Opens the given foreign tab in a new tab. |
| + * @param tab Tab to load the session into. |
| + * @param session Session that the target tab belongs to. |
| + * @param foreignTab Target tab to open. |
| + * @return {@code True} iff the tab is successfully opened. |
| + */ |
| + public boolean openForeignSessionTab(TabBase tab, ForeignSession session, |
| + ForeignSessionTab foreignTab) { |
|
newt (away)
2013/11/01 23:41:32
could you add windowDisposition here as another ar
apiccion
2013/11/02 01:01:14
Added windowDisposition. Cannot remove *Old() call
|
| + return nativeOpenForeignSessionTab(mNativeForeignSessionHelper, tab, session.tag, |
| + foreignTab.id); |
| } |
| /** |
| @@ -222,8 +238,12 @@ public class ForeignSessionHelper { |
| int nativeForeignSessionHelper, ForeignSessionCallback callback); |
| private static native boolean nativeGetForeignSessions(int nativeForeignSessionHelper, |
| List<ForeignSession> resultSessions); |
| - private static native boolean nativeOpenForeignSessionTab( |
| + // TODO (apiccion): Remvoe this method once downstream CL Lands. |
| + // See: https://code.google.com/p/chromium/issues/detail?id=257102 |
| + private static native boolean nativeOpenForeignSessionTabOld( |
| int nativeForeignSessionHelper, String sessionTag, int tabId); |
| + private static native boolean nativeOpenForeignSessionTab( |
| + int nativeForeignSessionHelper, TabBase tab, String sessionTag, int tabId); |
| private static native void nativeSetForeignSessionCollapsed( |
| int nativeForeignSessionHelper, String sessionTag, boolean isCollapsed); |
| private static native boolean nativeGetForeignSessionCollapsed( |