Chromium Code Reviews| 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 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 * @param disableAutoFlush whether auto flush should be disabled |
| 714 * @param delayHeadersUntilNextFlush whether to delay sending request | |
| 715 * headers until next flush(), and try to combine them with the next | |
|
mef
2016/06/01 21:33:20
I wonder whether it should be 'delayHeadersUntilFi
xunjieli
2016/06/01 22:27:16
Done.
| |
| 716 * data frame. | |
| 714 * @return a new stream. | 717 * @return a new stream. |
| 715 */ | 718 */ |
| 716 abstract BidirectionalStream createBidirectionalStream(String url, | 719 abstract BidirectionalStream createBidirectionalStream(String url, |
| 717 BidirectionalStream.Callback callback, Executor executor, String htt pMethod, | 720 BidirectionalStream.Callback callback, Executor executor, String htt pMethod, |
| 718 List<Map.Entry<String, String>> requestHeaders, | 721 List<Map.Entry<String, String>> requestHeaders, |
| 719 @BidirectionalStream.Builder.StreamPriority int priority, boolean di sableAutoFlush); | 722 @BidirectionalStream.Builder.StreamPriority int priority, boolean di sableAutoFlush, |
| 723 boolean delayHeadersUntilNextFlush); | |
| 720 | 724 |
| 721 /** | 725 /** |
| 722 * @return {@code true} if the engine is enabled. | 726 * @return {@code true} if the engine is enabled. |
| 723 */ | 727 */ |
| 724 abstract boolean isEnabled(); | 728 abstract boolean isEnabled(); |
| 725 | 729 |
| 726 /** | 730 /** |
| 727 * @return a human-readable version string of the engine. | 731 * @return a human-readable version string of the engine. |
| 728 */ | 732 */ |
| 729 public abstract String getVersionString(); | 733 public abstract String getVersionString(); |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1104 * @hide as it's a prototype. | 1108 * @hide as it's a prototype. |
| 1105 */ | 1109 */ |
| 1106 public interface RequestFinishedListener { // TODO(klm): Add a convenience a bstract class. | 1110 public interface RequestFinishedListener { // TODO(klm): Add a convenience a bstract class. |
| 1107 /** | 1111 /** |
| 1108 * Invoked with request info. | 1112 * Invoked with request info. |
| 1109 * @param requestInfo {@link UrlRequestInfo} for finished request. | 1113 * @param requestInfo {@link UrlRequestInfo} for finished request. |
| 1110 */ | 1114 */ |
| 1111 void onRequestFinished(UrlRequestInfo requestInfo); | 1115 void onRequestFinished(UrlRequestInfo requestInfo); |
| 1112 } | 1116 } |
| 1113 } | 1117 } |
| OLD | NEW |