Commit e3cbead3 authored by Jeffrey Cohen's avatar Jeffrey Cohen Committed by Commit Bot

[Screenshots] Add tab to image editor interface for sharing.

This enables the the image_editor to construct a ShareParam.

Bug: 1093365
Change-Id: If1e06d0fea433628540db5d52c73c237f61a4526
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2285357Reviewed-by: default avatarTravis Skare <skare@google.com>
Reviewed-by: default avatarKristi Park <kristipark@chromium.org>
Commit-Queue: Jeffrey Cohen <jeffreycohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786092}
parent a0846419
...@@ -7,11 +7,13 @@ package org.chromium.chrome.browser.image_editor; ...@@ -7,11 +7,13 @@ package org.chromium.chrome.browser.image_editor;
import android.app.Activity; import android.app.Activity;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import org.chromium.chrome.browser.tab.Tab;
/** /**
* Upstream implementation for ImageEditorDialogCoordinator. Does nothing. Actual implementation * Upstream implementation for ImageEditorDialogCoordinator. Does nothing. Actual implementation
* lives downstream. * lives downstream.
*/ */
public class ImageEditorDialogCoordinatorImpl implements ImageEditorDialogCoordinator { public class ImageEditorDialogCoordinatorImpl implements ImageEditorDialogCoordinator {
@Override @Override
public void launchEditor(Activity activity, Bitmap image) {} public void launchEditor(Activity activity, Bitmap image, Tab mTab) {}
} }
...@@ -7,5 +7,8 @@ import("//build/config/android/rules.gni") ...@@ -7,5 +7,8 @@ import("//build/config/android/rules.gni")
android_library("java") { android_library("java") {
sources = [ "android/java/src/org/chromium/chrome/browser/image_editor/ImageEditorDialogCoordinator.java" ] sources = [ "android/java/src/org/chromium/chrome/browser/image_editor/ImageEditorDialogCoordinator.java" ]
deps = [ "//third_party/android_deps:android_support_v7_appcompat_java" ] deps = [
"//chrome/browser/tab:java",
"//third_party/android_deps:android_support_v7_appcompat_java",
]
} }
...@@ -7,9 +7,11 @@ package org.chromium.chrome.browser.image_editor; ...@@ -7,9 +7,11 @@ package org.chromium.chrome.browser.image_editor;
import android.app.Activity; import android.app.Activity;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import org.chromium.chrome.browser.tab.Tab;
/** /**
* Interface to interact with the image editor dialog. * Interface to interact with the image editor dialog.
*/ */
public interface ImageEditorDialogCoordinator { public interface ImageEditorDialogCoordinator {
public void launchEditor(Activity activity, Bitmap image); public void launchEditor(Activity activity, Bitmap image, Tab mTab);
} }
...@@ -74,7 +74,7 @@ public class ScreenshotCoordinator { ...@@ -74,7 +74,7 @@ public class ScreenshotCoordinator {
private void launchEditor() { private void launchEditor() {
ImageEditorDialogCoordinator editor = ImageEditorModuleProvider.getImageEditorProvider() ImageEditorDialogCoordinator editor = ImageEditorModuleProvider.getImageEditorProvider()
.getImageEditorDialogCoordinator(); .getImageEditorDialogCoordinator();
editor.launchEditor(mActivity, mScreenshot); editor.launchEditor(mActivity, mScreenshot, mTab);
mScreenshot = null; mScreenshot = null;
} }
......
...@@ -30,7 +30,7 @@ class ScreenshotShareSheetMediator { ...@@ -30,7 +30,7 @@ class ScreenshotShareSheetMediator {
private final Runnable mInstallRunnable; private final Runnable mInstallRunnable;
private final ChromeOptionShareCallback mChromeOptionShareCallback; private final ChromeOptionShareCallback mChromeOptionShareCallback;
private Tab mTab; private final Tab mTab;
/** /**
* The ScreenshotShareSheetMediator constructor. * The ScreenshotShareSheetMediator constructor.
......
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