blob: f23aae6be8c29b1b1798efdbcc277957ace8ef7a [file] [log] [blame]
Jonathan Dixon74fc73f2013-10-18 16:51:53 -07001/*
2 * Copyright (C) 2008 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.webkit;
18
Nate Fischer3442c742017-09-08 17:02:00 -070019import android.annotation.Nullable;
Mathew Inwood42afea22018-08-16 19:18:28 +010020import android.annotation.UnsupportedAppUsage;
Jonathan Dixon74fc73f2013-10-18 16:51:53 -070021import android.webkit.CacheManager.CacheResult;
22import android.webkit.PluginData;
Nate Fischer0a6140d2017-09-05 12:37:49 -070023
Jonathan Dixon74fc73f2013-10-18 16:51:53 -070024import java.util.Map;
25
26/**
27 * @hide
28 * @deprecated This interface was inteded to be used by Gears. Since Gears was
29 * deprecated, so is this class.
30 */
31@Deprecated
32public interface UrlInterceptHandler {
33
34 /**
35 * Given an URL, returns the CacheResult which contains the
Nate Fischer0a6140d2017-09-05 12:37:49 -070036 * surrogate response for the request, or {@code null} if the handler is
Jonathan Dixon74fc73f2013-10-18 16:51:53 -070037 * not interested.
38 *
39 * @param url URL string.
Nate Fischer3442c742017-09-08 17:02:00 -070040 * @param headers The headers associated with the request.
Jonathan Dixon74fc73f2013-10-18 16:51:53 -070041 * @return The CacheResult containing the surrogate response.
42 *
43 * @hide
44 * @deprecated Do not use, this interface is deprecated.
45 */
46 @Deprecated
Nate Fischer3442c742017-09-08 17:02:00 -070047 @Nullable
Mathew Inwood42afea22018-08-16 19:18:28 +010048 @UnsupportedAppUsage
Nate Fischer3442c742017-09-08 17:02:00 -070049 CacheResult service(String url, @Nullable Map<String, String> headers);
Jonathan Dixon74fc73f2013-10-18 16:51:53 -070050
51 /**
52 * Given an URL, returns the PluginData which contains the
Nate Fischer0a6140d2017-09-05 12:37:49 -070053 * surrogate response for the request, or {@code null} if the handler is
Jonathan Dixon74fc73f2013-10-18 16:51:53 -070054 * not interested.
55 *
56 * @param url URL string.
Nate Fischer3442c742017-09-08 17:02:00 -070057 * @param headers The headers associated with the request.
Jonathan Dixon74fc73f2013-10-18 16:51:53 -070058 * @return The PluginData containing the surrogate response.
59 *
60 * @hide
61 * @deprecated Do not use, this interface is deprecated.
62 */
63 @Deprecated
Nate Fischer3442c742017-09-08 17:02:00 -070064 @Nullable
Mathew Inwood42afea22018-08-16 19:18:28 +010065 @UnsupportedAppUsage
Nate Fischer3442c742017-09-08 17:02:00 -070066 PluginData getPluginData(String url, @Nullable Map<String, String> headers);
Jonathan Dixon74fc73f2013-10-18 16:51:53 -070067}