WebIconDatabaseAdapter.java revision 54bae732019ac13327c0a68a6f8a82548d73ea9e
1/*
2 * Copyright (C) 2012 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 com.android.webview.chromium;
18
19import android.content.ContentResolver;
20import android.webkit.WebIconDatabase;
21import android.webkit.WebIconDatabase.IconListener;
22
23import org.chromium.android_webview.AwContents;
24
25/**
26 * Chromium implementation of WebIconDatabase -- big old no-op (base class is deprecated).
27 */
28final class WebIconDatabaseAdapter extends WebIconDatabase {
29    @Override
30    public void open(String path) {
31        AwContents.setShouldDownloadFavicons();
32    }
33
34    @Override
35    public void close() {
36        // Intentional no-op.
37    }
38
39    @Override
40    public void removeAllIcons() {
41        // Intentional no-op: we have no database so nothing to remove.
42    }
43
44    @Override
45    public void requestIconForPageUrl(String url, IconListener listener) {
46        // Intentional no-op.
47    }
48
49    @Override
50    public void bulkRequestIconForPageUrl(ContentResolver cr, String where,
51            IconListener listener) {
52        // Intentional no-op: hidden in base class.
53    }
54
55    @Override
56    public void retainIconForPageUrl(String url) {
57        // Intentional no-op.
58    }
59
60    @Override
61    public void releaseIconForPageUrl(String url) {
62        // Intentional no-op.
63    }
64}
65