Commit 5a8a036c authored by Vincent Boisselle's avatar Vincent Boisselle Committed by Commit Bot

Pass down action source view when processing there and back again data

Bug: 1131172
Change-Id: I2dcca0a7dcecabdd3b8a527e6af4de3f1481dae6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2443691
Commit-Queue: Vincent Boisselle <vincb@google.com>
Reviewed-by: default avatarDan H <harringtond@chromium.org>
Reviewed-by: default avatarCathy Li <chili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#813065}
parent 0261c677
...@@ -770,6 +770,11 @@ public class FeedStreamSurface implements SurfaceActionsHandler, FeedActionsHand ...@@ -770,6 +770,11 @@ public class FeedStreamSurface implements SurfaceActionsHandler, FeedActionsHand
@Override @Override
public void processThereAndBackAgainData(byte[] data) { public void processThereAndBackAgainData(byte[] data) {
processThereAndBackAgainData(data, null);
}
@Override
public void processThereAndBackAgainData(byte[] data, @Nullable View actionSourceView) {
assert ThreadUtils.runningOnUiThread(); assert ThreadUtils.runningOnUiThread();
FeedStreamSurfaceJni.get().processThereAndBackAgain( FeedStreamSurfaceJni.get().processThereAndBackAgain(
mNativeFeedStreamSurface, FeedStreamSurface.this, data); mNativeFeedStreamSurface, FeedStreamSurface.this, data);
......
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
package org.chromium.chrome.browser.xsurface; package org.chromium.chrome.browser.xsurface;
import android.view.View;
import androidx.annotation.Nullable;
import java.util.Map; import java.util.Map;
/** /**
...@@ -23,6 +27,13 @@ public interface FeedActionsHandler { ...@@ -23,6 +27,13 @@ public interface FeedActionsHandler {
*/ */
default void processThereAndBackAgainData(byte[] data) {} default void processThereAndBackAgainData(byte[] data) {}
/**
* Sends data back to the server when content is clicked and provides the corresponding view
* through |actionSourceView| which can be null.
*/
@Deprecated
default void processThereAndBackAgainData(byte[] data, @Nullable View actionSourceView) {}
/** /**
* Stores a view FeedAction for eventual upload. 'data' is a serialized FeedAction protobuf * Stores a view FeedAction for eventual upload. 'data' is a serialized FeedAction protobuf
* message. * message.
......
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