WebIconDatabaseAdapter.java revision 4e6a034f041cbb629386a6f4dd45f1cdbd6e1abf
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 23/** 24 * Chromium implementation of WebIconDatabase -- big old no-op (base class is deprecated). 25 */ 26final class WebIconDatabaseAdapter extends WebIconDatabase { 27 @Override 28 public void open(String path) { 29 // Intentional no-op: historically main effect of calling this method was to enable 30 // favicon download, but chromium webview always downloads favicons. 31 } 32 33 @Override 34 public void close() { 35 // Intentional no-op. 36 } 37 38 @Override 39 public void removeAllIcons() { 40 // Intentional no-op: we have no database so nothing to remove. 41 } 42 43 @Override 44 public void requestIconForPageUrl(String url, IconListener listener) { 45 // Intentional no-op. 46 } 47 48 @Override 49 public void bulkRequestIconForPageUrl(ContentResolver cr, String where, 50 IconListener listener) { 51 // Intentional no-op: hidden in base class. 52 } 53 54 @Override 55 public void retainIconForPageUrl(String url) { 56 // Intentional no-op. 57 } 58 59 @Override 60 public void releaseIconForPageUrl(String url) { 61 // Intentional no-op. 62 } 63} 64