• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright (C) 2007-2009 Torch Mobile Inc.
3  *
4  *  This library is free software; you can redistribute it and/or
5  *  modify it under the terms of the GNU Library General Public
6  *  License as published by the Free Software Foundation; either
7  *  version 2 of the License, or (at your option) any later version.
8  *
9  *  This library is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  *  Library General Public License for more details.
13  *
14  *  You should have received a copy of the GNU Library General Public License
15  *  along with this library; see the file COPYING.LIB.  If not, write to
16  *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  *  Boston, MA 02110-1301, USA.
18  *
19  */
20 
21 #include "config.h"
22 #include "IconDatabase.h"
23 
24 #include "AutodrainedPool.h"
25 #include "DocumentLoader.h"
26 #include "FileSystem.h"
27 #include "IconDatabaseClient.h"
28 #include "IconRecord.h"
29 #include "Image.h"
30 #include <wtf/text/CString.h>
31 
32 namespace WebCore {
33 
34 static IconDatabase* sharedIconDatabase = 0;
35 
36 // Function to obtain the global icon database.
iconDatabase()37 IconDatabase& iconDatabase()
38 {
39     if (!sharedIconDatabase)
40         sharedIconDatabase = new IconDatabase;
41     return *sharedIconDatabase;
42 }
43 
IconDatabase()44 IconDatabase::IconDatabase() {}
~IconDatabase()45 IconDatabase::~IconDatabase() {}
46 
setClient(IconDatabaseClient *)47 void IconDatabase::setClient(IconDatabaseClient*) {}
48 
open(const String & path)49 bool IconDatabase::open(const String& path) { return false; }
close()50 void IconDatabase::close() {}
51 
removeAllIcons()52 void IconDatabase::removeAllIcons() {}
53 
iconForPageURL(const String &,const IntSize &)54 Image* IconDatabase::iconForPageURL(const String&, const IntSize&) { return 0; }
readIconForPageURLFromDisk(const String &)55 void IconDatabase::readIconForPageURLFromDisk(const String&) {}
iconURLForPageURL(const String &)56 String IconDatabase::iconURLForPageURL(const String&) { return String(); }
defaultIcon(const IntSize &)57 Image* IconDatabase::defaultIcon(const IntSize&) { return 0;}
58 
retainIconForPageURL(const String &)59 void IconDatabase::retainIconForPageURL(const String&) {}
releaseIconForPageURL(const String &)60 void IconDatabase::releaseIconForPageURL(const String&) {}
61 
setIconDataForIconURL(PassRefPtr<SharedBuffer> data,const String &)62 void IconDatabase::setIconDataForIconURL(PassRefPtr<SharedBuffer> data, const String&) {}
setIconURLForPageURL(const String & iconURL,const String & pageURL)63 void IconDatabase::setIconURLForPageURL(const String& iconURL, const String& pageURL) {}
64 
loadDecisionForIconURL(const String &,DocumentLoader *)65 IconLoadDecision IconDatabase::loadDecisionForIconURL(const String&, DocumentLoader*) { return IconLoadNo; }
iconDataKnownForIconURL(const String &)66 bool IconDatabase::iconDataKnownForIconURL(const String&) { return false; }
67 
setEnabled(bool enabled)68 void IconDatabase::setEnabled(bool enabled) {}
isEnabled() const69 bool IconDatabase::isEnabled() const { return false; }
70 
setPrivateBrowsingEnabled(bool flag)71 void IconDatabase::setPrivateBrowsingEnabled(bool flag) {}
isPrivateBrowsingEnabled() const72 bool IconDatabase::isPrivateBrowsingEnabled() const { return false; }
73 
delayDatabaseCleanup()74 void IconDatabase::delayDatabaseCleanup() {}
allowDatabaseCleanup()75 void IconDatabase::allowDatabaseCleanup() {}
checkIntegrityBeforeOpening()76 void IconDatabase::checkIntegrityBeforeOpening() {}
77 
78 // Support for WebCoreStatistics in WebKit
pageURLMappingCount()79 size_t IconDatabase::pageURLMappingCount() { return 0; }
retainedPageURLCount()80 size_t IconDatabase::retainedPageURLCount() {return 0; }
iconRecordCount()81 size_t IconDatabase::iconRecordCount() { return 0; }
iconRecordCountWithData()82 size_t IconDatabase::iconRecordCountWithData() { return 0; }
83 
isOpen() const84 bool IconDatabase::isOpen() const { return false; }
databasePath() const85 String IconDatabase::databasePath() const { return String(); }
defaultDatabaseFilename()86 String IconDatabase::defaultDatabaseFilename() { return String(); }
87 
88 } // namespace WebCore
89