Home | History | Annotate | Download | only in webkit
      1 /*
      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 
     17 package android.webkit;
     18 
     19 import android.annotation.Nullable;
     20 import android.annotation.UnsupportedAppUsage;
     21 import android.webkit.CacheManager.CacheResult;
     22 import android.webkit.PluginData;
     23 
     24 import 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
     32 public interface UrlInterceptHandler {
     33 
     34     /**
     35      * Given an URL, returns the CacheResult which contains the
     36      * surrogate response for the request, or {@code null} if the handler is
     37      * not interested.
     38      *
     39      * @param url URL string.
     40      * @param headers The headers associated with the request.
     41      * @return The CacheResult containing the surrogate response.
     42      *
     43      * @hide
     44      * @deprecated Do not use, this interface is deprecated.
     45      */
     46     @Deprecated
     47     @Nullable
     48     @UnsupportedAppUsage
     49     CacheResult service(String url, @Nullable Map<String, String> headers);
     50 
     51     /**
     52      * Given an URL, returns the PluginData which contains the
     53      * surrogate response for the request, or {@code null} if the handler is
     54      * not interested.
     55      *
     56      * @param url URL string.
     57      * @param headers The headers associated with the request.
     58      * @return The PluginData containing the surrogate response.
     59      *
     60      * @hide
     61      * @deprecated Do not use, this interface is deprecated.
     62      */
     63     @Deprecated
     64     @Nullable
     65     @UnsupportedAppUsage
     66     PluginData getPluginData(String url, @Nullable Map<String, String> headers);
     67 }
     68