| 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.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
| 8 import android.content.Context; | 8 import android.content.Context; |
| 9 import android.net.http.HttpResponseCache; | 9 import android.net.http.HttpResponseCache; |
| 10 import android.support.annotation.IntDef; | 10 import android.support.annotation.IntDef; |
| (...skipping 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1147 public abstract void addRequestFinishedListener(RequestFinishedInfo.Listener
listener); | 1147 public abstract void addRequestFinishedListener(RequestFinishedInfo.Listener
listener); |
| 1148 | 1148 |
| 1149 /** | 1149 /** |
| 1150 * Removes a finished request listener. | 1150 * Removes a finished request listener. |
| 1151 * | 1151 * |
| 1152 * @param listener the listener to remove. | 1152 * @param listener the listener to remove. |
| 1153 * | 1153 * |
| 1154 * @hide it's a prototype. | 1154 * @hide it's a prototype. |
| 1155 */ | 1155 */ |
| 1156 public abstract void removeRequestFinishedListener(RequestFinishedInfo.Liste
ner listener); | 1156 public abstract void removeRequestFinishedListener(RequestFinishedInfo.Liste
ner listener); |
| 1157 |
| 1158 /** |
| 1159 * Creates a builder for {@link UrlRequest}. All callbacks formatted |
| 1160 * generated {@link UrlRequest} objects will be invoked on |
| 1161 * {@code executor}'s threads. {@code executor} must not run tasks on the |
| 1162 * thread calling {@link Executor#execute} to prevent blocking networking |
| 1163 * operations and causing exceptions during shutdown. |
| 1164 * |
| 1165 * @param url URL for the generated requests. |
| 1166 * @param callback callback object that gets invoked on different events. |
| 1167 * @param executor {@link Executor} on which all callbacks will be invoked. |
| 1168 */ |
| 1169 public UrlRequest.Builder newUrlRequestBuilder( |
| 1170 String url, UrlRequest.Callback callback, Executor executor) { |
| 1171 return new UrlRequest.Builder(url, callback, executor, this); |
| 1172 } |
| 1157 } | 1173 } |
| OLD | NEW |