Commit 87c326f3 authored by John Abd-El-Malek's avatar John Abd-El-Malek Committed by Chromium LUCI CQ

Update WebLayer Tab.download now that it's merged to 88.

Bug: 1153694
Change-Id: I7fa491aeff00e22757e0aeeb0464cea114deece2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2594277Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#837359}
parent 40b97d22
......@@ -153,7 +153,7 @@ public class TabCallbackTest {
file.delete();
}
@MinWebLayerVersion(89)
@MinWebLayerVersion(88)
@Test
@SmallTest
public void testDownloadFromContextMenu() throws TimeoutException {
......@@ -169,7 +169,7 @@ public class TabCallbackTest {
waitForFileExist(tempDownloadDirectory, "lorem_ipsum.txt");
}
@MinWebLayerVersion(89)
@MinWebLayerVersion(88)
@Test
@SmallTest
public void testDownloadFromContextMenuImg() throws TimeoutException {
......
......@@ -1106,7 +1106,7 @@ public final class TabImpl extends ITab.Stub {
private void showContextMenu(ContextMenuParams params, long nativeContextMenuParams)
throws RemoteException {
if (WebLayerFactoryImpl.getClientMajorVersion() < 82) return;
if (WebLayerFactoryImpl.getClientMajorVersion() < 89) {
if (WebLayerFactoryImpl.getClientMajorVersion() < 88) {
mClient.showContextMenu(ObjectWrapper.wrap(params.getPageUrl().getSpec()),
ObjectWrapper.wrap(nonEmptyOrNull(params.getLinkUrl())),
ObjectWrapper.wrap(nonEmptyOrNull(params.getLinkText())),
......
......@@ -82,7 +82,5 @@ interface ITab {
boolean willAutomaticallyReloadAfterCrash() = 28;
void setDesktopUserAgentEnabled(in boolean enable) = 29;
boolean isDesktopUserAgentEnabled() = 30;
// Added in 89
void download(in IContextMenuParams contextMenuParams) = 31;
}
......@@ -22,7 +22,7 @@ interface ITabClient {
// void onCloseTab() = 3;
// Added in M82.
// Deprecated in M89.
// Deprecated in M88.
void showContextMenu(in IObjectWrapper pageUrl, in IObjectWrapper linkUrl,
in IObjectWrapper linkText, in IObjectWrapper titleOrAltText,
in IObjectWrapper srcUrl) = 4;
......@@ -52,8 +52,6 @@ interface ITabClient {
// Added in M88
void onActionItemClicked(
in int actionModeItemType, in IObjectWrapper selectedString) = 12;
// Added in M89.
void showContextMenu2(in IObjectWrapper pageUrl, in IObjectWrapper linkUrl,
in IObjectWrapper linkText, in IObjectWrapper titleOrAltText,
in IObjectWrapper srcUrl, in boolean isImage, in boolean isVideo, in boolean canDownload,
......
......@@ -50,14 +50,14 @@ public class ContextMenuParams {
/**
* Whether srcUri points to an image.
*
* @since 89
* @since 88
*/
public final boolean isImage;
/**
* Whether srcUri points to a video.
*
* @since 89
* @since 88
*/
public final boolean isVideo;
......@@ -65,7 +65,7 @@ public class ContextMenuParams {
* Whether this link or image/video can be downloaded. Only if this is true can
* {@link Tab.download} be called.
*
* @since 89
* @since 88
*/
public final boolean canDownload;
......
......@@ -833,10 +833,10 @@ public class Tab {
* @throws IllegalArgumentException if {@link ContextMenuParams.canDownload} is false or if
* the ContextMenuParams object parameter wasn't constructed by WebLayer.
*
* @since 89
* @since 88
*/
public void download(ContextMenuParams contextMenuParams) {
if (WebLayer.getSupportedMajorVersionInternal() < 89) {
if (WebLayer.getSupportedMajorVersionInternal() < 88) {
throw new UnsupportedOperationException();
}
if (!contextMenuParams.canDownload) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment