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 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 * and causing exceptions during shutdown. | 703 * and causing exceptions during shutdown. |
704 * | 704 * |
705 * @param url the URL for the stream | 705 * @param url the URL for the stream |
706 * @param callback the object whose methods get invoked upon different event
s | 706 * @param callback the object whose methods get invoked upon different event
s |
707 * @param executor the {@link Executor} on which all callbacks will be calle
d | 707 * @param executor the {@link Executor} on which all callbacks will be calle
d |
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 * @return a new stream. | 714 * @return a new stream. |
714 */ | 715 */ |
715 abstract BidirectionalStream createBidirectionalStream(String url, | 716 abstract BidirectionalStream createBidirectionalStream(String url, |
716 BidirectionalStream.Callback callback, Executor executor, String htt
pMethod, | 717 BidirectionalStream.Callback callback, Executor executor, String htt
pMethod, |
717 List<Map.Entry<String, String>> requestHeaders, | 718 List<Map.Entry<String, String>> requestHeaders, |
718 @BidirectionalStream.Builder.StreamPriority int priority); | 719 @BidirectionalStream.Builder.StreamPriority int priority, boolean di
sableAutoFlush); |
719 | 720 |
720 /** | 721 /** |
721 * @return {@code true} if the engine is enabled. | 722 * @return {@code true} if the engine is enabled. |
722 */ | 723 */ |
723 abstract boolean isEnabled(); | 724 abstract boolean isEnabled(); |
724 | 725 |
725 /** | 726 /** |
726 * @return a human-readable version string of the engine. | 727 * @return a human-readable version string of the engine. |
727 */ | 728 */ |
728 public abstract String getVersionString(); | 729 public abstract String getVersionString(); |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1103 * @hide as it's a prototype. | 1104 * @hide as it's a prototype. |
1104 */ | 1105 */ |
1105 public interface RequestFinishedListener { // TODO(klm): Add a convenience a
bstract class. | 1106 public interface RequestFinishedListener { // TODO(klm): Add a convenience a
bstract class. |
1106 /** | 1107 /** |
1107 * Invoked with request info. | 1108 * Invoked with request info. |
1108 * @param requestInfo {@link UrlRequestInfo} for finished request. | 1109 * @param requestInfo {@link UrlRequestInfo} for finished request. |
1109 */ | 1110 */ |
1110 void onRequestFinished(UrlRequestInfo requestInfo); | 1111 void onRequestFinished(UrlRequestInfo requestInfo); |
1111 } | 1112 } |
1112 } | 1113 } |
OLD | NEW |