| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.net; | 5 package org.chromium.net; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 import android.net.http.HttpResponseCache; | 8 import android.net.http.HttpResponseCache; |
| 9 import android.support.annotation.IntDef; | 9 import android.support.annotation.IntDef; |
| 10 import android.support.annotation.Nullable; | 10 import android.support.annotation.Nullable; |
| (...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 * @param httpMethod the HTTP method to use for the stream | 708 * @param httpMethod the HTTP method to use for the stream |
| 709 * @param requestHeaders the list of request headers | 709 * @param requestHeaders the list of request headers |
| 710 * @param priority priority of the stream which should be one of the | 710 * @param priority priority of the stream which should be one of the |
| 711 * {@link BidirectionalStream.Builder#STREAM_PRIORITY_IDLE STREAM_PR
IORITY_*} | 711 * {@link BidirectionalStream.Builder#STREAM_PRIORITY_IDLE STREAM_PR
IORITY_*} |
| 712 * values. | 712 * values. |
| 713 * @param disableAutoFlush whether auto flush should be disabled | 713 * @param disableAutoFlush whether auto flush should be disabled |
| 714 * @return a new stream. | 714 * @return a new stream. |
| 715 */ | 715 */ |
| 716 abstract BidirectionalStream createBidirectionalStream(String url, | 716 abstract BidirectionalStream createBidirectionalStream(String url, |
| 717 BidirectionalStream.Callback callback, Executor executor, String htt
pMethod, | 717 BidirectionalStream.Callback callback, Executor executor, String htt
pMethod, |
| 718 List<Map.Entry<String, String>> requestHeaders, | 718 List<Map.Entry<String, String>> requestHeaders, int priority, boolea
n disableAutoFlush); |
| 719 @BidirectionalStream.Builder.StreamPriority int priority, boolean di
sableAutoFlush); | |
| 720 | 719 |
| 721 /** | 720 /** |
| 722 * @return {@code true} if the engine is enabled. | 721 * @return {@code true} if the engine is enabled. |
| 723 */ | 722 */ |
| 724 abstract boolean isEnabled(); | 723 abstract boolean isEnabled(); |
| 725 | 724 |
| 726 /** | 725 /** |
| 727 * @return a human-readable version string of the engine. | 726 * @return a human-readable version string of the engine. |
| 728 */ | 727 */ |
| 729 public abstract String getVersionString(); | 728 public abstract String getVersionString(); |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1104 * @hide as it's a prototype. | 1103 * @hide as it's a prototype. |
| 1105 */ | 1104 */ |
| 1106 public interface RequestFinishedListener { // TODO(klm): Add a convenience a
bstract class. | 1105 public interface RequestFinishedListener { // TODO(klm): Add a convenience a
bstract class. |
| 1107 /** | 1106 /** |
| 1108 * Invoked with request info. | 1107 * Invoked with request info. |
| 1109 * @param requestInfo {@link UrlRequestInfo} for finished request. | 1108 * @param requestInfo {@link UrlRequestInfo} for finished request. |
| 1110 */ | 1109 */ |
| 1111 void onRequestFinished(UrlRequestInfo requestInfo); | 1110 void onRequestFinished(UrlRequestInfo requestInfo); |
| 1112 } | 1111 } |
| 1113 } | 1112 } |
| OLD | NEW |