Commit 9b74bfb6 authored by Sky Malice's avatar Sky Malice Committed by Commit Bot

[Feed] Provide FeedSchedulerBridge to Feed.

Bug: 831642
Change-Id: Idd4b8aeb1470482ac2bbd8fdab8ae066ead4d300
Reviewed-on: https://chromium-review.googlesource.com/1087592Reviewed-by: default avatarFilip Gorski <fgorski@chromium.org>
Commit-Queue: Sky Malice <skym@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565692}
parent a717720f
......@@ -10,18 +10,15 @@ import android.graphics.drawable.Drawable;
import android.view.View;
import android.widget.FrameLayout;
import com.google.android.libraries.feed.api.common.ThreadUtils;
import com.google.android.libraries.feed.api.scope.FeedProcessScope;
import com.google.android.libraries.feed.api.scope.FeedStreamScope;
import com.google.android.libraries.feed.api.stream.Stream;
import com.google.android.libraries.feed.common.time.SystemClockImpl;
import com.google.android.libraries.feed.host.config.Configuration;
import com.google.android.libraries.feed.host.config.Configuration.ConfigKey;
import com.google.android.libraries.feed.host.config.DebugBehavior;
import com.google.android.libraries.feed.host.stream.CardConfiguration;
import com.google.android.libraries.feed.host.stream.StreamConfiguration;
import com.google.android.libraries.feed.hostimpl.logging.LoggingApiImpl;
import com.google.android.libraries.feed.hostimpl.scheduler.TimeoutScheduler;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.chrome.R;
......@@ -131,9 +128,7 @@ public class FeedNewTabPage extends BasicNativePage {
new FeedProcessScope
.Builder(configHostApi, Executors.newSingleThreadExecutor(),
new LoggingApiImpl(), new FeedNetworkBridge(profile),
new TimeoutScheduler(new ThreadUtils(), new SystemClockImpl(),
configHostApi),
DebugBehavior.SILENT)
new FeedSchedulerBridge(profile), DebugBehavior.SILENT)
.build();
}
......
......@@ -104,9 +104,8 @@ public class FeedSchedulerBridge implements SchedulerApi {
private native long nativeInit(Profile profile);
private native void nativeDestroy(long nativeFeedSchedulerBridge);
private native @NativeRequestBehavior int nativeShouldSessionRequestData(
long nativeFeedSchedulerBridge, boolean hasContent, long contentCreationDateTimeMs,
boolean hasOutstandingRequest);
private native int nativeShouldSessionRequestData(long nativeFeedSchedulerBridge,
boolean hasContent, long contentCreationDateTimeMs, boolean hasOutstandingRequest);
private native void nativeOnReceiveNewContent(long nativeFeedSchedulerBridge);
private native void nativeOnRequestError(
long nativeFeedSchedulerBridge, int networkResponseCode);
......
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