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..cfabcb80c434dad63ac5227786b9c9318c89ac30 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,29 @@ public class ForeignSessionHelper { |
| } |
| /** |
| + * TODO(apiccion): Remvoe this method once downstream CL Lands. |
| + * See: http://crbug.com/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. |
| + * @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. |
| + * @param windowDisposition The WindowOpenDisposition flag. |
| + * @return {@code True} iff the tab is successfully opened. |
| + */ |
| + public boolean openForeignSessionTab(TabBase tab, ForeignSession session, |
| + ForeignSessionTab foreignTab, int windowOpenDisposition) { |
| + return nativeOpenForeignSessionTab(mNativeForeignSessionHelper, tab, session.tag, |
| + foreignTab.id, windowOpenDisposition); |
|
Ted C
2013/11/04 19:46:28
+4 indent
apiccion
2013/11/04 19:52:30
Done.
|
| } |
| /** |
| @@ -222,8 +239,13 @@ 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: http://crbug.com/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, |
| + int disposition); |
| private static native void nativeSetForeignSessionCollapsed( |
| int nativeForeignSessionHelper, String sessionTag, boolean isCollapsed); |
| private static native boolean nativeGetForeignSessionCollapsed( |